SA-MP Forums Archive
Teleports. - 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: Teleports. (/showthread.php?tid=73503)



Teleports. - [AG]_Just - 15.04.2009

Hello everybody.
I have a question about teleports..
How to make it?

Please answer someone


Re: Teleports. - brett7 - 15.04.2009

you should try searching
pawn Код:
if(strcmp(cmdtext, "/teleport", true)==0)
{
 new vehicleid = GetPlayerVehicleID(playerid);
 new State = GetPlayerState(playerid);
 if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 {
  return SetVehiclePos(vehicleid,00.00,00.00,00.00), //cords
  GameTextForPlayer(playerid, "~w~Welcome to place!", 5000, 5); // Will says if you have teleported
 }
 SetPlayerPos(playerid,00.00,00.00,00.00); //cords
 GameTextForPlayer(playerid, "~w~Welcome to place!", 5000, 5); // Will says if you have teleported
return 1;
}
here is a good explanation by matuu which takes the vehicle with you