hmm funzt irwie net so ganz der zeigt zwar das ich den wchat lesen kann aber ich kanns net Oo ich poste ma wie ichs eingefügt hab:
new willhoehren[MAX_PLAYERS];
if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(HidePM[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " That player is blocking Whispers !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == playerid)
{
format(string, sizeof(string), "* %s mutters somthing.", sendername);
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Usage: (/w)isper [playerid/part of name] [text]");
return 1;
}
format(string, sizeof(string), "%s(ID: %d) flüstert: %s", sendername, playerid, (result));
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "Dein geflüster wurde an %s (%d) gesendet.", giveplayer, giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string,sizeof(string),"%s flüstert %s: %s",sendername,giveplayer,(result));
for(new i=0; i<MAX_PLAYERS; i++) {
if(i!=playerid && i!=giveplayerid) {
if(IsPlayerConnected(i)) {
if(willhoehren[i]==1) {
SendClientMessage(i,COLOR_YELLOW,string); }}}}
SBizzInfo[2][sbTill] += txtcost / 2;
ExtortionSBiz(2, txtcost / 2);
return 1;
}
}
Alles anzeigen
//------------------------[readw]------------------
if(strcmp(cmdtext,"/readw",true)==0) {
if(willhoehren[playerid]==1) {
SendClientMessage(playerid,COLOR_YELLOW,"Du sieht den /w chat nun nicht mehr");
willhoehren[playerid]=0; }
else if(willhoehren[playerid]==0) {
SendClientMessage(playerid,COLOR_YELLOW,"Du sieht nun den /w chat");
willhoehren[playerid]=1; }
return 1;
}