PDA

View Full Version : Question about PlayerState


CutX
10/11/2012, 06:44 PM
Hey,

i was wondering if samp can't detect if you were on foot before you entered a car only when you
are extremely lagging? what do you guys think?

for example:

this message can't appear ingame when i do it like this without using PutPlayerInVehicle somewhere in script.
if(oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFFFFFF,"Statechange from Passenger to driver");
}

so this message would never appear right? because when you leave the car and enter as driver, your oldstate should be PLAYER_STATE_ONFOOT before your state changes to PLAYER_STATE_DRIVER right?
or, if youre terribly lagging, is it possible that its not noticing you being ONFOOT before you entered the car as driver? so this message would appear when lagging that bad?


this just made me thing a lot ^^
im looking forward to your answers,
Cutx

SKAzini
10/11/2012, 08:29 PM
The packet which defines that you're on foot must be sent before the packet of the passenger so no, I do not think the message will ever appear unless you use PutPlayerInVehicle or a hack to enter vehicles.

CutX
11/11/2012, 01:28 PM
The packet which defines that you're on foot must be sent before the packet of the passenger so no, I do not think the message will ever appear unless you use PutPlayerInVehicle or a hack to enter vehicles.

ya, thats what i tought, but the message did appear :( thats the problem....

im banning a player if that's the case, if hes passenger and then suddenly Driver he'll be banned.
I also tested it, with hacks, i got banned ^^
its arround 1.5 months ago since i added this to the script, but now i got banned for suddenly being passenger and driver (without using hacks or PutPl...)
How was this possible, how could this happen? :O i still dont know :/
maybe samp couldnt keep up with sending the player states ? lag ?