Remove objects after SetVirtualWorld
#1

I was having this problem.

How to remove objects or stunt objects after teleporting in same place but different command.

Example:

If I type /lsa the stunt or object are there. (It's just normal coz my gamemode is freeroam and stunts)
But after I type /drag and the map is in lsa. The object are still there.

How can i remove them? so i can drag clearly and no object will bump.
Reply
#2

use a streamer... like incognito
Reply
#3

Quote:
Originally Posted by vernz
Посмотреть сообщение
use a streamer... like incognito
Its not the streamer. I need to use setplayer and setvehicle virtual world. but i dont know how. anybody?
Reply
#4

CreatePlayerObject/DestroyPlayerObject. That, or use Incognito's streamer as suggested; it has a virtual world parameter.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
CreatePlayerObject/DestroyPlayerObject. That, or use Incognito's streamer as suggested; it has a virtual world parameter.
In my gamemode i already have #include <streamer> also my in my plugins folder. and im using incognitos streamer. All object are created using CreateDynamicObject and AddStaticVehicle.
How can i destroy them after moving to a same place but different command?
Reply
#6

i saw your post last 2 years ago.

Код:
Objects are created in all worlds and interiors. There is no virtualworld parameter for that (only for pickups, afaik). 
You can try to using CreatePlayerObject to create the map when the player is in a certain virtual world and destroy them again once he leaves that specific virtual world.
Now i know. So I need to move and replace all CreateDynamicObject also with the vehicle to

Код:
new pObject[MAX_PLAYERS];
 
public OnPlayerConnect(playerid)
{
    pObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0, 0, 96);
 
    // Or alternatively, using the DrawDistance parameter to show it from as far away as possible:
    pObject[playerid] = CreatePlayerObject(playerid, 2587, 2001.195679, 1547.113892, 14.283400, 0, 0, 96, 300.0);
    return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
    DestroyPlayerObject(playerid, pObject[playerid]);
    return 1;
}
Reply
#7

Код:
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);
Reply
#8

Quote:
Originally Posted by Vince
Посмотреть сообщение
Код:
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);
Can you make a simple demo script here.

I have a example of object:
CreateObject(3265, -2955.304687, -192.912765, 25.427370, 0.000000, 0.000000, 91.30001; //sign
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)