13.10.2012, 20:51
I want a arms dealer job whereby when you make 50 weapons you level up how could i do it so its saves as a jobskill thing here my code.
PHP код:
command(creategun, playerid, params[])
{
if(Jobs[Player[playerid][Job]][JobType] == 1)
{
if(Player[playerid][PrisonDuration] >= 1 || Player[playerid][Cuffed] >= 1 || Player[playerid][Tazed] >= 1)
{
SendClientMessage(playerid, WHITE, "You cannot do this right now.");
}
else
{
switch(
{
case 0 .. 49: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)","Select", "Cancel");
case 50 .. 99: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm pistol (250)","Select", "Cancel");
case 100 .. 149: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)","Select", "Cancel");
case 150 .. 199: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)","Select", "Cancel");
case 200 .. 249: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)","Select", "Cancel");
case 250 .. 299: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)","Select", "Cancel");
case 300 .. 349: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)","Select", "Cancel");
case 350 .. 399: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)","Select", "Cancel");
case 400 .. 449: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)","Select", "Cancel");
case 450 .. 499: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)\nSniper (2450)","Select", "Cancel");
default: ShowPlayerDialog(playerid, DIALOG_CREATEGUN, DIALOG_STYLE_LIST, "Weapon Selection", "Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm 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)","Select", "Cancel");
}
}
else SendClientMessage(playerid, COLOR_GREY, "You must wait your reload time (30 seconds).");
}
else SendClientMessage(playerid, COLOR_GREY, "You can't do this while cuffed, tazed, or frozen.");
}
return 1;
}