Vehicle teleport help
#1

I need some help with getting the players who are at the
Код:
 if(VehicleToPoint(1.0,playerid,1818.0632,-1536.7803,13.3585))
to get to the other point with writing /penter
The only error is when i compile it says its a undefined symbol
Код:
 	if(strcmp(cmd, "/penter", true) == 0 || strcmp(cmd, "/patun", true) == 0)
 	{
	  if(PlayerInfo[playerid][pJob] == 7)
		{
		  if(GetPlayerState(playerid) == 1)
		  {
		      if(VehicleToPoint(1.0,playerid,1818.0632,-1536.7803,13.3585))
		      {
					  SetVehiclePos(GetPlayerVehicleID(playerid), 1826.6522,-1538.7426,13.5469);
		      	SetPlayerPos(playerid, 1826.6522,-1538.7426,13.5469);
					}
		    }
		  }
		return 1;
 	}
C:\Users\GuSo\Desktop\test.pwn(23750) : error 017: undefined symbol "VehicleToPoint"
Could anybody fix the command ?
Reply
#2

What do you want to effect with "VehicleToPoint"?
Reply
#3

Oh sorry, i want that people who are in a vehicle and is at the Vehicletopoint to teleport them(player and car) to " SetVehiclePos(GetPlayerVehicleID(playerid), 1826.6522,-1538.7426,13.5469); "
( Its a gate that they enter RPly )
Reply
#4

Use IsPlayerInRangeOfPoint. Like this:

pawn Код:
new Float:vX, Float:vY, Float:vZ;
GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ);

if(IsPlayerInRangeOfPoint(*some ID*, 1.0, vX, vY, vZ)) //Do Something;
Cheers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)