30.12.2016, 14:45
Quote:
I have a deagle.
I type in /tazer. It removes the deagle, gives me a silenced pistol, a warning pops up that I may be hacking a deagle. This is getting out of control. |
when you set a variable it's instant, when you give someone a weapon data has to travel to their client and then the client sets the right weapon.
GetPlayerWeapon doesn't query the players client, it returns data previously sent by the client.
So when you give a player a deagle and then give them a silenced pistol the script says they should have a silenced pistol, but using GetPlayerWeaponData right under it will return a deagle since you're reading old data, you have to give the client time to update to the server, what I used to do was check every second but only warn on 5 and 10 seconds, then kick them at 15 seconds
for more reading
https://sampforum.blast.hk/showthread.php?tid=220089