25.04.2011, 19:54
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"));
}
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
pawn Код:
GetPlayerHealth(playerid,health);
pawn Код:
if (health < 100)
pawn Код:
SetPlayerHealth(playerid, health+10);