SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Client Support (https://forum.sa-mp.com/forumdisplay.php?f=16)
-   -   How to make players can see custom object? (https://forum.sa-mp.com/showthread.php?t=670473)

Hiei 07/11/2019 05:48 PM

How to make players can see custom object?
 
Like the title, I have created 2 files .dff and .txd file, however, I don't know how can I import them to the script and how can I spawn these objects that players can see, touch.

Sorry for my bad english and thanks in advance!

RoboN1X 07/11/2019 06:38 PM

Re: How to make players can see custom object?
 
Unfortunately, you are late .. the version branch for easy custom object that allow players to download from the server has been just pulled out alongside the subforum.

Alternatively you can add your object .txd and .dff into Custom.IMG file (can be found in SAMP folder) using IMG tool, assign the object model, id, and flags in Custom.IDE, then you publish it on internet and have the players manually download the custom.img and custom.ide you made.. (and ask them to install it)

Then you can use CreateObject normally with the object ID you previously assigned in the Custom.IDE

Note that the ID of objects usable for custom img are within 15065 to 15999 (935 total)

Hiei 08/11/2019 07:13 AM

Re: How to make players can see custom object?
 
Quote:

Originally Posted by RoboN1X (Post 4121224)
Unfortunately, you are late .. the version branch for easy custom object that allow players to download from the server has been just pulled out alongside the subforum.

Alternatively you can add your object .txd and .dff into Custom.IMG file (can be found in SAMP folder) using IMG tool, assign the object model, id, and flags in Custom.IDE, then you publish it on internet and have the players manually download the custom.img and custom.ide you made.. (and ask them to install it)

Then you can use CreateObject normally with the object ID you previously assigned in the Custom.IDE

Note that the ID of objects usable for custom img are within 15065 to 15999 (935 total)

Thanks! I tried and successed! The last thing is how can I spawn these objects ?

RoboN1X 08/11/2019 07:49 AM

Re: How to make players can see custom object?
 
Quote:

Originally Posted by Hiei (Post 4121324)
Thanks! I tried and successed! The last thing is how can I spawn these objects ?

As i already said in my previous post, you can use CreateObject or CreatePlayerObject function in the script, and to make you easy creating a map, you can use Map editors.
But if you wish to look help for scripting, better make a separate thread in Scripting Help section. Of course you post it after you try scripting, i.e. you created a command for it and if you needed help you can post there, it's not for scripting request.

So for example your new custom object ID in the IDE is 15065, then by using CreateObject you can do this:
pawn Code:
CreateObject(15065, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0); // This will create your custom object at center of san andreas (at Blueberry Acres)
If you get a "?" object, it means you did wrong, either the object is not registered properly in the IDE or the object is missing from the IMG.


All times are GMT. The time now is 10:36 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.