Help with garage and virtualworld
#1

Hello, today i made a new system that allows me to buy a garage and enter there with car. I made every garage have it own virtualworld so it's easier to find something. Now i got it also working with "/v park" which saves my car virtualworld what is very good. Now when something happens with my car, i mean "/dropcar" or car explode which make car to "SetVehicleToRespawn" i want it also to save my virtualworld. I hope you can help me.
Reply
#2

Bump! Can someone help me with respawning a car in a different virtualworld , not as usual it spawn to virtualworld 0
Reply
#3

SetVehicleVirtualWorld(vehicleid, worldid);
GetVehicleVirtualWorld(vehicleid);
Reply
#4

i tried many ways but nothing. I also made new system that saves vehicle Virtualworld into cars.cfg when i use /v park.
This is my code :
pawn Код:
if(strcmp(cmd, "/respawnthiscar", true) == 0 || strcmp(cmd, "/rtc", true) == 0) //by Ellis
    {
        new carid;
        if(IsPlayerConnected(playerid))
        if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
        else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
        else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; }
        else { return 1; }
        {
            if(PlayerInfo[playerid][pAdmin] < 2 )
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
                return 1;
            }
            if(IsPlayerInAnyVehicle(playerid))
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, 256, "[ADMIN] %s has just respawned vehicle id %d.",sendername,GetPlayerVehicleID(playerid));
                ABroadCast(COLOR_YELLOW,string,1);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "   Vehicle Respawned !");
                SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), CarInfo[carid][cVw]);
            }
        }
        return 1;
    }
CarInfo[carid][cVw]); is saved virtualworld for car in cars.cfg. When i type /rtc i want it to getvehiclevirtualworld from [cVw] and SetVehicleToRespawn with this virtualworld but it spawns my car in virtualworld that i'm currently in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)