21.06.2014, 10:32
Hello sa-mpers!
Im having a trouble here.
Im 5 level admin and it still says that this command is only for admins or VIP's.
whats wrong?
Im having a trouble here.
Im 5 level admin and it still says that this command is only for admins or VIP's.
pawn Код:
CMD:heal(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pVip] == 0) return SendClientMessage(playerid,COL_RED,"This command is only for administrators or VIP's!");
new targetid,string[50],pName[MAX_PLAYER_NAME],aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(targetid, pName, sizeof(pName));
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COL_RED, ""TCRED"USAGE:"TCADMINGREEN" /heal [PlayerID or Name]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COL_RED, ""TCADMINGREEN"Player is not connected!");
format(string,sizeof(string),"You have healed "TCRED"%s",pName);
SendClientMessage(playerid,COL_VIP,string);
format(string,sizeof(string),"You have been healed by"TCRED"%s",aName);
SendClientMessage(targetid,COL_VIP,string);
SetPlayerHealth(targetid,100);
return 1;
}