How to make this command?
#1

Hello,

Today my friend scripted a command for me ( Heal ) for a job. Now after I thought about it, it's like /heal playerid amount. It can be bugged and spammed on people ... So, I decided to make a command that accepts the command heal ( /acceptheal ). But I am stuck in it, here is my command:

pawn Код:
CMD:heal(playerid, params[])
{
    if(PlayerInfo[playerid][Job] == 1)
    {
        new targetid,
            string[128],
            amount;

        if( sscanf ( params, "ii", targetid, amount)) return SendClientMessage(playerid, -1,"/heal [PlayerID/PlayerName] [Amount]"); // This will actually do it - I is a interget and that's a targetid.


        format(string, sizeof(string), "[Medic]Your patient have been healed for %d",amount);

        SetPlayerHealth(targetid, 100);

        GivePlayerMoney(playerid, amount);
        GivePlayerMoney(targetid, amount);

    } else return SendClientMessage(playerid, 0xFFFFFFFF, ".:: Error: You need to be a m3dic to use this command! ::.");
    return 1;
}
How can I make the /acceptheal command?

Thanks a lot!
Reply


Messages In This Thread
How to make this command? - by PlayHard - 08.12.2011, 18:35
Re: How to make this command? - by Kingunit - 08.12.2011, 18:40
Re: How to make this command? - by PlayHard - 08.12.2011, 18:50
Re: How to make this command? - by Kingunit - 08.12.2011, 18:54
Re: How to make this command? - by PlayHard - 08.12.2011, 18:55
Re: How to make this command? - by bartje01 - 08.12.2011, 20:40
Re : How to make this command? - by Amine_Mejrhirrou - 08.12.2011, 20:49
Re: How to make this command? - by Kingunit - 08.12.2011, 21:00
Re: How to make this command? - by grand.Theft.Otto - 08.12.2011, 21:07
Re: How to make this command? - by PlayHard - 09.12.2011, 09:38

Forum Jump:


Users browsing this thread: 3 Guest(s)