SA-MP Forums Archive
[HELP] Teleport to Player - 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: [HELP] Teleport to Player (/showthread.php?tid=173427)



[HELP] Teleport to Player - [HLF]Kolpacino - 02.09.2010

Hi, i'm trying to make a teleport command but i'm not good with scirpts including playerid's like /goto # /get# etc

so can somebody show or make one for me ? lol


Re: [HELP] Teleport to Player - WillyP - 02.09.2010

look at some admin scripts

This forum requires that you wait 120 seconds between posts. Please try again in 65 seconds.
fuc anti spam


Re: [HELP] Teleport to Player - rbN. - 02.09.2010

pawn Код:
if(!strlen(params)) return
        SendClientMessage(playerid, LIGHTBLUE2, "Usage: /goto [PlayerID]") &&
        SendClientMessage(playerid, orange, "Function: Will Go to specified player");
        new player1;
        new string[128];
        if(!IsNumeric(params))
        player1 = ReturnPlayerID(params);
        else player1 = strval(params);
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
         {
            new Float:x, Float:y, Float:z;  GetPlayerPos(player1,x,y,z);
            SetPlayerInterior(playerid,GetPlayerInterior(player1));
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
            if(GetPlayerState(playerid) == 2)
            {
            SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);
            LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
            SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
            }
            else SetPlayerPos(playerid,x+2,y,z);
            format(string,sizeof(string),"== You have teleported to \"%s\" ", pName(player1));
            SendClientMessage(playerid,BlueMsg,string);
            format(string,sizeof(string),"== \"%s\" has teleported to you. ", pName(playerid));
            SendClientMessage(player1,BlueMsg,string);
         }



Re: [HELP] Teleport to Player - [HLF]Kolpacino - 02.09.2010

Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
pawn Код:
if(!strlen(params)) return
        SendClientMessage(playerid, LIGHTBLUE2, "Usage: /goto [PlayerID]") &&
        SendClientMessage(playerid, orange, "Function: Will Go to specified player");
        new player1;
        new string[128];
        if(!IsNumeric(params))
        player1 = ReturnPlayerID(params);
        else player1 = strval(params);
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
         {
            new Float:x, Float:y, Float:z;  GetPlayerPos(player1,x,y,z);
            SetPlayerInterior(playerid,GetPlayerInterior(player1));
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
            if(GetPlayerState(playerid) == 2)
            {
            SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);
            LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
            SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
            }
            else SetPlayerPos(playerid,x+2,y,z);
            format(string,sizeof(string),"== You have teleported to \"%s\" ", pName(player1));
            SendClientMessage(playerid,BlueMsg,string);
            format(string,sizeof(string),"== \"%s\" has teleported to you. ", pName(playerid));
            SendClientMessage(player1,BlueMsg,string);
         }
thanks but is there a smaller script to use coz it looks like to complicated to me plus i dont know where to put this ..