09.12.2014, 13:42
Hello guys.
Well I have a problem here..
Recently I tried to change so the lowest admin could too access /a(dmin), the admin chat. But well.. He can write in the chat but not see it.
Before I changed the code
And when I changed it...
So my question is if you can see the problem?
Thanks for all help I can get.
Well I have a problem here..
Recently I tried to change so the lowest admin could too access /a(dmin), the admin chat. But well.. He can write in the chat but not see it.
Before I changed the code
Код:
CMD:admin(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) { if(!isnull(params)) { new szMessage[128]; if(PlayerInfo[playerid][pAdmin] == 1) format(szMessage, sizeof(szMessage), "[Admin Chat]Server Moderator %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 2) format(szMessage, sizeof(szMessage), "[Admin Chat]{808000}[Junior Admin]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 3) format(szMessage, sizeof(szMessage), "[Admin Chat]{008080}[General Admin]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 4) format(szMessage, sizeof(szMessage), "[Admin Chat]{FFFF00}[Senior Admin]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 1337) format(szMessage, sizeof(szMessage), "[Admin Chat]{FF00FF}[Head Admin]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 1338) format(szMessage, sizeof(szMessage), "[Admin Chat]{FF0000}[Admin Director]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 99998) format(szMessage, sizeof(szMessage), "[Admin Chat]{00FFFF}[Community Manager]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 99999) format(szMessage, sizeof(szMessage), "[Admin Chat]{00FF00}[Community Owner]{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else format(szMessage, sizeof(szMessage), "* Undefined Admin (%i) %s: %s", PlayerInfo[playerid][pAdmin], GetPlayerNameEx(playerid), params); SendAdminMessage(COLOR_GREEN, szMessage); Log("logs/adminchat.log", szMessage); } else SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/a)dmin [admin chat]"); } return 1; }
Код:
CMD:admin(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1) { if(!isnull(params)) { new szMessage[128]; if(PlayerInfo[playerid][pAdmin] == 1) format(szMessage, sizeof(szMessage), "[Admin Chat]{FFFFAA}Trial Admin{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 2) format(szMessage, sizeof(szMessage), "[Admin Chat]{008080} Junior Admin{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 3) format(szMessage, sizeof(szMessage), "[Admin Chat]{008080} General Admin{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 4) format(szMessage, sizeof(szMessage), "[Admin Chat]{FFFF00} Senior Admin{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 1337) format(szMessage, sizeof(szMessage), "[Admin Chat]{FF0000} Head Admin{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 1338) format(szMessage, sizeof(szMessage), "[Admin Chat]{FF0000} Developer{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 99998) format(szMessage, sizeof(szMessage), "[Admin Chat]{00FFFF} Community Manager{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else if(PlayerInfo[playerid][pAdmin] == 99999) format(szMessage, sizeof(szMessage), "[Admin Chat]{00FFFF} Community Owner{FFFFFF} %s: %s", GetPlayerNameEx(playerid), params); else format(szMessage, sizeof(szMessage), "* Undefined Admin (%i) %s: %s", PlayerInfo[playerid][pAdmin], GetPlayerNameEx(playerid), params); SendAdminMessage(COLOR_GREEN, szMessage); Log("logs/adminchat.log", szMessage); } else SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/a)dmin [admin chat]"); } return 1; }
Thanks for all help I can get.