Teleport WITH a vehicle
#1

Hello..
I made a script..

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/enter", cmdtext, true, 10) == 0)
	{
	  if(IsPlayerInRangeOfPoint(playerid,2.0,135.2182,1950.1426,19.3887))
		{
	  GetPlayerVehicleID(playerid);
	  SetPlayerPos(playerid,134.6227,1934.9200,19.2617);
		}
		return 1;
	}
	if (strcmp("/exit", cmdtext, true, 10) == 0)
	{
	  if(IsPlayerInRangeOfPoint(playerid,2.0,134.6227,1934.9200,19.2617))
	  {
	  GetPlayerVehicleID(playerid);
	  SetPlayerPos(playerid,135.2182,1950.1426,19.3887);
	  SetTimerEx("omgomg",1000,false,"i",4);
	  }
	  return 1;
	}
	if (strcmp("/tp", cmdtext, true, 10) == 0)
	{
	  GetPlayerVehicleID(playerid);
	  SetPlayerPos(playerid,135.2182,1950.1426,19.3887);
    SetTimerEx("omgomg",1000,false,"i",4);
	  return 1;
	}
	return 0;
}
public omgomg(playerid, vehicleid)
{
	PutPlayerInVehicle(playerid, vehicleid, 0);
	return 1;
}
It works alright, but this is what I want..
If the player is in a vehicle then he'll teleport to the place with his old vehicle, not leaving it there and tp there on foot.
The script needs to check in wich vehicle he is and then put him in it, but I can't do it.
Could any of you tell me how to do it?
Thank you!
Reply


Messages In This Thread
Teleport WITH a vehicle - by Pawno_Master - 21.04.2010, 05:09
Re: Teleport WITH a vehicle - by Goobiiify - 21.04.2010, 05:23
Re: Teleport WITH a vehicle - by fishnutslol - 21.04.2010, 05:32
Re: Teleport WITH a vehicle - by Pawno_Master - 21.04.2010, 05:47
Re: Teleport WITH a vehicle - by Pawno_Master - 21.04.2010, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)