02.09.2011, 08:36
Quote:
|
Hello, I have this /aheal command but it only heals me and even if I tipe the wrong id still it heals only me and that "That player is offline" doesn't work. Help please. [/pawn]
|
pawn Код:
if(strcmp(cmd, "/aheal", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /aheal [playerid]");
return 1;
}
if(IsPlayerConnected(strval(tmp)))
{
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 102)
{
SetPlayerHealth(strval(tmp), 100);
SetPlayerArmour(strval(tmp), 100);
PlayerPlaySound(strval(tmp), 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Server : %s Has been healed by admin %s.", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorised to use this command!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
}
return 1;
}


