[HELP] /aheal command !
#5

This one edited by me works . But it only works if i tipe : /heal 0 asd or some keywords .And i want to remove that . Can you remove that for me please ? And one more thing i want to remove the : You have been succesfully healed message please !

pawn Код:
if(strcmp(cmd, "/aheal", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /aheal [playerid/PartOfName]");
                return 1;
            }
            giveplayerid = strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /aheal [playerid/PartOfName]");
                return 1;
            }
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 101)
                    {
                            new Float:tempheal;
                            GetPlayerHealth(giveplayerid,tempheal);
                            if(tempheal >= 100.0)
                            {
                                SendClientMessage(playerid, COLOR_GRAD1,"   You healed that player succesfully !");
                                return 1;
                            }
                            SetPlayerHealth(giveplayerid, 100);
                            PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
                            SendClientMessage(giveplayerid, COLOR_YELLOW, "   You have been fully healed.");
                            {
                             format(string, sizeof(string), "Server :  %s Has been healed by admin %s.", PlayerName[giveplayerid], PlayerName[playerid]);
                                SendClientMessageToAll(COLOR_RED, string);
                                }


                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
                        return 1;
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "   That player is offline or you mistyped its name!", giveplayerid);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Reply


Messages In This Thread
[HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:21
Re: [HELP] /aheal command ! - by gychem - 03.12.2010, 20:23
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:27
Re: [HELP] /aheal command ! - by gychem - 03.12.2010, 20:40
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:52
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 04.12.2010, 07:02
Re: [HELP] /aheal command ! - by Ash. - 04.12.2010, 07:08
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 04.12.2010, 07:46
Re: [HELP] /aheal command ! - by fangoth1 - 04.12.2010, 10:12
Re: [HELP] /aheal command ! - by fangoth1 - 04.12.2010, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)