15.07.2013, 12:40
Basically I have made my vehicle system in Dini. I'm unsure how to make the code open the vehicle file of the vehicle i am in to change the colour when they use this command.
pawn Код:
command(setvcolour, playerid, params[])
{
if(PlayerInfo[playerid][Admin] >= 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
new colour[2], string[128];
if(sscanf(params, "dd", colour[0], colour[1]))return SendClientMessage(playerid, COLOUR_WHITE, "HINT: /setvcolour [Colour1] [Colour2]");
{
new Vehiclefile[256];
new vcid;
vcid = GetPlayerVehicleID(playerid);
format(Vehiclefile, sizeof(Vehiclefile), "vehicles/Vehicle_%d.ini", id);
{
Vehicles[id][Colour1] = colour[0];
Vehicles[id][Colour1] = colour[1];
SendClientMessage(playerid, COLOUR_WHITE, "CHANGED" );
ChangeVehicleColor(vcid, colour[0], colour[1]);
}
}
}
}
return 1;
}