21.07.2010, 08:31
Okay, I know you can use arrays to add objects into your GM, but I don't know how to integrate this steamer into an object array for my server. Could someone please help me out, or possibly create a tutorial? Thanks!
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
CreateDynamicObject(...);
new Objects[x]
{
{objectID, ...}
{objectID, ...}
{objectID, ...}
{objectID, ...}
{objectID, ...}
{objectID, ...}
}
new Objects[x]
{
{objectid, argument, argument...},
{objectid, argument, argument...} // Last one doesnt have a , all others do.
};
new rand = random(sizeof(randomSpawns));
CreateDynamicObject(Objects[rand][0], Objects[rand][1], Objects[rand][2] );
Not sure if this is right but you could try
pawn Code:
pawn Code:
|
There is also an MTA map loader fully integrated in to YSI, which also has object streaming and XML reading.
|
A friend of mine named Kyosaur made a 'MTA MAP LOADER' (Just a snippet on the XML Thread) to load MTA maps, and convert them into SA-MP.
So you could just map the objects, save them (using MTA 1.0 ofcourse), then place them somewhere, and load them with the loader, you'll have to make an array listing every map name, though. https://sampforum.blast.hk/showthread.php?tid=150755&page=3 It's on the 3rd page, 5 posts down, you'll have to figure out some stuff of your own though. |
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);