How can i add teleports
#1

Hi people. I want to add more teleports in my server. See example from my teleports script:

Код:
//--------------------------------------------TELEPORT cardealer
    	if(strcmp(cmdtext, "/cardealer", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,-1974.2872,270.7369,35.1719);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,-1974.2872,270.7369,35.1719);
		SetVehicleZAngle(cartype,359.7314);}
		else
		{SetPlayerPos(playerid,-1974.2872,270.7369,35.1719);}
 		GameTextForPlayer(playerid,"Welcome to Car Dealer",2500,3);}
    	return 1;}
I know how to add more teleports but don't know from where i can get coordinats like "-1974.2872,270.7369,35.1719" for the new place? Can you help me with this?
Reply
#2

Go in game and do /save. It will give you a coordinate of the place you were standing and typed the cmd. Copy it from the SavedCoordinates.txt in the place you installed SAMP.
Reply
#3

Thanks Adill! I will try this.
Reply
#4

The file is savedpositions.txt and is situated in My Documents/GTA San Andreas User Files/SAMP.
Thank you man!
Reply
#5

Go ingame, type /save then go into the same directory as your screenshots and find savedpositions.txt or whatever it is called. Your documents -> GTA San Andreas User Files -> Samp. Take the first 3 sets of numbers with a dot in them for the SetPlayer(Vehicle)pos and the fourth value with a dot for the angle.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)