Help with garage and virtualworld
#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


Messages In This Thread
Help with garage and virtualworld - by Kenka - 20.06.2011, 15:51
Re: Help with garage and virtualworld - by Kenka - 20.06.2011, 20:06
Re: Help with garage and virtualworld - by =WoR=Varth - 20.06.2011, 20:10
Re: Help with garage and virtualworld - by Kenka - 21.06.2011, 08:27

Forum Jump:


Users browsing this thread: 1 Guest(s)