SA-MP Forums Archive
car flip - 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 (/showthread.php?tid=103395)



car flip - PANNA - 19.10.2009

can someone tell me how to make a little script to let a car flip?


Re: car flip - Virtual1ty - 19.10.2009

search there are alot of topics about that,, (yes the search button is temporrary down, but please.. go on ****** and type in car flip forum.sa-mp.com or somthing.. )


Re: car flip - Correlli - 19.10.2009

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
  new vehicleid = GetPlayerVehicleID(playerid);
  new Float:x, Float:y, Float:z;
  GetVehiclePos(vehicleid, x, y, z);
  SetVehiclePos(vehicleid, x, y, z);
}
You can use this code if your car goes on roof, it will flip it back to normal.


Re: car flip - PANNA - 20.10.2009

Quote:
Originally Posted by Don Correlli
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
  new vehicleid = GetPlayerVehicleID(playerid);
  new Float:x, Float:y, Float:z;
  GetVehiclePos(vehicleid, x, y, z);
  SetVehiclePos(vehicleid, x, y, z);
}
You can use this code if your car goes on roof, it will flip it back to normal.
where i need to put it??
gamemodeinit?


Re: car flip - Virtual1ty - 20.10.2009

you just wanted a little script so Don_Corelli gave it to you... it should be put in a command not ongamemodeinit ... so like
pawn Код:
if(strcmp(cmdtext, "/flip", true) == 0)
{
  //the code here
  return 1;
}
under OnPlayerCommandText


Re: car flip - PANNA - 20.10.2009

is imt possible that when you press CTRL you flip? cuz i saw that on other servers.


Re: car flip - Virtual1ty - 20.10.2009

wiki is your friend man
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange


Re: car flip - MenaceX^ - 20.10.2009

I suggest you to learn through a guide. Asking this won't help and you'll just work as a machine. Learning is useful than this..