GetPlayerWeapon as a passenger
#1

According to wiki prior to version 0.3z RC1 this bug was still in place but it's still a bug in the new version and I can't seem to work around with it and apply it in my anti cheat.
Reply
#2

It doesn't say RC1. It says R1-2. This is obviously a client and not a server version. Although, I doubt the validity of such information try using the R1-2 client.

UPDATE: Apparently MP2 updated the wiki page with that new info-bit however I do not recall anything being changed. What is the function reporting, -1?
Reply
#3

Nope it's returning the weapon ID which the player entered with to the vehicle, so if I switch to another weapon inside the vehicle the function will not return the current weapon ID.
Reply
#4

That's what it's supposed to be I believe. I never saw anything suggesting that the client suddenly sent such sync information as a passenger.

FYI: The reason this occurs is because weapon data isn't being sent to the server while players are in a vehicle. It's supposed to be this way - there is no real way to detect the weaponID of a player whilst in a vehicle. However you can use SetPlayerArmedWeapon to prevent them from using any weapons inside a vehicle.
Reply
#5

I can confirm this happened again,

@Abagail, it was a server update and it was announced.
Quote:
Originally Posted by Kalcor
View Post
This update is for SA-MP server owners only

- The player's current weapon ID was not correctly reported to pawn scripts when they were passengering in a vehicle.
It's not just passenger but also driver the last time i tested with 0.3z R4.
Reply
#6

Yes however I believe that it means when the vehicle is first entered. With that logic, it won't detect if weapons are changed / removed with SetPlayerArmedWeapon.
Reply
#7

Unless however we hooked SetPlayerArmedWeapon and GetPlayerWeapon to return the weapon that was set it would be fixed. This would be a great addition to the fixes include.
Reply
#8

Quote:
Originally Posted by Crayder
View Post
Unless however we hooked SetPlayerArmedWeapon and GetPlayerWeapon to return the weapon that was set it would be fixed. This would be a great addition to the fixes include.
But if exists code that fix it in SA-MP source, no need to add it to fixes include, need to be looked by Kalcor or spookie.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)