06.06.2016, 10:53
Код:
ALTCOMMAND:aduty->adminduty; COMMAND:adminduty(playerid, params[]) { new Text3D:test = Create3DTextLabel("ADMIN DUTY", 0x00BFFFAA, 30.0, 40.0, 50.0, 40.0, 0); //Put this at the top. if(PlayerInfo[playerid][pAdminlevel] > 0) { if(GetPVarInt(playerid, "StaffLogin") == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You must be logged into the staff panel to access administration commands. (/stafflogin)"); switch(GetPVarInt(playerid, "AdminDuty")) { case 0: { new msg[90]; SetPlayerColor(playerid, 0x4e6c8200); SetPVarInt(playerid, "AdminDuty", 1); Attach3DTextLabelToPlayer(test, playerid, 0.0, 0.0, 0.7); // And put this where you want. format(msg, sizeof(msg), "*** %s %s is now on duty as an administrator.", GetAdminRank(playerid), GetNameWithSpace(playerid)); AdminMessageLog(msg, playerid, "Admin Duty"); } default: { new msg[90]; Delete3DTextLabel(test); SetPVarInt(playerid, "AdminDuty", 0); UpdatePlayerColor(playerid); format(msg, sizeof(msg), "*** %s %s is now off duty as an administrator.", GetAdminRank(playerid), GetNameWithSpace(playerid)); AdminMessageLog(msg, playerid, "Admin Duty"); } } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You are not authorized to use this command."); } return 1; }