SA-MP Forums Archive
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"1992050},
    {
"Clock"1982550},
    {
"Books"281320},
    {
"Old TV"14772100},
    {
"Magazines"282720},
    {
"TV"1518200},
    {
"Grey TV"2322300}
};