server scripts problme
#4

// INCLUDES //
#include <a_samp>


// COLORS //
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA


/////////// Weapon prices ////////////

// INSTRUCTIONS :
// Change the 0 to the amount you want the weapon to be sold
// V = Weapon Price
// A = Weapon amount on buy

// Melee Weapons
#define VBrassKnuckles 2000
#define ABrassKnuckles 0
#define VGolfclub 2500
#define AGolfclub 0
#define VNiteStick 2500
#define ANiteStick 0
#define VKnife 4000
#define AKnife 0
#define VBaseballBat 2500
#define ABaseballBat 0
#define VShovel 3000
#define AShovel 0
#define VPoolCue 3000
#define APoolCue 0
#define VKatana 9000
#define AKatana 0
#define VChainsaw 10000
#define AChainsaw 0
#define VPurpleDildo 2000
#define APurpleDildo 0
#define VSmallWhiteVibrator 2000
#define ASmallWhiteVibrator 0
#define VLargeWhiteVibrator 2000
#define ALargeWhiteVibrator 0
#define VSilverVibrator 2000
#define ASilverVibrator 0
#define VFlower 2500
#define AFlower 0
#define VCane 2000
#define ACane 0

// Thrown Weapons
#define VGrenade 15000
#define AGrenade 10
#define VTearGas 10000
#define ATearGas 10
#define VMolotovCocktail 20000
#define AMolotovCocktail 15

// Pistols
#define V9mm 5000
#define A9mm 100
#define VSilenced9mm 6000
#define ASilenced9mm 150
#define VDesertEagle 30000
#define ADesertEagle 150

// Shotguns
#define VShotgun 5000
#define AShotgun 15
#define VSawn-offShotgun 30000
#define ASawn-offShotgun 50
#define VCombatShotgun 20000
#define ACombatShotgun 100

// SMG's
#define VSMG 9000
#define ASMG 200
#define VUZI 9000
#define AUZI 200
#define VTec-9 9000
#define ATec-9 100

// Rifles
#define VAK-47 15000
#define AAK-47 80
#define VM4 50000
#define AM4 250
#define VCountryRifle 10000
#define ACountryRifle 100
#define VSniperRifle 60000
#define ASniperRifle 30

// Special
#define VRocketLauncher 100000
#define ARocketLauncher 15
#define VHeatSeekingRocketLauncher 1000000
#define AHeatSeekingRocketLauncher 50
#define VFlamethrower 9000
#define AFlamethrower 500
#define VMini-gun 1000000
#define AMini-gun 300
#define VSatchelChargeandDetonator 20000
#define ASatchelChargeandDetonator 20

// Extras
#define VSprayCan 2000
#define ASprayCan 200
#define VFireExtinguisher 2000
#define AFireExtinguisher 200
#define VCamera 100
#define ACamera 500
#define VNightvision******s 1000
#define ANightvision******s 500
#define VThermal******s 0
#define AThermal******s 0
#define VParachute 0
#define AParachute 0

// Health and Armour
#define VHealth 15000
#define VArmour 20000
#define VHealthandArmour 35000


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/w", cmdtext, true, 11) == 0)
{
ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Weapon Shop", "Melee weapons\nThrown\nPistols\nShotguns\nSMG's\nRifles\ nSpecials\nExtras\nHealth and Armour", "Select", "Exit");
return 1;
}

return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 20320 && response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 20321, DIALOG_STYLE_LIST, "Weapon Shop [Melee Weapons]", "Brass Knuckles $2000\nGolf Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nPurple Dildo\nSmall White Vibrator\nLarge White Vibrator\nSilver Vibrator\nFlowers\nCane", "Buy", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Weapon Shop [Thrown]", "Grenade\nTear Gas\nMolotov Cocktails", "Buy", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Weapon Shop [Pistols]", "9mm\nSilenced 9mm\nDesert Eagle", "Buy", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 20324, DIALOG_STYLE_LIST, "Weapon Shop [Shotguns]", "Shotgun\nSawn-off Shotgun\nCombat Shotgun", "Buy", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 20325, DIALOG_STYLE_LIST, "Weapon Shop [SMG]", "SMG\nUZI\nTec-9", "Buy", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, 20326, DIALOG_STYLE_LIST, "Weapon Shop [Rifles]", "AK-47\nM4\nCountry Rifle\nSniper Rifle", "Buy", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, 20327, DIALOG_STYLE_LIST, "Weapon Shop [Specials]", "Rocket Launcher\nHeat Seeking Rocket Launcher\nFlamethrower\nMini-gun\nSatchel Charge Kit", "Buy", "Cancel");
}
case 7:
{
ShowPlayerDialog(playerid, 20328, DIALOG_STYLE_LIST, "Weapon Shop [Extras]", "Spray Can\nFire Extinguisher\nCamera\nNightvision ******s\nThermal ******s\nParachute", "Buy", "Cancel");
}
case 8:
{
ShowPlayerDialog(playerid, 20329, DIALOG_STYLE_LIST, "Weapon Shop [Health and Armour]", "Health\nArmour\nHealth and Armour", "Buy", "Cancel");
}
}
}

if(dialogid == 20321 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VBrassKnuckles) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -VBrassKnuckles);
GivePlayerWeapon(playerid, 1, ABrassKnuckles);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Brass Knuckle!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VGolfclub) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Golf Club!");
GivePlayerMoney(playerid, -VGolfclub);
GivePlayerWeapon(playerid, 2, AGolfclub);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Golf Club!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VNiteStick) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nite Stick!");
GivePlayerMoney(playerid, -VNiteStick);
GivePlayerWeapon(playerid, 3, ANiteStick);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Nite Stick!");
}
case 3:
{
if( GetPlayerMoney(playerid) < VKnife) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Knife!");
GivePlayerMoney(playerid, -VKnife);
GivePlayerWeapon(playerid, 4, AKnife);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Knife!");
}
case 4:
{
if( GetPlayerMoney(playerid) < VBaseballBat) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Baseball bat!");
GivePlayerMoney(playerid, -VBaseballBat);
GivePlayerWeapon(playerid, 5, ABaseballBat);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Baseball Bat!");
}
case 5:
{
if( GetPlayerMoney(playerid) < VShovel) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Shovel!");
GivePlayerMoney(playerid, -VShovel);
GivePlayerWeapon(playerid, 6, AShovel);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Shovel!");
}
case 6:
{
if( GetPlayerMoney(playerid) < VPoolCue) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Pool Cue!");
GivePlayerMoney(playerid, -VPoolCue);
GivePlayerWeapon(playerid, 7, APoolCue);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Pool Cue!");
}
case 7:
{
if( GetPlayerMoney(playerid) < VKatana) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Katana!");
GivePlayerMoney(playerid, -VKatana);
GivePlayerWeapon(playerid, 8, AKatana);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Katana!");
}
case 8:
{
if( GetPlayerMoney(playerid) < VChainsaw) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Chainsaw!");
GivePlayerMoney(playerid, -VChainsaw);
GivePlayerWeapon(playerid, 9, AChainsaw);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Chainsaw!");
}
case 9:
{
if( GetPlayerMoney(playerid) < VPurpleDildo) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Purple Dildo!");
GivePlayerMoney(playerid, -VPurpleDildo);
GivePlayerWeapon(playerid, 10, APurpleDildo);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Purple Dildo!");
}
case 10:
{
if( GetPlayerMoney(playerid) < VSmallWhiteVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Small White Vibrator!");
GivePlayerMoney(playerid, -VSmallWhiteVibrator);
GivePlayerWeapon(playerid, 11, ASmallWhiteVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Small White Vibrator!");
}
case 11:
{
if( GetPlayerMoney(playerid) < VLargeWhiteVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Large White Vibrator!");
GivePlayerMoney(playerid, -VLargeWhiteVibrator);
GivePlayerWeapon(playerid, 12, ALargeWhiteVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Large White Vibrator!");
}
case 12:
{
if( GetPlayerMoney(playerid) < VSilverVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Silver Vibrator!");
GivePlayerMoney(playerid, -VSilverVibrator);
GivePlayerWeapon(playerid, 13, ASilverVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Silver Vibrator!");
}
case 13:
{
if( GetPlayerMoney(playerid) < VFlower) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy some Flowers!");
GivePlayerMoney(playerid, -VFlower);
GivePlayerWeapon(playerid, 14, AFlower);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought some Flowers!");
}
case 14:
{
if( GetPlayerMoney(playerid) < VCane) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Cane!");
GivePlayerMoney(playerid, -VCane);
GivePlayerWeapon(playerid, 15, ACane);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Cane!");
}
}
}

if(dialogid == 20322 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VGrenade) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Grenade!");
GivePlayerMoney(playerid, -VGrenade);
GivePlayerWeapon(playerid, 16, AGrenade);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Grenade!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VTearGas) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Tear Gas!");
GivePlayerMoney(playerid, -VTearGas);
GivePlayerWeapon(playerid, 17, ATearGas);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Tear Gas!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VMolotovCocktail) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Molotov Cocktail!");
GivePlayerMoney(playerid, -VMolotovCocktail);
GivePlayerWeapon(playerid, 18, AMolotovCocktail);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Molotov Cocktail!");
}
}
}

if(dialogid == 20323 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < V9mm) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a 9mm!");
GivePlayerMoney(playerid, -V9mm);
GivePlayerWeapon(playerid, 22, A9mm);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a 9mm!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VSilenced9mm) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Silenced 9mm!");
GivePlayerMoney(playerid, -VSilenced9mm);
GivePlayerWeapon(playerid, 23, ASilenced9mm);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Silenced 9mm!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VDesertEagle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Desert Eagle!");
GivePlayerMoney(playerid, -VDesertEagle);
GivePlayerWeapon(playerid, 24, ADesertEagle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Desert Eagle!");
}
}
}
if(dialogid == 20324 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Shotgun!");
GivePlayerMoney(playerid, -VShotgun);
GivePlayerWeapon(playerid, 25, AShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Shotgun!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VSawn-offShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Sawn-off Shotgun!");
GivePlayerMoney(playerid, -VSawn-offShotgun);
GivePlayerWeapon(playerid, 26, ASawn-offShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Sawn-off Shotgun!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VCombatShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Combat Shotgun!");
GivePlayerMoney(playerid, -VCombatShotgun);
GivePlayerWeapon(playerid, 27, ACombatShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Combat Shotgun!");
}
}
}
if(dialogid == 20325 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VSMG) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a SMG!");
GivePlayerMoney(playerid, -VSMG);
GivePlayerWeapon(playerid, 29, ASMG);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a SMG!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VUZI) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a UZI!");
GivePlayerMoney(playerid, -VUZI);
GivePlayerWeapon(playerid, 28, AUZI);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a UZI!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VTec-9) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Tec-9!");
GivePlayerMoney(playerid, -VTec-9);
GivePlayerWeapon(playerid, 32, ATec-9);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Tec-9!");
}
}
}
if(dialogid == 20326 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VAK-47) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy an AK-47!");
GivePlayerMoney(playerid, -VAK-47);
GivePlayerWeapon(playerid, 30, AAK-47);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought an AK-47!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VM4) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a M4!");
GivePlayerMoney(playerid, -VM4);
GivePlayerWeapon(playerid, 31, AM4);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a M4!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VCountryRifle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Country Rifle!");
GivePlayerMoney(playerid, -VCountryRifle);
GivePlayerWeapon(playerid, 33, ACountryRifle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Rifle!");
}
case 3:
{
if( GetPlayerMoney(playerid) < VSniperRifle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Country Rifle!");
GivePlayerMoney(playerid, -VSniperRifle);
GivePlayerWeapon(playerid, 34, ASniperRifle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Rifle!");
}
}
}
if(dialogid == 20327 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VRocketLauncher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Rocket Launcher!");
GivePlayerMoney(playerid, -VRocketLauncher);
GivePlayerWeapon(playerid, 35, ARocketLauncher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Rocket Laucher!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VHeatSeekingRocketLauncher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Heat Seeking Rocket Launcher!");
GivePlayerMoney(playerid, -VHeatSeekingRocketLauncher);
GivePlayerWeapon(playerid, 36, AHeatSeekingRocketLauncher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Heat Seeking Rocket Launcher!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VFlamethrower) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Flamethrower!");
GivePlayerMoney(playerid, -VFlamethrower);
GivePlayerWeapon(playerid, 37, AFlamethrower);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Flamethrower!");
}
case 3:
{
if( GetPlayerMoney(playerid) < VMini-gun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Mini-gun!");
GivePlayerMoney(playerid, -VMini-gun);
GivePlayerWeapon(playerid, 38, AMini-gun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Mini-gun!");
}
case 4:
{
if( GetPlayerMoney(playerid) < VSatchelChargeandDetonator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Satchel Charge Kit!");
GivePlayerMoney(playerid, -VSatchelChargeandDetonator);
GivePlayerWeapon(playerid, 39, ASatchelChargeandDetonator);
GivePlayerWeapon(playerid, 40, ASatchelChargeandDetonator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Satchel Charge Kit!");
}
}
}
if(dialogid == 20328 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VSprayCan) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Spray Can!");
GivePlayerMoney(playerid, -VSprayCan);
GivePlayerWeapon(playerid, 41, ASprayCan);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Spray Can!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VFireExtinguisher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Extinguisher!");
GivePlayerMoney(playerid, -VFireExtinguisher);
GivePlayerWeapon(playerid, 42, AFireExtinguisher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Fire Extinguisher!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VCamera) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Camera!");
GivePlayerMoney(playerid, -VCamera);
GivePlayerWeapon(playerid, 43, ACamera);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Camera!");
}
case 3:
{
if( GetPlayerMoney(playerid) < VNightvision******s) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nightvision ******!");
GivePlayerMoney(playerid, -VNightvision******s);
GivePlayerWeapon(playerid, 44, ANightvision******s);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Nightvision ******!");
}
case 4:
{
if( GetPlayerMoney(playerid) < VThermal******s) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Thermal ******!");
GivePlayerMoney(playerid, -VThermal******s);
GivePlayerWeapon(playerid, 45, AThermal******s);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Thermal ******!");
}
case 5:
{
if( GetPlayerMoney(playerid) < VParachute) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Parachute!");
GivePlayerMoney(playerid, -VParachute);
GivePlayerWeapon(playerid, 46, AParachute);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Parachute!");
}
}
}

if(dialogid == 20329 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid) < VHealth) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -VHealth);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully refilled your Health Bar!");
}
case 1:
{
if( GetPlayerMoney(playerid) < VArmour) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Golf Club!");
GivePlayerMoney(playerid, -VArmour);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought an Armour!");
}
case 2:
{
if( GetPlayerMoney(playerid) < VHealthandArmour) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nite Stick!");
GivePlayerMoney(playerid, -VHealthandArmour);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully refilled your Health Bar and bought an Armour!");
}
}
}
return 1;
}
Reply


Messages In This Thread
server scripts problme - by tooq - 13.05.2014, 15:13
Re: server scripts problme - by Parallex - 13.05.2014, 15:27
Re: server scripts problme - by tooq - 13.05.2014, 15:33
Re: server scripts problme - by tooq - 13.05.2014, 15:39
Re: server scripts problme - by tooq - 13.05.2014, 15:47

Forum Jump:


Users browsing this thread: 1 Guest(s)