11.05.2009, 05:31
I have the following things.
In addition to this CMD,I want an /admins CMD.
Like,if the player types /admins,if the admin is on-duty he will see like " Admin-FreeSoul-3-On Duty" with the color green.Like Admin-PlayerName-AdminLevel-OnDuty.
And if the admin is not on duty he will se like Admin-FreeSoul-3-OffDuty with red.
Can somebody help me with this?
It usually use [pAdmin]
Thanks.
Quote:
//----------------AOD --------------------------------// if(strcmp(cmd, "/adminonduty", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(playerid,99999); SetPlayerArmour(playerid,100); format(string, sizeof(string), "[Info] %s is now on duty as an admin. ", sendername); SendClientMessageToAll(COLOR_BLUE, string); SetPlayerColor(playerid, COLOR_YELLOW2); // return 1; } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !"); } } return 1; } //----------------AOF // --------------------------------// if(strcmp(cmd, "/adminoffduty", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,0); format(string, sizeof(string), "[Info] %s is no longer on duty as an admin.", sendername); SendClientMessageToAll(COLOR_YELLOW2, string); return 1; } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !"); } } return 1; } |
Like,if the player types /admins,if the admin is on-duty he will see like " Admin-FreeSoul-3-On Duty" with the color green.Like Admin-PlayerName-AdminLevel-OnDuty.
And if the admin is not on duty he will se like Admin-FreeSoul-3-OffDuty with red.
Can somebody help me with this?
It usually use [pAdmin]
Thanks.