07.06.2013, 16:39
-
It's been awhile since I've made a thread in here, but I need some assistance. It isn't the fact I get errors it's just simply, it doesn't appear in-game.
That's is the administration login text.
This is ARankC
I'm trying to make it whenever you join the server instead of identifying it but amount of numbers, it simply says the administration name. I don't want to make multiply
-
So anyway of making this alot more shorter?
It's been awhile since I've made a thread in here, but I need some assistance. It isn't the fact I get errors it's just simply, it doesn't appear in-game.
That's is the administration login text.
Код:
if (PlayerInfo[playerid][pAdmin] > 0) { if(PlayerInfo[playerid][pAdmin] == 1) { SendClientMessageEx(playerid, COLOR_WHITE,"SERVER: You are logged in as a Moderator."); } else { format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin],ARankC(playerid)); SendClientMessageEx(playerid, COLOR_WHITE,string2); } if(PlayerInfo[playerid][pAdmin] == 1) { format( string2, sizeof( string2 ), "SERVER: %s has logged in as a Moderator.", GetPlayerNameEx( playerid )); } else { format( string2, sizeof( string2 ), "SERVER: %s has logged in as a Level %d Admin.",GetPlayerNameEx( playerid ),PlayerInfo[playerid][pAdmin],ARankC(playerid)); } foreach(Player, i) { if( PlayerInfo[i][pAdmin] >= 1337 ) { if(PlayerInfo[i][pAdmin] >= PlayerInfo[playerid][pAdmin]) SendClientMessageEx(i, COLOR_WHITE, string2); } } }
Код:
stock ARankC(playerid) { new rank[32]; if(PlayerInfo[playerid][pHelper] == 2) format(rank, sizeof(rank), "Community Advisor"); else if(PlayerInfo[playerid][pHelper] == 3) format(rank, sizeof(rank), "Senior Advisor"); else if(PlayerInfo[playerid][pHelper] == 4) format(rank, sizeof(rank), "Chief Advisor"); else if(PlayerInfo[playerid][pAdmin] == 1) format(rank, sizeof(rank), "{C85A17}[Server Moderator]"); else if(PlayerInfo[playerid][pAdmin] == 2) format(rank, sizeof(rank), "{808000}[Junior Admin]"); else if(PlayerInfo[playerid][pAdmin] == 3) format(rank, sizeof(rank), "{008080}[General Admin]"); else if(PlayerInfo[playerid][pAdmin] == 4) format(rank, sizeof(rank), "{FFFF00}[Senior Admin]"); else if(PlayerInfo[playerid][pAdmin] == 1337) format(rank, sizeof(rank), "{FF030D}[Head Admin]"); else if(PlayerInfo[playerid][pAdmin] == 1338) format(rank, sizeof(rank), "{FF0000}[Admin Director]"); else if(PlayerInfo[playerid][pAdmin] == 99998) format(rank, sizeof(rank), "{00FFFF}[Community Manager]"); else if(PlayerInfo[playerid][pAdmin] == 99999) format(rank, sizeof(rank), "{00FF00}[Community Owner]"); else format(rank, sizeof(rank), "{FFFFFF}Undefined Admin (%d)", PlayerInfo[playerid][pAdmin]); return rank; }
Код:
if (PlayerInfo[playerid][pAdmin] > 0) { if(PlayerInfo[playerid][pAdmin] == 1) { SendClientMessageEx(playerid, COLOR_WHITE,"SERVER: You are logged in as a Moderator."); } else { format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin],ARankC(playerid)); SendClientMessageEx(playerid, COLOR_WHITE,string2); }
So anyway of making this alot more shorter?