13.02.2012, 20:06
Tente assim, eu acho que da:
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(PlayerInfo[playerid][pAdmin] >= 1) //Troque pelo nivel de administrador que vocк quer
{
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);
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "ERRO: Nao йs administrador.");
}
}
return 1;
}