/goto Command
#10

maybe this code needs an some thing well try this


Код:
{
	if(IsLogged[playerid] != 1) return SendClientMessage(playerid,-1,"You are not logged in");
	if(dini_Int(pFile(playerid),"AdminLevel") >= 1)
	{
     if(AdminLogin[playerid] != 1) return SendClientMessage(playerid,COLOR_GREY,"Error: You are not logged in as Administrator!");
		new player1;
	    if(sscanf(params, "u", player1)) return
		SendClientMessage(playerid, COLOR_WHITE, "Usage: /goto [PlayerID]") &&
		SendClientMessage(playerid, COLOR_ORANGE, "Function: Will teleport you to a specified player");
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
		{
            	new TeleporterName[MAX_PLAYER_NAME], ToPlayer[MAX_PLAYER_NAME], string3[128], string4[128];
				new Float:tX, Float:tY, Float:tZ;
				GetPlayerPos(player1, tX, tY, tZ);
				GetPlayerName(player1, ToPlayer, sizeof(ToPlayer));
    			        GetPlayerName(playerid, TeleporterName, sizeof(TeleporterName));
				SetPlayerInterior(playerid,GetPlayerInterior(player1));
				format(string3, sizeof(string3), "You have teleported to %s's position.", ToPlayer);
				format(string4, sizeof(string4), "An Admin has Teleported to your position.");
				SendClientMessage(playerid, COLOR_SYSTEM, string3);
				SendClientMessage(player1, COLOR_ORANGE, string4);
				if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
				{
					new VehicleID = GetPlayerVehicleID(playerid);
					SetVehiclePos(VehicleID, tX, tY+2, tZ);
				}
				else
				{
					SetPlayerPos(playerid, tX, tY+2, tZ);
				}
				return 1;
	    }
		else return ErrorMessages(playerid, 2);
	}else return 0;
}
you can edit if you want!
Reply


Messages In This Thread
/goto Command - by DragoA - 28.08.2014, 17:30
Re: /goto Command - by DavidKember - 28.08.2014, 17:33
Re: /goto Command - by Eth - 28.08.2014, 17:34
Re: /goto Command - by DragoA - 28.08.2014, 17:43
Re: /goto Command - by Stinged - 28.08.2014, 17:46
Re: /goto Command - by DragoA - 28.08.2014, 18:45
Re: /goto Command - by Gogeta101 - 28.08.2014, 19:13
Re: /goto Command - by PMH - 28.08.2014, 19:15
Re: /goto Command - by DragoA - 28.08.2014, 19:24
Re: /goto Command - by Tisot - 28.08.2014, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)