[FilterScript] Furniture System-Carring the furniture and place it to your house,garden and everywhere
#1

Furniture System v1.0

Carring the furniture and place it to your house,garden and everywhere
INTRODUCTION
I only help my friend(Jin_Zhi) to release this script to forum. It did not made by me. This is a furniture system, you can create all objects in samp and place it to your house, garden and everywhere, it including save/read/edit system. This script is a part of HCOS(Open Source Project Of HuiCheng Gaming)

SCREENSHOT







HOW TO INSTALL
1. Decompress the packet to your server folder.
2. Open server.cfg, add 'Furniture' to the line of 'filterscripts'.
3. Start samp-server.exe and enter the game, and type that command(see 'HOW TO USE' below).

HOW TO USE
This script have these command to use:
Code:
Y - Control the furniture
Mouse Right - Put down the furniture
/Create - Create a furniture
/Remove - Delete a furniture
/Closest - Get the nearly furniture
All furniture data are save in scriptfiles/Furniture
DOWNLOAD
Link 1: https://sourceforge.net/projects/hco...mp_rafixed.rar [Fixed Rotation Angle Bug]

BUGS
None as of yet, please reply this topic, go to the projects website (http://sourceforget.net/projects/hcos) or go to http://samp.hcyxsq.cn (Page Non-English) to post any you find.

SUPPORT
You can contact me with skype(hcyxsq) , steam(hcyxsq) or E-mail(xghc@foxmail.com).
Reply
#2

WOW good job
Reply
#3

Wow this is awesome!

Nice work- +1.
Reply
#4

Nice work, repped.
Reply
#5

I gotta test it
Reply
#6

I'm looking at the code for this and I don't really like what I'm seeing, DINI and poor dynamic design the system looks pretty good but I would change this up.

1.) Use sqlite - I recommend https://sampforum.blast.hk/showthread.php?tid=303682
2.) Redesign the dynamic element there should be two functions CreateFurniture() DestroyFurniture()
3.) Use y_iterate to create a custom iterator for your furnature array this is a perfect application
4.) Use zcmd having all your commands in one callback is messy (I don't care even if it's one command do it)
5.) y_inline/y_dialog allows you to integrate dialogs directly into functions
(Quick Example)

pawn Code:
else if(Object_Clear_Click == clickedid)
        {
            if(CostumeData[playerid][p_CObjectID][CurrCostumeEditSlot[playerid]] != 0)
            {
                inline Response(pid, dialogid, response, listitem, string:text[])
                {
                    #pragma unused listitem, dialogid, pid, text
                    if(response)
                    {
                        RemoveAttachedObject(playerid, CurrCostumeEditSlot[playerid]);
                        PlayerTextDrawSetString(playerid, Object_Info_Player[playerid], "Cleared object from selected slot");
                    }
                    else PlayerTextDrawSetString(playerid, Object_Info_Player[playerid], "Cancelled clear object");
                }
                Dialog_ShowCallback(playerid, using inline Response, DIALOG_STYLE_MSGBOX, "Costume Editor", "Are you sure you want to clear this object?", "Ok", "Cancel");
            }
        }
Doesn't that look at more natural?

Those are my suggestions, otherwise the coding looks fairly decent but if you can make my proposed improvements the system will be much more extensible if someone decides to implement a custom edit and for your own updates.
Reply
#7

Eh .. Nice..
Reply
#8

Quote:
Originally Posted by [uL]Pottus
View Post
I'm looking at the code for this and I don't really like what I'm seeing, DINI and poor dynamic design the system looks pretty good but I would change this up.

1.) Use sqlite - I recommend https://sampforum.blast.hk/showthread.php?tid=303682
2.) Redesign the dynamic element there should be two functions CreateFurniture() DestroyFurniture()
3.) Use y_iterate to create a custom iterator for your furnature array this is a perfect application
4.) Use zcmd having all your commands in one callback is messy (I don't care even if it's one command do it)
5.) y_inline/y_dialog allows you to integrate dialogs directly into functions
(Quick Example)

pawn Code:
else if(Object_Clear_Click == clickedid)
        {
            if(CostumeData[playerid][p_CObjectID][CurrCostumeEditSlot[playerid]] != 0)
            {
                inline Response(pid, dialogid, response, listitem, string:text[])
                {
                    #pragma unused listitem, dialogid, pid, text
                    if(response)
                    {
                        RemoveAttachedObject(playerid, CurrCostumeEditSlot[playerid]);
                        PlayerTextDrawSetString(playerid, Object_Info_Player[playerid], "Cleared object from selected slot");
                    }
                    else PlayerTextDrawSetString(playerid, Object_Info_Player[playerid], "Cancelled clear object");
                }
                Dialog_ShowCallback(playerid, using inline Response, DIALOG_STYLE_MSGBOX, "Costume Editor", "Are you sure you want to clear this object?", "Ok", "Cancel");
            }
        }
Doesn't that look at more natural?

Those are my suggestions, otherwise the coding looks fairly decent but if you can make my proposed improvements the system will be much more extensible if someone decides to implement a custom edit and for your own updates.
Thanks for your valuable suggestion.
Reply
#9

No problem, it's a good system but the changes I've proposed will make it a much better system
Reply
#10

I've found a bug, Whenever you close the command prompt, the furniture seems to lose its rotation, I've tried clicking the link, but it doesnt direct me anywhere Sorry.
Reply
#11

Great, however it can be improved.
Reply
#12

Good Job Try To make the version 1.2
Reply
#13

good, +rep
Reply
#14

Quote:
Originally Posted by Krakuski
Посмотреть сообщение
I've found a bug, Whenever you close the command prompt, the furniture seems to lose its rotation, I've tried clicking the link, but it doesnt direct me anywhere Sorry.
Thanks for your report. now we fixed that bug, download the latest version at: https://sourceforge.net/projects/hco...mp_rafixed.rar
Reply
#15

There's a problem.

- When I go near it then press "Y" the dialog appears. but when I choose one then press select - Nothing happens... Still the same on the other one.
Please fix this.
Reply
#16

Quote:
Originally Posted by DouglasRamirez
Посмотреть сообщение
There's a problem.

- When I go near it then press "Y" the dialog appears. but when I choose one then press select - Nothing happens... Still the same on the other one.
Please fix this.
Go under
pawn Код:
OnPlayerEditDynamicObject
IN your gamemode, and hash out all the codes inside of it, meaning /* in the beginning, and */ at the end. Worked for me
Reply
#17

Nice Script...........
Reply
#18

Bug:
when you finish editing the object you made,i mean edit it not lift it ,then you cant press on y again
please fix it
Reply
#19

i LIKE it HHH nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)