Players may temporarily spawn a random weapon while entering a vehicle
#1

I found out that if a player does enter a vehicle (while doing it there's a chance of 0,2%) that a player will spawn a random weapon.

Version: 0.3d R2 Server&Client

I hope this will be fixed in the next update.

Regards
Reply
#2

Never saw that. Test with multiple scripts, maybe it is some scripting issue.
Reply
#3

Well no it's actually not a scripting issue :/

I use an anti cheat which detects what kind of weapons does a player spawn after player update and so I was able to see what and where the weapon has been spawned (This have detected on me even I didn't use any kind of mods/cheats/hacks)

This was detectable with GetPlayerWeapon and GetPlayerWeaponData

(I guess it must be a client side issue or the server just desyncs while a player does enter a vehicle)
Reply
#4

Mind showing the exact code to check it?
I am curious about this.
Reply
#5

Where you can get the include: https://sampforum.blast.hk/showthread.php?tid=280549


I won't show lines of my whole weapon anti cheat, but I can show you a callback which does get called after almost every player update (only in case of weapon update)
pawn Code:
public OnPlayerWeaponDataChange(playerid, slot, oldweapon, newweapon)
{
    printf("Player ID %d spawned weapon ID %d on slot %d. Old: %d", playerid, newweapon, slot, oldweapon);
    return 1;
}
From the logs:
Code:
...
In Vehicle: Enforcer(8)
Player Vehicle Health: 998.41
AC Vehicle Health 1000.00
...
Holding Weapon: Tec9(1000)
Player Weapons:
N/A(0), Deagle(100), Tec9(1000)

AC Weapons:
N/A(0), Deagle(100), MP5(1000)
Reply
#6

I ve seen this. May this help you:
A guy had MP5 with 1000 ammo. He has a low ping. He spend on server about 5 minutes before.
Ok, so he entered my truck with G and then the truck strangly moved forward without me as driver doing anything.
I haven't seen that 'truck lag move' before on 0.3a b or c
Does this bug spawns a weapon with 0 ammo?
Reply
#7

2,807,748 spawned since 0.3, not one has spawned the driver/passenger a weapon.

It must a bug when getting the players data, check this thread out:
https://sampforum.blast.hk/showthread.php?tid=312184

Getting data while the player is not spawned, or in a vehicle sometimes throws up wrong data. How does the filterscript you're using, know when the player is spawned in the gamemode?
Reply
#8

I'm not using any filterscripts for my server. It's just an include which helps me to filter out player side changes.

I just set/check a simple PVar if a player does spawn/has been spawned.

This callback won't get called if somebody has joined the server (also while being in class selection)
Reply
#9

I don't know but if it has been fixed in 0.3e but this bug is really annoying in 0.3d.
Reply
#10

It has to be a scripting issue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)