02.06.2013, 02:04
Alright... So I have another problem. So... the command works and all, but the titles aren't working. So say I am developer level 4, which is lead developer, I have junior developer? Anyone know why this would be? This is my code.
Код:
CMD:sc(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pDev]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sc [text]"); if(AntiAdv(playerid, params)) return 1; if(PlayerInfo[playerid][pHelper] > PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPHLN(playerid), RPN(playerid), params); if(PlayerInfo[playerid][pDev] > PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPDLN(playerid), RPN(playerid), params); else if(PlayerInfo[playerid][pAdmin] > PlayerInfo[playerid][pHelper])format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPALN(playerid), RPN(playerid), params); foreach(Player, i) { if(IsPlayerLoggedIn(i)) { if(PlayerInfo[i][pHelper] || PlayerInfo[i][pAdmin] || PlayerInfo[i][pDev]) { SendClientMessage(i, COLOR_PURPLE, string); } } } // Logs if(PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: %s", RPHLN(playerid), RPN(playerid), params); if(PlayerInfo[playerid][pDev] && PlayerInfo[playerid][pDev]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPDLN(playerid), RPN(playerid), params); else if(!PlayerInfo[playerid][pHelper] && PlayerInfo[playerid][pAdmin])format(string, sizeof(string), "*%s %s: %s", RPALN(playerid), RPN(playerid), params); Log("logs/helperchat.log", string); return 1; }