error
#1

plz tell me how to fix this.I didn't put the response for all dialogs but I named them all.plz get me the correct code.

here is the code:
Код:
// 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

////////////////////Car Prices///////////////////

//INSTRUCTIONS:
// Change the 0 to amounce you want the cars to be sold
//V = Car Price
//A =Cars Amount On Buy


//Off Road
#define VBandito 10
#define ABandito 1
#define VBFInjection 122
#define ABFInjection 1
#define VDune 122
#define ADune 1
#define VMesa 956
#define AMesa 1

//Sports Cars
#define VBanshee 66
#define ABanshee 1
#define VBuffalo 88
#define ABuffalo 1
#define VInfernus 99
#define AInfernus 1

//Bikes
#define VBMX 10
#define ABMX 1
#define VQuad 30
#define AQuad 1

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Carshop", cmdtext, true, 11) == 0)
{
ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Car Shop", "Off Road\nSports Cars\nBikes", "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, "Car Shop [Off Road]", "Bandito   25000\nBF Injection 50000\nDune  1000\nMesa 2000", "Buy", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Car Shop [Sports Car]", "Banshee   100\nBuffalo 5\nInfernus 500", "Buy", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Car Shop [Bikes]", "BMX  5000\nQuad 1000", "Buy", "Cancel");
}
}
}
if(dialogid == 20321 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  Bandito) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -Bandito);
GivePlayerCar(playerid, 1, Bandito);
SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a Bandito!");
}
if( GetPlayerMoney(playerid)  <  BF Injection) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -BF Injection);
GivePlayerCar(playerid, 1, BF Injection);
SendClientMessage(playerid, COLOR_GREEN, "Car Shop : You have succesfully bought a BF Injection!");
}
}
}
return 1;
}
Reply


Messages In This Thread
error - by jot16 - 01.08.2011, 13:19
Re: error - by Mr.1337 - 01.08.2011, 13:20
Re: error - by jot16 - 01.08.2011, 13:23
Re: error - by Kitten - 01.08.2011, 13:32
Re: error - by jot16 - 01.08.2011, 22:54
Re: error - by =WoR=Varth - 02.08.2011, 00:18
Re: error - by jot16 - 02.08.2011, 01:07
Re: error - by =WoR=Varth - 02.08.2011, 01:12
Re: error - by jot16 - 02.08.2011, 01:20
Re: error - by Basicz - 02.08.2011, 01:24

Forum Jump:


Users browsing this thread: 2 Guest(s)