Posts: 8
Threads: 2
Joined: Aug 2010
Reputation:
0
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
Posts: 2,027
Threads: 139
Joined: Jul 2010
Reputation:
0
look at some admin scripts
This forum requires that you wait 120 seconds between posts. Please try again in 65 seconds.
fuc anti spam
Posts: 1,079
Threads: 64
Joined: Jan 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);
}