SA-MP Forums Archive
How to Make a Dialog List Where you Can Buy Weapons - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to Make a Dialog List Where you Can Buy Weapons (/showthread.php?tid=365776)



How to Make a Dialog List Where you Can Buy Weapons - Eminem 2ka9 - 04.08.2012

1. I would prefer an object or a briefcase on the ground where you can walk in it and the dialog will appear showing all the weapons, in categories. 2. Or maybe just a command like /buy weapons and the dialog will appear. 3. Or maybe /buysawnoff and you will buy it. But I would mostly prefer a Briefcase!

Thanks a lot


Re: How to Make a Dialog List Where you Can Buy Weapons - Devilxz97 - 04.08.2012

https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Re: How to Make a Dialog List Where you Can Buy Weapons - Ballu Miaa - 04.08.2012

Instead of asking people to create you one. Its just too easy to make it. Just try it once yourself.

How long you all will wait for people to fix your problems.

-Steps to create-

1. Add a Pickup using CreatePickup (https://sampwiki.blast.hk/wiki/CreatePickup)
2. When the players picks up the pickup , he is shown a dialog . Do it Under OnPlayerPickupPickup callback (https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup), with ShowPlayerDialog (https://sampwiki.blast.hk/wiki/ShowPlayerDialog )
3. Add items in the dialog as well as check for money. To give him the Weapon and Deduct money.

Your Done!


Respuesta: How to Make a Dialog List Where you Can Buy Weapons - HarlemSAMP - 04.08.2012

Yep as Ballu said, you make a pickup on your gm with the custom coordinates you want and the model of the pickup, then you just need to set up OnPlayerPickUpPickUp and you can use ShowPlayerDialog as of OnPlayerDialogResponde, then just add a function like SendClientMessage case 1 "You have bought %%%% something" then use GivePlayerMoney(playerid, -2000(or w/e));

Hope you get the point, everything is on sampwiki