30.08.2009, 20:21
You will still need to keep the code OnGameModeInit, since this isn't called on creation. The 2 second timer is cause OnVehicleSpawn seems to be called a bit earlier than we need to mod vehicles. Sometimes spawns without or desyncs for some people.
pawn Код:
public OnVehicleSpawn(vehicleid)
{
SetTimerEx("RemodVehicle", 2000, 0, "i", vehicleid);
return 1;
}
forward RemodVehicle(vehicleid);
public RemodVehicle(vehicleid)
{
if(vehicleid == tun1)
{
ChangeVehiclePaintjob(tun1,1);
AddVehicleComponent(tun1,1034);
AddVehicleComponent(tun1,1036);
AddVehicleComponent(tun1,1038);
AddVehicleComponent(tun1,1040);
AddVehicleComponent(tun1,1049);
AddVehicleComponent(tun1,1073);
SetVehicleNumberPlate(tun1, "SOBANDTS");
}
return 1;
}

