28.04.2009, 09:30
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; } |