09.11.2013, 13:16
(
Последний раз редактировалось Battlezone; 09.11.2013 в 13:24.
Причина: Wrong code
)
Hi, i have made a simple system that tells you if a class is unlocked or not when you want to select your player class ( unlocked by score)
But when i compile, my pawno freezes and it doesnt respond, so i have to kill its process :/ and run it again..
Help please.
Код:
// this is on the top new AvailableSniper[MAX_PLAYERS] [128]; new AvailableAssault[MAX_PLAYERS] [128]; new AvailablePilot[MAX_PLAYERS] [128]; new AvailableEngineer[MAX_PLAYERS] [128]; new AvailableJet[MAX_PLAYERS] [128]; new AvailableSupport[MAX_PLAYERS] [128]; new AvailableScout[MAX_PLAYERS] [128]; new AvailableSpy[MAX_PLAYERS] [128]; new AvailableDonor[MAX_PLAYERS] [128]; // this is when the player gets class selection dialog if (PlayerInfo[playerid][Rank] == 1 || PlayerInfo[playerid][Rank] == 2 ||PlayerInfo[playerid][Rank] == 3 || PlayerInfo[playerid][Rank] == 4 ) { AvailableSniper[playerid] = "Unlocked"; AvailableAssault[playerid] = "Unlocked"; AvailablePilot[playerid] = "Locked"; AvailableJet[playerid] = "Locked"; AvailableEngineer[playerid] = "Locked"; AvailableSupport[playerid] = "Locked"; AvailableScout[playerid] = "Locked"; AvailableSpy[playerid] = "Locked"; } if (PlayerInfo[playerid][Rank] == 5) { AvailableSniper[playerid] = "Unlocked"; AvailableAssault[playerid] = "Unlocked"; AvailablePilot[playerid] = "Unlocked"; AvailableJet[playerid] = "Unlocked"; AvailableEngineer[playerid] = "Locked"; AvailableSupport[playerid] = "Locked"; AvailableScout[playerid] = "Locked"; AvailableSpy[playerid] = "Locked"; } if (PlayerInfo[playerid][Rank] == 6) { AvailableSniper[playerid] = "Unlocked"; AvailableAssault[playerid] = "Unlocked"; AvailablePilot[playerid] = "Unlocked"; AvailableJet[playerid] = "Unlocked"; AvailableEngineer[playerid] = "Unlocked"; AvailableSupport[playerid] = "Unlocked"; AvailableScout[playerid] = "Unlocked"; AvailableSpy[playerid] = "Locked"; } if (PlayerInfo[playerid][Rank] == 7 ) { AvailableSpy[playerid] = "Unlocked"; AvailableSniper[playerid] = "Unlocked"; AvailableAssault[playerid] = "Unlocked"; AvailablePilot[playerid] = "Unlocked"; AvailableJet[playerid] = "Unlocked"; AvailableEngineer[playerid] = "Unlocked"; AvailableSupport[playerid] = "Unlocked"; AvailableScout[playerid] = "Unlocked"; } new String[200]; format(String, sizeof(String),""ccolor"Assault - "ccolor2"Rank 0 (%s)\n"ccolor"Sniper - "ccolor2"Rank 0 (%s)\n"ccolor"Pilot - "ccolor2"Rank 6 (%s)\n"ccolor"Engineer - "ccolor2"Rank 5 (%s)\n"ccolor"JetTrooper - "ccolor2"Rank 6 (%s)\n"ccolor"Support - "ccolor2"Rank 5 (%s)\n"ccolor"Scout - "ccolor2"Rank 5 (%s)\n"ccolor"Spy - "ccolor2"Rank 7 (%s)\n"ccolor"Donor - "ccolor2"For Donators only \n"ccolor"Civilian",AvailableSniper[playerid],AvailableAssault[playerid], AvailablePilot[playerid], AvailableJet[playerid] , AvailableEngineer[playerid], AvailableSupport[playerid], AvailableScout[playerid], AvailableSpy[playerid]) ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST, "Class Selection",String,"Select","Back");
Help please.