Need help with parking cars in virtual worlds...
#1

Ok so I made a dynamic garage system for my server...evertything is cool but every garage has it's own VW.
And when i /park a car in the garage it sets the car's VW to 0 again....
I tried with GetPlayerVirtualWorld...tried with SetVehicleVirtual world and it's still the same...if anyone can help i will apreciate it
Here is the /park CMD:
pawn Код:
CMD:park(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
if(GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVeh] && GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVVeh]) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle you can park.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, " You have parked your vehicle, it will always spawn here until you park it somewhere else.");
    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh])
    {
        for(new i=0; i<14; i++)
        {
            PlayerInfo[playerid][pVehMod][i] = GetVehicleComponentInSlot(PlayerInfo[playerid][pVeh], i);
        }
        GetVehiclePos(PlayerInfo[playerid][pVeh],PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
        GetVehicleZAngle(PlayerInfo[playerid][pVeh],PlayerInfo[playerid][vA]);
        DestroyVehicle(PlayerInfo[playerid][pVeh]);
        PlayerInfo[playerid][pVeh] = CreateVehicle(PlayerInfo[playerid][vModel], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ],PlayerInfo[playerid][vA],PlayerInfo[playerid][vC1],PlayerInfo[playerid][vC2],1200);
        ChangeVehiclePaintjob(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vPJ]);
        SetVehicleToRespawn(PlayerInfo[playerid][pVeh]);
        for(new i=0; i<14; i++)
        {
            AddVehicleComponent(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVehMod][i]);
        }
    }
return 1;
}
Reply
#2

lol can anyone help it's kind of urgent?
Reply
#3

Solved!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)