Big n00b question -
pantelimonfl - 21.12.2010
How can i add objects on interiors? I want to optimise my server and i want to add some objects in lspd but i don't know how.
Re: Big n00b question -
akis_tze - 21.12.2010
Use CreateObject
Just take the pos where you want to create the object
Search for a map editor to help you edit your server
Re: Big n00b question -
Babul - 21.12.2010
i mapped 4 doors in the LVPD interior, ill show you how to create 2 of them ^^
one thing you need, is the interior ID. its stored in the GTA Server/scriptfiles/properties/interiors.txt
open that file with notepad, and search for the line containing
Код:
15 3 288.4723 170.0647 1007.1794 22.0477 Las Venturas Police Department ;
thats the entry #15, with the 3 as interior - the real one - and its coordinates (those are irrelevant for you atm, you only want to add some objects).
so all you need, is the 3.
as you see in the CreateObject function (
https://sampwiki.blast.hk/wiki/CreateObject), it is not supporting virtual worlds nor interiors. you would need to script that for yourself, OR have a look at the streamer plugin (
https://sampforum.blast.hk/showthread.php?tid=102865), pay attention to the
Код:
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
it supports interiors and some more parameters, so its your best choice to stick to it.
edit: i presume you will use the streamer, this solution wont work with the standard function!
after declaring, lets say, 20 objecs in an array at your top of the gamemode/filterscript..
.. you would need to create some objects which gets assigned to the array created above. this way you can access those objects later when needed, like moving, rotating, or creating an explosion close to it, or simply replace it with another. whatever..
Код:
public OnGameModeInit()
{
Object[0]=CreateDynamicObject(1501,187.9120,156.7346,1002.0236,0,0,90,-1,3,-1,50);//door 1
Object[1]=CreateDynamicObject(1501,187.9120,159.7348,1002.0236,0,0,-90,-1,3,-1,50);//door 2
return 1;
}
Re: Big n00b question -
pantelimonfl - 21.12.2010
I already have some objects in lspd and i want to add more.
Re: Big n00b question -
[NWA]Hannes - 21.12.2010
Quote:
Originally Posted by Babul
i mapped 4 doors in the LVPD interior, ill show you how to create 2 of them ^^
one thing you need, is the interior ID. its stored in the GTA Server/scriptfiles/properties/interiors.txt
open that file with notepad, and search for the line containing
Код:
15 3 288.4723 170.0647 1007.1794 22.0477 Las Venturas Police Department ;
thats the entry #15, with the 3 as interior - the real one - and its coordinates (those are irrelevant for you atm, you only want to add some objects).
so all you need, is the 3.
as you see in the CreateObject function ( https://sampwiki.blast.hk/wiki/CreateObject), it is not supporting virtual worlds nor interiors. you would need to script that for yourself, OR have a look at the streamer plugin ( https://sampforum.blast.hk/showthread.php?tid=102865), pay attention to the
Код:
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
it supports interiors and some more parameters, so its your best choice to stick to it.
edit: i presume you will use the streamer, this solution wont work with the standard function!
after declaring, lets say, 20 objecs in an array at your top of the gamemode/filterscript..
.. you would need to create some objects which gets assigned to the array created above. this way you can access those objects later when needed, like moving, rotating, or creating an explosion close to it, or simply replace it with another. whatever..
Код:
public OnGameModeInit()
{
Object[0]=CreateDynamicObject(1501,187.9120,156.7346,1002.0236,0,0,90,-1,3,-1,50);//door 1
Object[1]=CreateDynamicObject(1501,187.9120,159.7348,1002.0236,0,0,-90,-1,3,-1,50);//door 2
return 1;
}
|
Wrong, this only streams objects through interiors, it doesnt have anything to do with creating objects in interiors.
Quote:
Originally Posted by pantelimonfl
I already have some objects in lspd and i want to add more.
|
Use CreateObject. You dont need any certain interior, it creates in all interiors automatically.
Re: Big n00b question -
pantelimonfl - 21.12.2010
I don't know how to explain. I want to make them like outside. I don't know how to find the coords of interiors to create them.
Re: Big n00b question -
pantelimonfl - 22.12.2010
No one? So.. I want to make some doors on lspd but i have no idea where are the coords of the interior. I know how to use MTA, but i don't know how to put the objects there
Re: Big n00b question -
TopAz07 - 22.12.2010
SetPlayerInterior
Re: Big n00b question -
pantelimonfl - 22.12.2010
How can i enter on mta in interior to make them fit? That's my big problem ^_^