Originally Posted by Cristhian
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new params[100 char]; new id; unformat(cmdtext, "s[50]S( )[100]",cmd,params); if(strcmp(cmd, "/tirarhosp", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) //se o kra for admin .-. { if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tirarhosp [id]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVБLIDO"); new pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); SetPlayerPos(id, pos[0], pos[1], pos[2]); SendClientMessage(id, -1, "Vocк foi retirado do hospital!"); SendClientMessage(playerid, -1, "Vocк retirou alguйm do hospital com sucesso!"); return 1; } } return 0; }
EXEMPLO /\
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new params[100 char]; new id; unformat(cmdtext, "s[50]S( )[100]",cmd,params); if(strcmp(cmd, "/tirarhosp", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) //se o kra for admin .-. { if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tirarhosp [id]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVБLIDO"); sairhosp(id); return 1; } } return 0; }
ou /\
й sу vc adaptar o comando para sua preferencia ![Cheesy](images/smilies/biggrin.png)
|