/donut
#1

pawn Код:
dcmd_donut(playerid,params[])
{
    #pragma unused params
    SetPVarInt(playerid, "donuthealth", SetTimerEx("donuthealth", 500, true, "i", playerid));
}
forward donuthealth(playerid);

public donuthealth(playerid)
{
    new Flot: health;
    GetPlayerHealth(playerid,health);
    if (health < 100)
    SetPlayerHealth(playerid, health+10);
    return KillTimer(GetPVarInt(playerid, "donuthealth"));
}
Whats wrong with this?
I want the donut to refill the players health by 10 each time.

I get these errors:

Код:
C:\Users\MarioG\Desktop\SASP\gamemodes\SASP.pwn(932) : warning 213: tag mismatch
C:\Users\MarioG\Desktop\SASP\gamemodes\SASP.pwn(933) : warning 213: tag mismatch
C:\Users\MarioG\Desktop\SASP\gamemodes\SASP.pwn(934) : warning 213: tag mismatch
Line 932
pawn Код:
GetPlayerHealth(playerid,health);
Line 933
pawn Код:
if (health < 100)
Line 934
pawn Код:
SetPlayerHealth(playerid, health+10);
Thanks.
Reply


Messages In This Thread
/donut - by captainjohn - 25.04.2011, 19:54
Re: /donut - by Markx - 25.04.2011, 19:56
Re: /donut - by captainjohn - 25.04.2011, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)