Error in Defining a symbol Two Times
#3

Ok u see this.

Quote:

#define DIALOG_RULES 11

CMD:rules(playerid,params[])
{
ShowPlayerDialog(playerid,DIALOG_RULES,DIALOG_STYL E_LIST,"Server Rules","\nDonot use any hack in the server\nRespect the admins of the server","OK","");
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RULES)
{
if(response) // If they clicked 'Yes' or pressed enter
{
SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!");
}

return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}

return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}

and this:
Quote:

#define WEAP_DIALOG 10

CMDhop(playerid,params[])
{
ShowPlayerDialog(playerid,WEAP_DIALOG,DIALOG_STYLE _LIST,"Weapon Shop","\nSilenced Pistol(Ammo-500)-$500\nDeagle(Ammo 50) $650\nShotgun(Ammo 50) $2700\nSawn Of Shotgun(Ammo 50) $3000\nCombat Shotgun(Ammo 50) $3000\nMP5(Ammo 500) $1500\nAK 47(Ammo 500) $2500\nM4(Ammo 500) $3100\nCunt Rifle(Ammo 50) $2750\nSniper Rifle(Ammo 50) $4750","Buy","Close");
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==WEAP_DIALOG)
{
if(response)
{
switch(listitem)
{
case 0:SellWeapon(playerid,500,23,250);
case 1:SellWeapon(playerid,650,24,50);
case 2:SellWeapon(playerid,2700,25,50);
case 3:SellWeapon(playerid,3000,26,50);
case 4:SellWeapon(playerid,3000,27,50);
case 5:SellWeapon(playerid,1500,29,500);
case 6:SellWeapon(playerid,2500,30,500);
case 7:SellWeapon(playerid,3100,31,500);
case 8:SellWeapon(playerid,2750,33,50);
case 9:SellWeapon(playerid,4750,34,50);
}
}
}
return 1;
}

stock SellWeapon(playerid,money,weapon,ammo)
{
new playermoney = GetPlayerMoney(playerid);
if(playermoney>money)
{
new string[80],weaponname[32];
GivePlayerMoney(playerid,-money);
GivePlayerWeapon(playerid,weapon,ammo);
GetWeaponName(weapon,weaponname,sizeof(weaponname) );
format(string,sizeof(string),"You bought %i ammo of weapon %s for $%i",ammo,weaponname,money);
return SendClientMessage(playerid,-1,string);
}
else return SendClientMessage(playerid,-1,"You don't have enough money");
}

Look "OnDialogResponse" is used two times and it is giving error for using it two times
Reply


Messages In This Thread
Error in Defining a symbol Two Times - by Rissam - 19.10.2014, 04:28
Re: Error in Defining a symbol Two Times - by ThePhenix - 19.10.2014, 04:32
Re: Error in Defining a symbol Two Times - by Rissam - 19.10.2014, 04:54
Re: Error in Defining a symbol Two Times - by Rissam - 24.10.2014, 11:32
Re: Error in Defining a symbol Two Times - by Rudy_ - 24.10.2014, 11:35
Re: Error in Defining a symbol Two Times - by Rudy_ - 24.10.2014, 11:42
Re: Error in Defining a symbol Two Times - by Rissam - 25.10.2014, 07:09
Re: Error in Defining a symbol Two Times - by NeGaTiveZ - 25.10.2014, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)