Check is player on fire - 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: Check is player on fire (
/showthread.php?tid=663793)
Check is player on fire -
PoniStar - 11.02.2019
hi how can i check that is a player on fire !?
Re: Check is player on fire -
RoboN1X - 11.02.2019
Note: Flames are mainly client side, that's mean it doesn't sync well with other players or the server and not always same time (e.g. when player paused).
You can try this library
https://sampforum.blast.hk/showthread.php?tid=490436
It has OnPlayerStartBurn & OnPlayerStopBurn & IsPlayerBurning function, this is achieved by marking a player when they get damage from fire sources (flame thrower, molotov, etc)...
But if you wish to achieve a server side fire, maybe you can script it with combination of that include and
weapon-config, where you create Object & Attached Object as the flame visual, and give damage as you scripted.
Re: Check is player on fire -
PoniStar - 11.02.2019
look i want to player cant shoot weapon when he is burning where can i put setarmed weapon code? it wont work on player weapon shoot :@
Re: Check is player on fire -
Markski - 11.02.2019
By default, players can't shoot a weapon while on fire.
Also, you can't check for flames as these are entirely made on the client's side. You could try and detect a PlayerTakeDamage of less than 1 though. IIRC flames produce somewhere around 0.30 of damage per player update
Re: Check is player on fire -
PoniStar - 11.02.2019
you can shoot but you cant see that , other players can see your shoot and can take dmg by that ! and they see that as NoReload