GetPlayerWeaponData bug retun? - 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)
+--- Thread: GetPlayerWeaponData bug retun? (
/showthread.php?tid=299947)
GetPlayerWeaponData bug retun? -
ombre - 28.11.2011
Hi,
I use for my anticheat GetPlayerWeaponData, it work perfectly. But sometime, if the player is a passanger ( and only), the fonction return weapon is id 23 instead of 24, or the function return weapon is id 24 instead of 23. Just for the C45/eagle/silenced.
Why that?
Re : GetPlayerWeaponData bug retun? -
ombre - 28.11.2011
up thx
Re : GetPlayerWeaponData bug retun? -
ombre - 29.11.2011
it's a bug sa:mp?
Re: GetPlayerWeaponData bug retun? -
cessil - 29.11.2011
the only times I've found it to be unreliable is when the player is dead or around vehicles, so yes it can return false data, however I haven't had any bugs with GetPlayerWeapon
edit: it can also return old data too
Re : GetPlayerWeaponData bug retun? -
ombre - 04.12.2011
thx. I think it return old data, but how to correct that?
Код:
GetPlayerWeaponData
if((Player_Weapons[slot] == 22 || Player_Weapons[slot] == 23) && Player_Ammos[slot] > 0 && Player_Ammos[slot] < 65535 && PlayerInfo[i][wep2] == 0)
{
//ban
}
if(Player_Weapons[slot] == 24 && Player_Ammos[slot] > 0 && Player_Ammos[slot] < 65535 && PlayerInfo[i][wepeagle] ==0)
{
//ban
}
//PlayerInfo[i][wep2] = 1 PlayerInfo[i][wepeagle] = 1 when a player give a weapon
Re : GetPlayerWeaponData bug retun? -
ombre - 07.12.2011
please?
Re: GetPlayerWeaponData bug retun? -
cessil - 07.12.2011
don't use GetPlayerWeaponData for banning players, use GetPlayerWeapon instead