03.04.2012, 20:06
Boas malta,e o seguinte este comando:
eso admin pode usar e serve pa enxer o life do player,curar o player neste caso,so que admin nao consegue curar nem gm,porque? admin knd usa esse cmd apareзe "erro:nao es administrador." ajuda malta :S
++REP
pawn Код:
if(strcmp(cmd, "/acurar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Comando: /acurar [playerid] ");
return 1;
}
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][mstrvbcAdmin] >= 1)
if (PlayerInfo[playerid][mstrvbcGm] >= 1)
{
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;
}
++REP