SA-MP Forums Archive
Car flip problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car flip problem (/showthread.php?tid=99221)



Car flip problem - MB@ - 26.09.2009

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


Re: Car flip problem - Tigerbeast11 - 26.09.2009

do u get any errors when u compile?


Re: Car flip problem - MB@ - 26.09.2009

Nope


Re: Car flip problem - Correlli - 26.09.2009

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.