Tessék, ez megy. Én is ezt használom: ( Ez annyi, h megmarad rajta a tuning )
#include a_samp
new TunedCar[2], TuneTimer;
public OnFilterScriptInit()
{
TunedCar[0] = AddStaticVehicle(560,2825.716,1847.542,10.590,182.0,-1,-1); // Sultan
TunedCar[1] = AddStaticVehicle(560,2825.716,1847.542,10.590,182.0,-1,-1); // Sultan
TuneCar(); // Ez muszály ide, mert az elsõ spawnnál az OnVehicleSpawn nem hívódik meg.
return 1;
}
public OnVehicleSpawn(vehicleid)
{
TuneTimer = SetTimer(\"TuneCar\", 1000, false);
return 1;
}
forward TuneCar();
public TuneCar()
{
for(new i = 0; i < sizeof(TunedCar); i++) // Ciklus létrehozása, a TunedCar méretével.
{
AddVehicleComponent(TunedCar, 1026);
AddVehicleComponent(TunedCar, 1027);
AddVehicleComponent(TunedCar, 1028);
AddVehicleComponent(TunedCar, 1033);
AddVehicleComponent(TunedCar, 1139);
AddVehicleComponent(TunedCar, 1141);
AddVehicleComponent(TunedCar, 1169);
AddVehicleComponent(TunedCar, 1010);
ChangeVehiclePaintjob(TunedCar, 2);
}
KillTimer(TuneTimer);
return 1;
}
Õõ nem include <a_samp> ?
#include <a_samp>
new TunedCar[2], TuneTimer;
public OnFilterScriptInit()
{
TunedCar[0] = AddStaticVehicle(560,2825.716,1847.542,10.590,182.0,-1,-1); // Sultan
TunedCar[1] = AddStaticVehicle(560,2825.716,1847.542,10.590,182.0,-1,-1); // Sultan
TuneCar(); // Ez muszály ide, mert az elsõ spawnnál az OnVehicleSpawn nem hívódik meg.
return 1;
}
public OnVehicleSpawn(vehicleid)
{
TuneTimer = SetTimer(\"TuneCar\", 1000, false);
return 1;
}
forward TuneCar();
public TuneCar()
{
for(new i = 0; i < sizeof(TunedCar); i++) // Ciklus létrehozása, a TunedCar méretével.
{
AddVehicleComponent(i, 1026);
AddVehicleComponent(i, 1027);
AddVehicleComponent(i, 1028);
AddVehicleComponent(i, 1033);
AddVehicleComponent(i, 1139);
AddVehicleComponent(i, 1141);
AddVehicleComponent(i, 1169);
AddVehicleComponent(i, 1010);
ChangeVehiclePaintjob(i, 2);
}
KillTimer(TuneTimer);
return 1;
}