20.04.2009, 05:11
Hey!
I have an antihack that checks for weapons per team, as each team get a slightly different array of weaponry.
Basically, the defense system checks if gTeam = TEAM_DE or TEAM_AT, and does the correct check accordingly, I have used print debugs to check it is doing that bit correctly, it is.
However, when you go to the spawn selection to chose a new team, you trigger the anti hack for having a weapon the other team gets. When you die, I reset weapons, each time OnPlayerRequesClass is called, i reset weapons. So why is it still being triggered, does SA:MP have a slow updating system for ResetPlayerWeapons / GetPlayerWeaponData?
Any ideas how I can fix?
- Redirect Left
EDIT: Added IsSpawned checks, it still bans you, now it just waits til you've spawned.
EDIT2: Fixed now.
I have an antihack that checks for weapons per team, as each team get a slightly different array of weaponry.
Basically, the defense system checks if gTeam = TEAM_DE or TEAM_AT, and does the correct check accordingly, I have used print debugs to check it is doing that bit correctly, it is.
However, when you go to the spawn selection to chose a new team, you trigger the anti hack for having a weapon the other team gets. When you die, I reset weapons, each time OnPlayerRequesClass is called, i reset weapons. So why is it still being triggered, does SA:MP have a slow updating system for ResetPlayerWeapons / GetPlayerWeaponData?
Any ideas how I can fix?
- Redirect Left
EDIT: Added IsSpawned checks, it still bans you, now it just waits til you've spawned.
EDIT2: Fixed now.