01.10.2011, 09:53
hi guys i have this cmd to crash a player but i need to fix it its not working right can someone help me please here is the code:
Errors:
i dont know what the problem is line 266 is:
can someone plz help me
pawn Код:
CMD:Crash(playerid, params[])
{
new string[128];
if(pInfo[playerid][AdminLevel] >=4 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: You need to be administrator to use this command!");
{
if(sscanf(params, "us[128]", params[0], params[1])) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/Crash [playerid] [reason]");
if ( IsPlayerConnected( params[ 0 ] ) && params[ 0 ] != INVALID_PLAYER_ID && params[ 0 ] != playerid )
{
if(!strlen(params[1]))
{
format(string, sizeof(string),"%s Has been crashed by Admin %s [no reason given]!",PlayerName2(params[0]),PlayerName2(playerid));
SendClientMessageToAll(ABLUE, string);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
} else {
format(string, sizeof(string),"%s has been crashed by Admin %s [Reason: %s]", PlayerName2(params[0]), PlayerName2(playerid), params[1]);
SendClientMessageToAll(ABLUE, string);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
GameTextForPlayer(params[0], "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
} else {
SendClientMessage(playerid, RED,"ERROR Player Specified Not Online!");
}
return 1;
}
return 1;
}
}
pawn Код:
C:\DOCUME~1\Rhys\Desktop\SA8BEC~1\FILTER~1\Account.pwn(266) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
) else (