First time scripting help
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/helphelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,COLOR_RED,"If you want to heal yourself use /healme, wich will cost 500 and for armour /armour wich will be 1000.");
        return 1;
    }
    if (strcmp("/healme", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,100);
        GivePlayerMoney(playerid,-500);
        SendClientMessage(playerid,COLOR_GREEN,"You have reafilled your health.");
        SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
        return 1;
    }
    if (strcmp("/armourme", cmdtext, true, 10) == 0)
    {
        SetPlayerArmour(playerid,100);
        SendClientMessage(playerid,COLOR_RED,"You have refilled your armour.");
        SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
        return 1;
    }
    return 1;
}
Edit: lol , late a little bit xD, i didnt check his code and when i scroll down i see there's a problem with his commands callbacks :P

Second Edit:
pawn Код:
SetPlayerArmor(playerid,100);
check it carefully.
pawn Код:
SetPlayerArmour(playerid,100);
Reply


Messages In This Thread
First time scripting help - by Juan_Viz - 29.08.2012, 00:02
Re: First time scripting help - by Devilxz97 - 29.08.2012, 00:08
Respuesta: First time scripting help - by Juan_Viz - 29.08.2012, 00:09
Re: First time scripting help - by Devilxz97 - 29.08.2012, 00:14
Re: First time scripting help - by CoDeZ - 29.08.2012, 00:24
Re: First time scripting help - by Devilxz97 - 29.08.2012, 00:24
Respuesta: First time scripting help - by Juan_Viz - 29.08.2012, 01:38
Respuesta: First time scripting help - by Juan_Viz - 29.08.2012, 01:51
Re: First time scripting help - by SA-MPDrifter - 29.08.2012, 01:52
Re: First time scripting help - by Akira297 - 29.08.2012, 01:57

Forum Jump:


Users browsing this thread: 1 Guest(s)