[HELP]Aheal cmd
#10

Quote:
Originally Posted by [Aka]Dragonu
Посмотреть сообщение
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]
It will heal only ID 0, because "giveplayerid" has no value assigned

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;
        }
Reply


Messages In This Thread
[HELP]Aheal cmd - by [Aka]Dragonu - 01.09.2011, 12:29
Re: [HELP]Aheal cmd - by Jafet_Macario - 01.09.2011, 13:31
Re : [HELP]Aheal cmd - by Naruto_Emilio - 01.09.2011, 13:33
Re: [HELP]Aheal cmd - by [Aka]Dragonu - 01.09.2011, 13:47
Re: [HELP]Aheal cmd - by Jafet_Macario - 01.09.2011, 13:55
Re: [HELP]Aheal cmd - by [Aka]Dragonu - 01.09.2011, 14:03
Re: [HELP]Aheal cmd - by [Aka]Dragonu - 02.09.2011, 07:58
Re: [HELP]Aheal cmd - by Speed - 02.09.2011, 08:24
Re: [HELP]Aheal cmd - by [Aka]Dragonu - 02.09.2011, 08:27
Re: [HELP]Aheal cmd - by Sasino97 - 02.09.2011, 08:36

Forum Jump:


Users browsing this thread: 1 Guest(s)