Big n00b question
#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


Messages In This Thread
Big n00b question - by pantelimonfl - 21.12.2010, 11:59
Re: Big n00b question - by akis_tze - 21.12.2010, 12:22
Re: Big n00b question - by Babul - 21.12.2010, 12:23
Re: Big n00b question - by pantelimonfl - 21.12.2010, 13:11
Re: Big n00b question - by [NWA]Hannes - 21.12.2010, 13:18
Re: Big n00b question - by pantelimonfl - 21.12.2010, 13:20
Re: Big n00b question - by pantelimonfl - 22.12.2010, 11:12
Re: Big n00b question - by TopAz07 - 22.12.2010, 11:30
Re: Big n00b question - by pantelimonfl - 22.12.2010, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)