28.02.2014, 21:48
Hello I have this code below and I was wondering how can I make it work with my server admin system instead of using rcon commands? my gamemode is ppc_trucking
Код:
dcmd_base(playerid,params[]){ #pragma unused params if(IsPlayerAdmin(playerid))SetPlayerPos(playerid,2862.26147461,-2053.75903320,12.0); return 1;} dcmd_defence(playerid,params[]){ if(IsPlayerAdmin(playerid)){ new mode; if(!strlen(params)){ SendClientMessage(playerid, 0xFFFF00AA, "Z_ADMIN ISLAND: Use /defencemode [0 - 1 - 2 - 3]"); return 1;} mode = strval(params); DEFENCE_MODE=mode; if(DEFENCE_MODE<0 && DEFENCE_MODE>3){ SendClientMessage(playerid,0xF60000AA,"Z_ADMIN ISLAND: INVALID CODE! You must choose one of these codes: '0,1,2,3'"); DEFENCE_MODE=1;} KillTimer(AdvMissleTimer); Followed=MAX_SERVER_PLAYERS+1; KillTimer(StopMissleTimer); KillTimer(TimerMissles2); KillTimer(AdvMissleTimer); DestroyObject(AdvMissle); IsSamAiming=false; SamAiming=MAX_SERVER_PLAYERS+1; for(new i=0;i<MAX_SERVER_PLAYERS;i++)IsSamTimerAimingOn[i]=false; if(DEFENCE_MODE==0)SendClientMessage(playerid,0x81F628AA,"Z_ADMIN ISLAND: Defence mode set to '0': No Defence (defence disabled)"); if(DEFENCE_MODE==1)SendClientMessage(playerid,0x81F628AA,"Z_ADMIN ISLAND: Defence mode set to '1': Auto-Kill"); if(DEFENCE_MODE==2)SendClientMessage(playerid,0x81F628AA,"Z_ADMIN ISLAND: Defence mode set to '2': Straight Missle Throwing"); if(DEFENCE_MODE==3)SendClientMessage(playerid,0x81F628AA,"Z_ADMIN ISLAND: Defence mode set to '3': Following Missles Throwing (advanced)");} return 1;}