Check is player on fire
#1

hi how can i check that is a player on fire !?
Reply
#2

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.
Reply
#3

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 :@
Reply
#4

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
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)