SA-MP Forums Archive
can you help in changing world - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: can you help in changing world (/showthread.php?tid=276104)



can you help in changing world - MA_proking - 12.08.2011

How can I use my maps in different world like world 2 3 etc not in 0


Re: can you help in changing world - Lorenc_ - 12.08.2011

Are you using a object streamer?

Setting a players world: SetPlayerVirtualWorld( playerid, ( VIRTUALWORLD ) );

The 'streamer plugin' allows you to have objects streamed at a specific world (Not sure if this is false).


Re: can you help in changing world - MA_proking - 12.08.2011

ok and where I put map stuff


Re: can you help in changing world - Kingunit - 12.08.2011

Under OnGameModeInit


Re: can you help in changing world - MA_proking - 12.08.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Under OnGameModeInit
I know that but I want to set map in other world so how can I write this


Re: can you help in changing world - MA_proking - 12.08.2011

pawn Код:
#include <a_samp>
#include <core>
#include <float>
#include <random>
using this


Re: can you help in changing world - Riddick94 - 12.08.2011

pawn Код:
#include    "a_samp"

#define     YOUR_WORLD_ID_GLOBAL        (2)

public OnPlayerConnect(playerid)
{
    SetPlayerVirtualWorld(playerid, YOUR_WORLD_ID_GLOBAL);
    return true;
}
Map or objects?


Re: can you help in changing world - MA_proking - 12.08.2011

this set player in world
how to set objects of map


Re: can you help in changing world - Riddick94 - 12.08.2011

It's very easy. Look:

pawn Код:
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);
pawn Код:
#include    "a_samp"
#include    "streamer"

#define     GLOBAL_VIRTUAL_WORLD        (2) // Your virtual world.

public OnGameModeInit()
{
    CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, GLOBAL_VIRTUAL_WORLD, interiorid = -1, playerid = -1, Float:distance = 200.0);
    return true;
}

public OnGameModeExit()
{
    DestroyAllDynamicObjects();
    return true;
}

public OnPlayerConnect(playerid)
{
    SetPlayerVirtualWorld(playerid, GLOBAL_VIRTUAL_WORLD);
    return true;
}



Re: can you help in changing world - Lorenc_ - 12.08.2011

Aren't objects visible in all worlds?