SA-MP Forums Archive
damage when afk - 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: damage when afk (/showthread.php?tid=527943)



damage when afk - iBots - 25.07.2014

well in my server,when someone is not driving a vehicle and he is afk ,if someone shoots him,and he gets back to game he loses hp,why?


Re: damage when afk - Konstantinos - 25.07.2014

It's been said many times in the past. Check in OnPlayerWeaponShot callback if the type is player and the player was hit is AFK (you're supposed to have a system for that) and if so, return 0 to prevent the bullets from causing damage.