01.10.2011, 10:03
PHP код:
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;
}
}