Cant Make A Only Admin Command
#3

Quote:
Originally Posted by Ettans
Here, this will work for only RCON administrators:

Код:
if (strcmp(cmdtext, "/ap2", true)==0)
{
    if(DMArena[playerid] == 1)
			return SendClientMessage(playerid, RED, "You are not allowed to teleport while DeathMatching!");
		if(!IsPlayerAdmin(playerid))
			return SendClientMessage(playerid, RED, "You are not an admin!");
		
		new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		IsPlayerAdmin(playerid);
		
		format(string, sizeof(string), "%s warped to Los Santos' Airport ! ( /ap2 )", player);
		SendClientMessageToAll(YELLOW, string);
    GameTextForPlayer(playerid, "~y~Welcome to the 2nd Airport !", 3000,6);
		
		if(State!=PLAYER_STATE_DRIVER)
 		{
			SetPlayerPos(playerid,1398.4218,-2420.0742,13.2148);
			SetPlayerFacingAngle(playerid,263);
		}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{
			SetVehiclePos(cartype,1398.4218,-2420.0742,13.2148);
			SetVehicleZAngle(cartype,78.1831);
		}
		else
		{
			SetPlayerPos(playerid,1398.4218,-2420.0742,13.2148);SetPlayerFacingAngle(playerid,263);
		}
		return 1;
}
yeah thanks it works! ty Ettans
Reply


Messages In This Thread
Cant Make A Only Admin Command - by luckie12 - 28.04.2009, 09:09
Re: Cant Make A Only Admin Command - by ettans - 28.04.2009, 09:20
Re: Cant Make A Only Admin Command - by luckie12 - 28.04.2009, 09:30

Forum Jump:


Users browsing this thread: 3 Guest(s)