ResetPlayerWeapons + GetPlayerWeaponData = slow update? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ResetPlayerWeapons + GetPlayerWeaponData = slow update? (
/showthread.php?tid=74144)
ResetPlayerWeapons + GetPlayerWeaponData = slow update? -
Redirect Left - 20.04.2009
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.