07.10.2012, 21:30
I have 2 bugs here..
+rep to anyone who can help!
1st bug:
Whenever I set myself to a different faction type, I.E. faction type 2 it always shows faction type 1 CMD's
code:
I snipped it out of my /help since it was a big code, but whenever I set myself to fac type 2 through my .ini file, cmd's, etc it doesnt show the government it still shows law enforcement
2nd bug:
whenever I do /gov it always says 'undefined'
Code:
some of my /gov cmd where the ranks are a post to appear
+rep to anyone who can help!
1st bug:
Whenever I set myself to a different faction type, I.E. faction type 2 it always shows faction type 1 CMD's
code:
Quote:
if(arrFaction[playerid][p_iMember] > -1 && arrFaction[playerid][g_iFactionType] == 1) { SendClientMessage(playerid, COLOR_BLUE, "*** LAW ENFORCEMENT *** /breathalizer - /fingerprint - /m[egaphone] - /su - /arrest - /tow - /untow"); SendClientMessage(playerid, COLOR_BLUE, "*** LAW ENFORCEMENT *** /searchtruck - /cleartruck - /cuff - /uncuff - givedl - /revokedl - /mdc - /gov"); } if(arrFaction[playerid][p_iMember] > -1 && arrFaction[playerid][g_iFactionType] == 2) { SendClientMessage(playerid, COLOR_GREY, "*** GOVERNMENT *** /mdc "); } |
2nd bug:
whenever I do /gov it always says 'undefined'
Code:
Quote:
FactionRanks_ReturnType(iFac) { new szName[32] = "Undefined"; switch(arrFaction[iFac][p_iRanks]) { case 1: szName = "Cadet"; case 2: szName = "Officer"; case 3: szName = "Senior Officer"; case 4: szName = "Corporal"; case 5: szName = "Head Corporal"; case 6: szName = "Sergeant"; case 7: szName = "Senior Sergeant"; case 8: szName = "Lieutentant"; case 9: szName = "Captain"; case 10: szName = "Head Captain"; case 11: szName = "Assistant Chief"; case 12: szName = "Chief"; } return szName; } |
Quote:
if(arrFaction[playerid][p_iMember] > 11 && arrFaction[playerid][g_iFactionType] == 1) { if(arrFaction[playerid][p_iMember] == 12) { format(string, sizeof(string), "** %s %s: %s **", FactionRanks_ReturnType(playerid), GetPlayerNameEx(playerid), params); SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|"); SendClientMessageToAll(COLOR_DBLUE, string); } else if(arrFaction[playerid][p_iMember] == 11) { format(string, sizeof(string), "** %s %s: %s **", FactionRanks_ReturnType(playerid), GetPlayerNameEx(playerid), params); SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|"); SendClientMessageToAll(COLOR_DBLUE, string); } else { SendClientMessageEx(playerid, COLOR_WHITE, "You are not a high enough rank to use this!"); } } |