> Problem with loading player vehicles..
#2

pawn Код:
function SystemConnect_Vehicles(id)
{
    for(new i; i < MAX_PLAYER_CARS; i++)
    {
        LoadPlayerVehicle(id, i);
    }
    return 1;
}
stock LoadPlayerVehicle(id, SlotID)
{
    new s[75];
    format(s, sizeof(s), "kVehicles/%s_slot_%d.ini", Name(id), SlotID);
    if(fexist(s))
    {
        INI_ParseFile(s, "LoadVehicles_%s", .bExtra = true, .extra = id); //This is the line - Idk
        Createvehicle(id);
    }
    return 1;
}
forward LoadVehicles_data(id, SlotID, name[], value[]);
public LoadVehicles_data(id, SlotID, name[], value[])
{
    INI_Int("ModelID", PlayerCar[id][SlotID][CarID]);
    INI_Float("X", PlayerCar[id][SlotID][X]);
    INI_Float("Y", PlayerCar[id][SlotID][Y]);
    INI_Float("Z", PlayerCar[id][SlotID][Z]);
    return 1;
}
stock Createvehicle(id)
{
    CreateVehicle(PlayerCar[id][SlotId][CarId],PlayerCar[id][SlotID][X],PlayerCar[id][SlotID][X],PlayerCar[id][SlotID][X],90,-1,-1,1);
}
Try that , not test.
Reply


Messages In This Thread
> Problem with loading player vehicles.. - by Jacapo - 13.01.2014, 14:21
Re: > Problem with loading player vehicles.. - by SilentSoul - 13.01.2014, 14:26
Re: > Problem with loading player vehicles.. - by Jacapo - 13.01.2014, 17:58
Re: > Problem with loading player vehicles.. - by Jacapo - 13.01.2014, 19:30
Re: > Problem with loading player vehicles.. - by Jacapo - 15.01.2014, 16:15

Forum Jump:


Users browsing this thread: 1 Guest(s)