ninja jack detection -
Ada32 - 02.12.2013
edit; i'll post my observations soon..
http://pastebin.com/F9NcMxVp
Re: ninja jack detection - Emmet_ - 02.12.2013
Clearly, this isn't a tutorial...
Re: ninja jack detection -
Ada32 - 02.12.2013
Quote:
Originally Posted by Emmet_
Clearly, this isn't a tutorial...
|
Re: ninja jack detection - Emmet_ - 02.12.2013
Quote:
Originally Posted by Ada32
|
EDIT: Nice script you have here, but I have a question. Firstly, what if I jack the player and then get out and shoot them to death? Won't that be detected as ninja jack?
Re: ninja jack detection -
cessil - 02.12.2013
Quote:
Originally Posted by Emmet_
EDIT: Nice script you have here, but I have a question. Firstly, what if I jack the player and then get out and shoot them to death? Won't that be detected as ninja jack?
|
yes I believe so, also jacking a player, getting out the car, getting into a tank and then running them over would also detect it as ninja jacking
I wrote some observations about it a while ago
https://sampforum.blast.hk/showthread.php?tid=305601
Re: ninja jack detection -
Ada32 - 03.12.2013
Quote:
Originally Posted by Emmet_
EDIT: Nice script you have here, but I have a question. Firstly, what if I jack the player and then get out and shoot them to death? Won't that be detected as ninja jack?
|
Quote:
Originally Posted by cessil
yes I believe so, also jacking a player, getting out the car, getting into a tank and then running them over would also detect it as ninja jacking
|
no.. when you kill someone it'll return your id as the killer, if you ninja jack them it won't (invalid_player_id), so in opd you simply check if the killerid is invalid..
Re: ninja jack detection -
cessil - 03.12.2013
you should still read the thread I linked, it says people can do the ninja jack without actually entering the car so OnPlayerStateChange is never called and it'd also stop your script by accessing an invalid index here:
LastAttemptedJack[jacker]
Re: ninja jack detection -
Ada32 - 03.12.2013
Quote:
Originally Posted by cessil
it says people can do the ninja jack without actually entering the car so OnPlayerStateChange is never called and it'd also stop your script by accessing an invalid index here:
LastAttemptedJack[jacker]
|
it wouldn't because GetVehicleDriverID returns invalid player id if there's no driver, and the last attempted jacker's jackid must equal the player's id otherwise it isn't a ninja jack.
if they're killing players who's driving a vehicle without actually jacking it then it's not a ninja jack (more of a remote kill of a player inside a vehicle) but i've never encountered this..i've also checked your links(one in your thread also), any recent confirmations?
Re: ninja jack detection -
cessil - 03.12.2013
it would because invalid player id is 0xFFFF (65535) so unless your array size is 0xFFFF + 1 then it will stop the script there, for the ninja jacking without entering the car you just cancel the entering of the car and sometimes it'll appear to enter the car on the drivers client and kills them
Re: ninja jack detection -
Ada32 - 04.12.2013
Quote:
Originally Posted by cessil
it would because invalid player id is 0xFFFF (65535) so unless your array size is 0xFFFF + 1 then it will stop the script there, for the ninja jacking without entering the car you just cancel the entering of the car and sometimes it'll appear to enter the car on the drivers client and kills them
|
edit:bounds checks anyone?*sigh*..and your right. fixed. and neat observation, it'll now work on anyone who attempts that.