Vehicle stuck in the air on SetVehiclePos
#6

This x+2 and y+2 will not work everytime.

That depends on, where you are look and standing.

The correct way, would to use it like this:

PHP Code:
CMD:getcar(playeridparams[]) { 
  new 
vidFloat:xFloat:yFloat:zFloat:a;
  if(
admin1) return EmTag(playeridYOU_HAVE_NO_PERMISSION); 
  if(
sscanf(params"i"vid)) return UsageTag(playerid"/getcar[ID]"); 
  if(!
IsValidVehicle(vid)) return EmTag(playerid"The specified vehicle ID is invalid!"); 
  
GetPlayerPos(playeridxyz), GetPlayerFacingAngle(playerida);
  
+= 2.0 floatsin(-90.0degrees);
  
+= 2.0 floatcos(-90.0degrees);
  
SetVehiclePos(vidx,y,z-1.0); 
  return 
1

Besides, dont use static like that.
You dont need to reserve continous space...


Anyway the veh should sync better, if it touches the ground.
So set the z Axis a bit down, that should work.
But its a sync Problem...
Reply


Messages In This Thread
Vehicle stuck in the air on SetVehiclePos - by polygxn - 13.03.2019, 21:02
Re: Vehicle stuck in the air on SetVehiclePos - by v1k1nG - 13.03.2019, 21:05
Re: Vehicle stuck in the air on SetVehiclePos - by polygxn - 13.03.2019, 21:07
Re: Vehicle stuck in the air on SetVehiclePos - by v1k1nG - 13.03.2019, 22:34
Re: Vehicle stuck in the air on SetVehiclePos - by polygxn - 13.03.2019, 22:43
Re: Vehicle stuck in the air on SetVehiclePos - by Kaliber - 14.03.2019, 08:28
Re: Vehicle stuck in the air on SetVehiclePos - by raydx - 14.03.2019, 13:49
Re: Vehicle stuck in the air on SetVehiclePos - by antixgaming - 14.03.2019, 14:43

Forum Jump:


Users browsing this thread: 3 Guest(s)