any ideas???
#1

hey guys i got a problem with my buygun system..... i get only errors...


Код:
CMD:buyguns(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 40, 286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 286.800994,-82.547599,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 314.820983,-141.431991,999.601562) || IsPlayerInRangeOfPoint(playerid, 40, 316.524993,-167.706985,999.593750))
	{
	ShowPlayerDialog(playerid, DIALOGWEAPONS, DIALOG_STYLE_LIST, "Hello, what guns can I get you?", "Deagle($10000)\nShotgun($2500)\nMP5($15000)\nSpas12($65000)\nAK-47($45000)\nM4($40000)\nSniper($75000)\nHalf vest($10000)\nFull vest($15000)","Buy","Cancel");
	}
    return 1;
}
Reply
#2

Put where you're #define DIALONG_REGISTER 1 is or what ever,
You put #define DIALOG_WEAPONS

+REP ME IF I HELPED
Reply
#3

already have...

Код:
//buygun
#define DIALOGWEAPONS 1
Reply
#4

Yes put #define DIALOG_WEAPONS 1
then edit the DIALOGWEAPONS in the CMD to DIALOG_WEAPONS
Reply
#5

I think you have another dialog with id 1 so change the 1 to another unused dialog id like 1234 or...
You have to define DIALOG_WEAPONS
On the top of the script add
pawn Код:
#define  DIALOGWEAPONS  "here the id of the dialog make sure that the is is not used"
And you have to make under OnDialogResponse.....
pawn Код:
If(listitem == 1) // which means deagle
{
       GivePlayerWeapon(playerid, 24);
       GivePlayerCash(playerid, -10000);
       SendClientMessage(playerid, -1 , " you have bought a deagle for 100000$");
       return 1;
}
And same for the other weapons just change the listitem id and the weapon and the money....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)