Command for tele - 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)
+--- Thread: Command for tele (
/showthread.php?tid=361032)
Command for tele -
bakarihl - 19.07.2012
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
Re: Command for tele -
Matz - 19.07.2012
I didn't understand what you want but do you mean like this?
pawn Код:
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;
}
Re: Command for tele -
Goru - 19.07.2012
If you got zcmd you can do this. do /save for the pos and remove my pos.
Код:
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 ^ ^
Re: Command for tele -
-CaRRoT - 19.07.2012
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
Re: Command for tele -
bakarihl - 19.07.2012
yeah i mean it, thanks it works