21.12.2010, 12:23
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
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
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..
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 ;
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);
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];
Код:
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; }