[HELP] Teleport to Player
#1

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
Reply
#2

look at some admin scripts

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

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);
         }
Reply
#4

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 ..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)