29.06.2012, 04:46
i dont know if you want it for admin or not but here
And put this one top
Код:
if(strcmp(cmd, "/god", true) == 0) { GetPlayerName(playerid, AdminName, sizeof(playername)); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) { if(PlayerInfo[playerid][pAOnDuty] == 0) { SetPlayerColor(playerid, COLOR_LIGHTBLUE); PlayerInfo[playerid][pAOnDuty] = 1; SendClientMessage(playerid, COLOR_GRAD2, "You are now on-duty as an admin, Please do your best!."); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); format(string, sizeof(string), "%s is now on-duty as an admin.", AdminName); SendClientMessageToAll(COLOR_YELLOW, string); return 1; } else { SetPlayerColor(playerid, COLOR_INVIS); PlayerInfo[playerid][pAOnDuty] = 0; SendClientMessage(playerid, COLOR_GRAD2, "You are not longer on-duty as admin, notice to /reports please!."); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); format(string, sizeof(string), "%s is no longer on-duty as admin.", AdminName); SendClientMessageToAll(COLOR_YELLOW, string); return 1; } } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } } return 1; }
Код:
new AdminName[MAX_PLAYER_NAME];