/goto command
#2

Код:
    if(AccInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid))
	{
	    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)
		 {
			SendCommandToAdmins(playerid,"Goto");
			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));
			return SendClientMessage(playerid,BlueMsg,string);
		}
Reply


Messages In This Thread
/goto command - by Horatio - 16.05.2012, 16:38
Re: /goto command - by MichaelProPlayer - 16.05.2012, 17:17
Re: /goto command - by [KHK]Khalid - 16.05.2012, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)