Nokill inside a house - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Nokill inside a house (
/showthread.php?tid=393272)
Nokill inside a house -
MoLoGoLo - 17.11.2012
Hello!
Do someone know how i make people immortal in houses?
i use
http://forum.sa-mp.com/showthread.ph...amic+Apartment
Please help me i need help
Re: Nokill inside a house -
Konstantinos - 17.11.2012
pawn Код:
public OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid )
{
if( issuerid != INVALID_PLAYER_ID )
{
if( GetPlayerInterior( playerid ) != 0 ) SetPlayerHealth( playerid, 100.0 );
}
return 1;
}
// This will work only if someone shoots someone else.
In case you need infinity health even from explosions or whatever inside the interior make a godmode with timer.
Re: Nokill inside a house -
Face9000 - 17.11.2012
Quote:
Originally Posted by Dwane
[
In case you need infinity health even from explosions or whatever inside the interior make a godmode with timer.
|
Or just:
pawn Код:
SetPlayerHealth(playerid, 99999.0);
Re: Nokill inside a house -
MoLoGoLo - 17.11.2012
Is that only for the "house world" or for all worlds, and where will i put it in, the main script or the filterscript? (i am new in scripting)