Objects different world
#1

ok i want an admin area with stunts in ls airport but only for admin so every player goto ls airport cuz it is Los Santos Gang wars so i want to change the world id but how?
this is player spawn world
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior( playerid, 0 );
    SetPlayerVirtualWorld(playerid, 0);
and this is admin area cmd
pawn Код:
if(!strcmp(cmdtext, "/adminarea", true))
            {
                 SetPlayerPos(x, y, z); //ls airport only for admins
                 return 1;
                 }    
            return 0;
    }
these some objects of stunts in ls airport which i want only for admins
pawn Код:
CreateDynamicObject(5333,2985.30000000,-753.20000000,18.80000000,0.00000000,0.00000000,175.00000000, -1); //
    CreateDynamicObject(5333,3203.70000000,-772.20000000,18.80000000,0.00000000,0.00000000,355.00000000, -1); //
    CreateDynamicObject(3997,3337.20000000,-783.70000000,10.00000000,0.00000000,0.00000000,85.00000000, -1); //
    CreateDynamicObject(987,3276.30000000,-800.60000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3275.50000000,-812.50000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3274.50000000,-824.50000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3273.60000000,-836.40000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3272.80000000,-848.40000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3272.20000000,-857.90000000,10.00000000,0.00000000,0.00000000,86.00000000, -1); //
    CreateDynamicObject(987,3284.20000000,-859.00000000,10.00000000,0.00000000,0.00000000,175.00000000, -1); //
    CreateDynamicObject(987,3296.10000000,-860.10000000,10.00000000,0.00000000,0.00000000,175.00000000, -1); //
    CreateDynamicObject(987,3308.10000000,-861.10000000,10.00000000,0.00000000,0.00000000,175.00000000, -1); //
    CreateDynamicObject(987,3320.10000000,-862.10000000,10.00000000,0.00000000,0.00000000,175.00000000, -1); //
but still a normal player can see the objects and have fun on the stunts
i want objects only for admins when they type /adminarea
srry for my ban english
Reply
#2

CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, WORLDID = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);

Change the world id
Reply
#3

Replace the last parameter ...

Ex:
pawn Код:
CreateDynamicObject(5333,3203.70000000,-772.20000000,18.80000000,0.00000000,0.00000000,355.00000000, -1);
pawn Код:
CreateDynamicObject(5333,3203.70000000,-772.20000000,18.80000000,0.00000000,0.00000000,355.00000000, 2);// Virtual world = 2
pawn Код:
if(!strcmp(cmdtext, "/adminarea", true))
{
    SetPlayerPos(x, y, z); //ls airport only for admins
    SetPlayerVirtualWorld(playerid, 2); // Vw = 2
    return true;
}
Reply
#4

ty hope this works reped both of u but will first try Viniborn's method
edit: thnx it worked Vini's way
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)