Need little help in Scripting. Just little.
#9

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
pawn Код:
new AlreadyHealed[MAX_PLAYERS];

stock AlreadyHealed[playerid] == 0;

CMD:heal(playerid, params[])
{
    if(gPlayerClass[playerid] == MEDIC)
    {
        if(AlreadyHealed[playerid] == 0)
        {
            new Float:health;
            GetPlayerHealth(playerid, health);
            if(health <= 80) SetPlayerHealth(playerid, health + 20);
            else SetPlayerHealth(playerid, 100); //Prevents health going above 100.  If you want to enable  this, remove this line and the if statement above.
        }
        else return SendClientMessage(playerid, 0xFF0000FF, "Error: You already used your medic kit!");
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "Error: You are not a medic!");
return 1;
}
Here You GO
All you did was add return 1;, which is exactly what I did. You didn't even help him with the other error

@Omar, You really do not deserve reputation because you cannot even do a simple fucking thing.

Here

pawn Код:
public OnPlayerConnect(playerid)
{
    AlreadyHealed[playerid] == 0;
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
    AlreadyHealed[playerid] == 0;
    return 1;
}
Learn English.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)