28.12.2009, 20:40
i want to disable damage on interiors, soo i made this
but if u have for example 50.0 of health, when u enter an interior and then go out of it, ur health= 100.0 :S
can someone help me with this?
pawn Код:
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
if((GetPlayerInterior(playerid) > 0))
{
SetPlayerHealth(playerid, 10000000);
}
if((GetPlayerInterior(playerid) == 0))
{
SetPlayerHealth(playerid, Health);
}
return 1;
}
can someone help me with this?