08.04.2014, 12:24
Код:
if(strcmp(cmd, "/explodir", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USE: /explodir [playerid]"); return 1; } giveplayerid = strval(tmp); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "AdmCmd: %s explodiu %s.",giveplayer, sendername); ABroadCast(COLOR_LIGHTRED,string,1); SetPlayerHealth(giveplayerid, 10); new Float:boomx, Float:boomy, Float:boomz; GetPlayerPos(giveplayerid,boomx, boomy, boomz); CreateExplosion(boomx, boomy , boomz, 7, 10); } } else { SendClientMessage(playerid,COLOR_GRAD5,"Vocк nгo tem permissгo para usar esse comando!"); } return 1; }