SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/02/2019, 12:39 PM   #1
PoniStar
Big Clucker
 
Join Date: Aug 2018
Posts: 178
Reputation: 0
Default Check is player on fire

hi how can i check that is a player on fire !?
PoniStar is offline   Reply With Quote
Old 11/02/2019, 12:50 PM   #2
RoboN1X
Huge Clucker
 
RoboN1X's Avatar
 
Join Date: Feb 2011
Location: Indonesia
Posts: 345
Reputation: 60
Default Re: Check is player on fire

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://forum.sa-mp.com/showthread.php?t=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.
__________________
Need Help? Use Search, WIKI, and FAQ
RoboN1X is offline   Reply With Quote
Old 11/02/2019, 01:15 PM   #3
PoniStar
Big Clucker
 
Join Date: Aug 2018
Posts: 178
Reputation: 0
Default Re: Check is player on fire

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 :@
PoniStar is offline   Reply With Quote
Old 11/02/2019, 01:35 PM   #4
Markski
Little Clucker
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 10
Reputation: 0
Default Re: Check is player on fire

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
__________________
Markski is offline   Reply With Quote
Old 11/02/2019, 02:23 PM   #5
PoniStar
Big Clucker
 
Join Date: Aug 2018
Posts: 178
Reputation: 0
Default Re: Check is player on fire

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
PoniStar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Player's can't see other users on fire? Tass007 Scripting Help 17 25/08/2016 11:45 AM
Freeze player destroys fire on the ground for him CyNiC Bug Reports 0 21/03/2014 01:07 AM
[Tutorial] ADD fire from exhaust when player use nitro! brawrr Tutorials 2 28/09/2013 03:57 PM
[FilterScript] Anti Vehicle Player Fire (0.3c) paco601 Filterscripts 11 04/02/2011 12:45 AM
Check if mouse fire button has been clicked 5 times Yoyoyo Help Archive 2 29/06/2009 11:12 PM


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.