13.02.2012, 20:11
Veja assim:
pawn Код:
if(strcmp(cmd, "/acurar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTORANGE, "[Comando:] /acurar [playerid] ");
return 1;
}
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"ERRO: Nao йs administrador.");
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
icurar(playa);
format(string, sizeof(string), " Foste curado por %s.",GetPlayerNameEx(playerid));
SendClientMessage(playa,COLOR_WHITE,string);
format(string, sizeof(string), " Curaste %s.",GetPlayerNameEx(playa));
SendClientMessage(playerid,COLOR_WHITE,string);
}
}
}
}
return 1;
}