Код HTML:
dcmd_crash(playerid,params[])
{
if(AccInfo[playerid][Level] >= 4)
{
if(!strlen(params)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /crash [PlayerID]") &&
SendClientMessage(playerid, orange, "Function: Will Crash a specified player");
new player1 = strval(params), string[128], Float:X,Float:Y,Float:Z;
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
SendCommandToAdmins(playerid,"Crash");
GetPlayerPos(player1,X,Y,Z);
new CrashObj = CreatePlayerObject(player1,11111111,X,Y,Z,0,0,0);
DestroyObject(CrashObj);
format(string, sizeof(string), "|- You have Crashed \"%s's\" -|", pName(player1));
return SendClientMessage(playerid,blue, string);
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}