SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/07/2012, 07:57 PM   #1
bakarihl
Little Clucker
 
Join Date: Apr 2012
Posts: 49
Reputation: 2
Default Command for tele

Hey all i need help, i want to add command like /tp what will means teleport to specifed location, like when admin/player type /tp he will be teleported to island without road etc...can anyone give this command please
__________________
bakarihl is offline   Reply With Quote
Old 19/07/2012, 08:08 PM   #2
Matz
Big Clucker
 
Matz's Avatar
 
Join Date: Apr 2011
Location: Istanbul
Posts: 162
Reputation: 84
Default Re: Command for tele

I didn't understand what you want but do you mean like this?

pawn Code:
if (strcmp("/TpTower", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid,100,200,300);
        SetPlayerInterior(playerid,0);
        SetPlayerVirtualWorld(playerid,0);
        SendClientMessage(playerid,-1,"You have been teleported.");
        return 1;
    }
__________________
Matz is offline   Reply With Quote
Old 19/07/2012, 08:10 PM   #3
Goru
Big Clucker
 
Join Date: May 2012
Posts: 86
Reputation: 0
Default Re: Command for tele

If you got zcmd you can do this. do /save for the pos and remove my pos.

Code:
CMD:gotols(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		if (GetPlayerState(playerid) == 2)
		{
			SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3);
		}
		else
		{
			SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
		}
		SCM(playerid, COLOR_ORANGE, "You have been teleported.");
		SetPlayerInterior(playerid,0);
		PlayerInfo[playerid][pLocal] = 0;
		SetPlayerVirtualWorld(playerid, 0);
	}
	return 1;
}

This is to City Hall ^ ^
Goru is offline   Reply With Quote
Old 19/07/2012, 08:12 PM   #4
-CaRRoT
High-roller
 
-CaRRoT's Avatar
 
Join Date: Jul 2011
Location: CA, Los Angeles.
Posts: 1,237
Reputation: 291
Default Re: Command for tele

Too lazy to do it ? - Just do /save and get the first 3 Co-ordinates.. And then replace

Quote:
SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3);
and


Quote:
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
with your new co-ordinates
-CaRRoT is offline   Reply With Quote
Old 19/07/2012, 08:28 PM   #5
bakarihl
Little Clucker
 
Join Date: Apr 2012
Posts: 49
Reputation: 2
Default Re: Command for tele

yeah i mean it, thanks it works
__________________
bakarihl is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tele command Georgelopez1 Help Archive 3 10/10/2010 05:52 AM
[need help] my tele bobintom Help Archive 0 22/08/2010 02:10 PM
how to tele with cars in tele dialog? Sampiscool123 Help Archive 9 31/01/2010 07:35 PM
tele help TouR Help Archive 2 09/12/2009 04:47 PM
Tele And Command XxerykxX Help Archive 9 02/09/2009 02:18 PM


All times are GMT. The time now is 06:23 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.