18.12.2010, 17:38
(
Последний раз редактировалось Mean; 18.12.2010 в 22:11.
)
pawn Код:
dcmd_gmx(playerid,params[])
{
if(AccInfo[playerid][Level] < 5) return SendClientMessage(playerid, red, "ERROR: You must be level 5 to use this command");
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
if( isnull( params ))
{
format(string,sizeof(string), "Administrator %s has restarted the server || Reason: Not given", playername);
}
else
{
format(string,sizeof(string), "Administrator %s has restarted the server || Reason: %s", playername, params);
}
for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayerPlaySound(i,1057,0.0,0.0,0.0);
SendClientMessageToAll(blue, string);
SendRconCommand("gmx");
return 1;
}
EDIT: Works somehow now, it crashed me once, weird...