17.07.2012, 23:06
Try this
Edit:
And if you don't have any output just put prints everywhere to check where action stops
pawn Код:
CMD:creategun(playerid, params[]) {
if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 1)
{
if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 1 && playerVariables[playerid][pFreezeType] == 0 && 0 == playerVariables[playerid][pJobDelay]) {
new str[500+1], tmp[256];
switch(playerVariables[playerid][pJobSkill][0]) {
case 0 .. 10: tmp = "";
case 11 .. 20: tmp = "9mm pistol (250)";
case 21 .. 30: tmp = "9mm Pistol (250)\nSilenced Pistol (300)";
case 31 .. 40: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)";
case 41 .. 50: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)";
case 51 .. 60: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)";
case 61 .. 70: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)";
case 71 .. 80: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)";
case 81 .. 90: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)";
case 91 .. 100: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)\nSniper (2450)";
default: tmp = "9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)\nSniper (2450)\nSPAS12 (2550)\nKevlar Vest (1750)";
}
str = "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n";
strcat(str, tmp);
return ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", str, "Select", "Cancel");
} else return SendClientMessage(playerid, COLOR_GREY, "You must wait your reload time (5 minutes).");
} else return SendClientMessage(playerid, COLOR_GREY, "You can't do this while cuffed, tazed, or frozen.");
}
And if you don't have any output just put prints everywhere to check where action stops