Posts: 107
Threads: 10
Joined: Mar 2009
Reputation:
0
Hello guys
I have an anti weapon hack but strangely it only detects the forbidden weapons from id 0.
Does anyone know why?
Posts: 1,121
Threads: 139
Joined: Nov 2009
Reputation:
0
how about showing the code? xd
Posts: 1,501
Threads: 19
Joined: Nov 2007
Reputation:
0
You probably have a for loop where you're returning inside of it. That way it'd only scan player 0 and then end the loop.
Posts: 1,501
Threads: 19
Joined: Nov 2007
Reputation:
0
That code is very inefficient and won't even work for anyone but playerid 0. You can't pass a playerid parameter if you're calling the timer in OnGameModeInit. The script doesn't know which playerid to use so it just uses 0. Also, if a player has an illegal weapon, it just adds to his warnings once a second until it gets to five.
Posts: 698
Threads: 107
Joined: Mar 2010
Reputation:
0
This is not the sulution, but i would recommend you using GetPlayerWeaponData in stead of GetPlayerWeapon.