AFK killing detection - 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: AFK killing detection (
/showthread.php?tid=559271)
AFK killing detection -
Hybris - 22.01.2015
Hello I was wondering if its possible to detect if a AFK player kills someone(aka detecting cam hack)
Re: AFK killing detection -
XXCrazyMan707XX - 22.01.2015
What does cam hack have to do with this?
If they're afk do they type some command like /afk?
Re: AFK killing detection -
CalvinC - 22.01.2015
First, detect if the player is AFK, you can do this by looping through all players and check if OnPlayerUpdate is called. It wont if they're AFK.
Then if OnPlayerUpdate isn't called, you can set a variable to 1 or something, and 0 when OnPlayerUpdate is called, and use OnPlayerDeath to see if the killerid has that variable set to 1.
Re: AFK killing detection -
Hybris - 22.01.2015
Quote:
Originally Posted by XXCrazyMan707XX
What does cam hack have to do with this?
If they're afk do they type some command like /afk?
|
I don't think you get what I said when someone is using cam hack it means that for other players it shows that person afk and maybe in the ground but for the player using it is a diffrent story he is flying around killing people while he stays invisible.
Quote:
Originally Posted by CalvinC
First, detect if the player is AFK, you can do this by looping through all players and check if OnPlayerUpdate is called. It wont if they're AFK.
Then if OnPlayerUpdate isn't called, you can set a variable to 1 or something, and 0 when OnPlayerUpdate is called, and use OnPlayerDeath to see if the killerid has that variable set to 1.
|
Makes quite alot of sense