Car flip problem
#1

So i made that scipt

Код:
forward Flip();

public Flip()
{
new keys, updown, leftright;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
GetPlayerKeys(playerid, keys, updown, leftright);

if(keys == KEY_ACTION)
{
new VehicleID, Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID, X, Y, Z);
SetVehicleZAngle(VehicleID, 0);
}
}
}
}
And when i press key action it wont work can u pls tell me what the proplem is thanx
Reply
#2

do u get any errors when u compile?
Reply
#3

Nope
Reply
#4

You're using this in a timer? And what is the interval of the timer?
It's best if you use it at OnPlayerKeyStateChange callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)