SA-MP Forums Archive
Editing .inc file - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Editing .inc file (/showthread.php?tid=296220)



Editing .inc file - xGoldenx - 10.11.2011

Hi.
I wanted to change spawning cars' colors in the .inc file, but it takes no effects in the game...

Here is the code:
pawn Код:
GameModeInit_Police()
{
    // Add vehicles to the Los Santos Police Impound
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLSPD, 1555.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Car LSPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 1560.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 1565.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLSPD, 1570.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Car LSPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 1575.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 1580.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLSPD, 1585.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Car LSPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 1590.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 1595.0, -1710.75, 6.0, 0, random(126), random(126), 600); // Police Ranger

    // Add vehicles to the San Fierro Police Impound
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceSFPD, -1573.0, 701.0, -5.0, 90, random(126), random(126), 600); // Police Car SFPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, -1573.0, 706.0, -5.0, 90, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, -1573.0, 711.0, -5.0, 90, random(126), random(126), 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceSFPD, -1573.0, 716.0, -5.0, 90, random(126), random(126), 600); // Police Car SFPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, -1573.0, 721.0, -5.0, 90, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, -1573.0, 726.0, -5.0, 90, random(126), random(126), 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceSFPD, -1573.0, 731.0, -5.0, 90, random(126), random(126), 600); // Police Car SFPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, -1573.0, 736.0, -5.0, 90, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, -1573.0, 741.0, -5.0, 90, random(126), random(126), 600); // Police Ranger

    // Add vehicles to the Las Venturas Police Impound
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLVPD, 2282.0, 2477.0, 11.0, 180, random(126), random(126), 600); // Police Car LVPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 2277.0, 2477.0, 11.0, 180, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 2272.0, 2477.0, 11.0, 180, 0, 1, 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLVPD, 2262.0, 2477.0, 11.0, 180, random(126), random(126), 600); // Police Car LVPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 2257.0, 2477.0, 11.0, 180, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 2252.0, 2477.0, 11.0, 180, 0, 1, 600); // Police Ranger

    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLVPD, 2282.0, 2443.0, 11.0, 0, random(126), random(126), 600); // Police Car LVPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 2277.0, 2443.0, 11.0, 0, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 2272.0, 2443.0, 11.0, 0, 0, 1, 600); // Police Ranger
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceLVPD, 2262.0, 2443.0, 11.0, 0, random(126), random(126), 600); // Police Car LVPD
    LastVehicleID = Vehicle_AddStatic(VehicleHPV1000, 2257.0, 2443.0, 11.0, 0, random(126), random(126), 600); // Police MotorCycle
    LastVehicleID = Vehicle_AddStatic(VehiclePoliceRanger, 2252.0, 2443.0, 11.0, 0, 0, 1, 600); // Police Ranger
}
Why it doesn't work? I saved Ranger's colors to 0,1 and 000,001 too, saved .inc file and uploaded it to /include/. Still no changes in the game.


Re: Editing .inc file - MP2 - 10.11.2011

You need to re-compile the gamemode in which the include is used.


Re: Editing .inc file - xGoldenx - 10.11.2011

Thank you very much! It really works now!