Big n00b question
#1

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.
Reply
#2

Use CreateObject
Just take the pos where you want to create the object

Search for a map editor to help you edit your server
Reply
#3

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..
Код:
new Object[20];
.. 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;
}
Reply
#4

I already have some objects in lspd and i want to add more.
Reply
#5

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..
Код:
new Object[20];
.. 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.
Reply
#6

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.
Reply
#7

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
Reply
#8

SetPlayerInterior
Reply
#9

How can i enter on mta in interior to make them fit? That's my big problem ^_^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)