No guarda color del vehiculo
#6

No entendi muy bien como ponerlo al guardado tuning... me quedo asi:

pawn Код:
new colorveh1[MAX_VEHICLES],colorveh2[MAX_VEHICLES];
#define ChangeVehicleColor ChangeVehicleColorEx
#define GetVehicleColor1(%0) colorveh1[%0]
#define GetVehicleColor2(%0) colorveh2[%0]

CMD:scar(playerid, params[])
    {
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1, ""RO"* No estбs en ningъn vehiculo");
    new pname[24];
    new file[256];
   
    new Model, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9;
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "Tuned Cars/%s.sav", pname);
    if(!dini_Exists(file))
    {
    dini_Create(file);
    }
    Model=GetVehicleModel(GetPlayerVehicleID(playerid));
    comp1 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SPOILER);
    comp2 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HOOD);
    comp3 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_ROOF);
    comp4 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SIDESKIRT);
    comp5 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_EXHAUST);
    comp6 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_WHEELS);
    comp7 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HYDRAULICS);
    comp8 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_FRONT_BUMPER);
    comp9 = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_REAR_BUMPER);
    dini_IntSet(file,"ID",Model);
    dini_IntSet(file,"COLOR1",GetVehicleColor1(GetPlayerVehicleID(playerid)));
    dini_IntSet(file,"COLOR2",GetVehicleColor2(GetPlayerVehicleID(playerid)));
    dini_IntSet(file,"COMPONENT1",comp1);
    dini_IntSet(file,"COMPONENT2",comp2);
    dini_IntSet(file,"COMPONENT3",comp3);
    dini_IntSet(file,"COMPONENT4",comp4);
    dini_IntSet(file,"COMPONENT5",comp5);
    dini_IntSet(file,"COMPONENT6",comp6);
    dini_IntSet(file,"COMPONENT7",comp7);
    dini_IntSet(file,"COMPONENT8",comp8);
    dini_IntSet(file,"COMPONENT9",comp9);
    dini_IntSet(file,"PAINTJOB",paintjob[GetPlayerVehicleID(playerid)]);
    SendClientMessage(playerid,-1,""BL"* Has guardado tu vehiculo personal");
    return 1;
    }
    CMD:lcar(playerid, params[])
    {
        new pname[24];
        GetPlayerName(playerid, pname, sizeof(pname));
        new file[256];format(file,sizeof(file),"Tuned Cars/%s.sav", pname);
       
        if(dini_Isset(file,"ID")){
        CarSpawner(playerid, dini_Int(file,"ID"));
        ChangeVehicleColor(GetPlayerVehicleID(playerid), dini_Int(file,"COLOR1"), dini_Int(file,"COLOR2"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT1"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT2"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT3"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT4"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT5"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT6"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT7"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT8"));
        AddVehicleComponent(GetPlayerVehicleID(playerid), dini_Int(file,"COMPONENT9"));
        ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), dini_Int(file,"PAINTJOB"));
        SendClientMessage(playerid, 0x00FF00FF, ""VE"* Has cargado tu vehiculo personal");
        }
        else SendClientMessage(playerid, -1, ""RO"* No tienes vehiculo personal");
        return 1;
    }

stock ChangeVehicleColorEx(vehicleid, color1, color2){
colorveh1[vehicleid] = color1;
colorveh2[vehicleid] = color2;
return ChangeVehicleColor(vehicleid, color1, color2); }
pero no puse el OnVehicleSpawn porque cambio el color del vehiculo con el /lcar, o hay que ponerlo? y no se que paso pero despues quize cambiar el color y no se cambio ss
Reply


Messages In This Thread
No guarda color del vehiculo - by pep_25 - 12.12.2013, 23:00
Respuesta: No guarda color del vehiculo - by EduGTA - 12.12.2013, 23:30
Respuesta: No guarda color del vehiculo - by OTACON - 12.12.2013, 23:44
Respuesta: No guarda color del vehiculo - by pep_25 - 12.12.2013, 23:57
Respuesta: No guarda color del vehiculo - by OTACON - 13.12.2013, 00:06
Respuesta: No guarda color del vehiculo - by pep_25 - 13.12.2013, 00:16
Respuesta: No guarda color del vehiculo - by OTACON - 13.12.2013, 00:25
Respuesta: No guarda color del vehiculo - by pep_25 - 13.12.2013, 00:39
Respuesta: No guarda color del vehiculo - by pep_25 - 13.12.2013, 00:53
Respuesta: No guarda color del vehiculo - by OTACON - 13.12.2013, 01:26

Forum Jump:


Users browsing this thread: 1 Guest(s)