hallo ich wollte ein whisper system machen aber dort kommen errors erstmal poste ich das script und dann die errors
if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, rot, "Du bist nicht eingeloggt!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, rot, "Verwendung: (/w)isper [spielerid/teildesnamens] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(HidePM[giveplayerid] > 0)
{
SendClientMessage(playerid, rot, "Der Spieler blockt das Flüstern!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == playerid)
{
format(string, sizeof(string), "* %s murmelt etwas.", sendername);
ProxDetector(5.0, playerid, string, lila,lila,lila,lila,lila);
}
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, rot, "Verwendung: (/w)isper [spielerid/teildesnamens] [text]");
return 1;
}
format(string, sizeof(string), "%s(ID: %d) flüstert: %s", sendername, playerid, (result));
SendClientMessage(giveplayerid, gelb, string);
format(string, sizeof(string), "Dein geflüster wurde an %s (%d) gesendet.", giveplayer, giveplayerid);
SendClientMessage(playerid, gelb, string);
SBizzInfo[2][sbTill] += txtcost / 2;
ExtortionSBiz(2, txtcost / 2);
return 1;
}
}
else
{
format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, rot, string);
}
}
return 1;
}
die erros:
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta server\gamemodes\Mafia-Policev3.pwn(1194) : error 017: undefined symbol "cmd"
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta
server\gamemodes\Mafia-Policev3.pwn(1198) : error 017: undefined symbol
"gPlayerLogged"
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta server\gamemodes\Mafia-Policev3.pwn(1198) : warning 215: expression has no effect
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta
server\gamemodes\Mafia-Policev3.pwn(1198) : error 001: expected token:
";", but found "]"
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta
server\gamemodes\Mafia-Policev3.pwn(1198) : error 029: invalid
expression, assumed zero
C:\Users\gtaserver.CHIPOTLE101\Desktop\Gta
server\gamemodes\Mafia-Policev3.pwn(1198) : fatal error 107: too many
error messages on one line