can you help in changing world
#1

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

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

ok and where I put map stuff
Reply
#4

Under OnGameModeInit
Reply
#5

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

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

pawn Код:
#include    "a_samp"

#define     YOUR_WORLD_ID_GLOBAL        (2)

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

this set player in world
how to set objects of map
Reply
#9

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;
}
Reply
#10

Aren't objects visible in all worlds?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)