Quote:
Originally Posted by r3ct
Checking for 0 works just fine, not sure what the mod does but when you use it with fists in your hand OnPlayerWeaponShot is definately called.
Pvars work just fine here
The code doesnt' check if you shoot faster then once a second it checks if you shoot 9 bullets per second wich is faster then ak-47s and m4s.
This is a small snippet I wrote for my server to deflect against this hack and it works just fine. I haven't read over your code to well but wouldn't your code throw false positives for people drivbuying out of cars?
I've never used the default hooks before just y_hooks but i didn't want people to have to include other libraries just to use it.
|
I suggest you to check once more in regarding fists getting called on OnPlayerWeaponShot. A small snippet for debugging?
pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid == 0) printf("WEAPON ID 0 HAS BEEN CALLED!");
return 1;
}
Because melee weapons aren't being called under it as it's "WeaponShot" callback. If 0 gets called, I'm really amazed! About PVars - it's generally slow. And here, PVars aren't required. PVars are only needed if you're using it on other scripts too, like global player-variables.
9 shots may not get called, however the warning gets counted when 2-3 shots are called per-second. I haven't checked my code for driveby weapons such as Desert Eagle, thanks for reminding me. However, it provides a callback to give those an exception.
And finally, I don't use y_hooks, neither any of YSI libraries. What you said is right, getting this included with one more library don't seem to be fit from my view too. You've done the hooking part, but the code under it don't get called. You can view tutorials of hooking and see what's the mistake you've done.
This is a small suggestion, I haven't tried it tho. From the video, it seems like there's no animation while shots are going on. So, how about checking the animations? That might get worked.