furniture system - 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: furniture system (
/showthread.php?tid=624242)
furniture system -
Karolukas123 - 13.12.2016
Hey, so how its work ? how to place object, edit it and save it with mysql ??need little example thanks
Re: furniture system -
Logic_ - 13.12.2016
Make an array with all the furniture object names, ids and cost, loop the array and show them as a list in a dialog box, if player has enough money for the furniture, create a
player object and let the player edit it.
for example:
PHP код:
#define MAX_FURNITURE (7)
enum E_Furniture
{
ModelName[15],
ModelObject,
ModelPrice
};
new const gFurniture[MAX_FURNITURE][E_Furniture] =
{
{"TV remote", 19920, 50},
{"Clock", 19825, 50},
{"Books", 2813, 20},
{"Old TV", 14772, 100},
{"Magazines", 2827, 20},
{"TV", 1518, 200},
{"Grey TV", 2322, 300}
};