07.02.2015, 14:43
Callback `Tunen` does not work. Not tuning car!
Код HTML:
public Tunen(vehicleid) { if(VehiclesInfo[vehicleid][vComponent1]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent1]); } if(VehiclesInfo[vehicleid][vComponent2]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent2]); } if(VehiclesInfo[vehicleid][vComponent3]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent3]); } if(VehiclesInfo[vehicleid][vComponent4]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent4]); } if(VehiclesInfo[vehicleid][vComponent5]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent5]); } if(VehiclesInfo[vehicleid][vComponent6]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent6]); } if(VehiclesInfo[vehicleid][vComponent7]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent7]); } if(VehiclesInfo[vehicleid][vComponent8]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent8]); } if(VehiclesInfo[vehicleid][vComponent9]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent9]); } if(VehiclesInfo[vehicleid][vComponent10]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent10]); } if(VehiclesInfo[vehicleid][vComponent11]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent11]); } if(VehiclesInfo[vehicleid][vComponent12]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent12]); } if(VehiclesInfo[vehicleid][vComponent13]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent13]); } if(VehiclesInfo[vehicleid][vComponent14]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent14]); } if(VehiclesInfo[vehicleid][vComponent15]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent15]); } if(VehiclesInfo[vehicleid][vComponent16]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent16]); } if(VehiclesInfo[vehicleid][vComponent17]!=0) { AddVehicleComponent(vehicleid,VehiclesInfo[vehicleid][vComponent17]); } if(VehiclesInfo[vehicleid][vColor1] != 0 || VehiclesInfo[vehicleid][vColor2] != 0) { ChangeVehicleColor(vehicleid,VehiclesInfo[vehicleid][vColor1],VehiclesInfo[vehicleid][vColor2]); } if(VehiclesInfo[vehicleid][vPaintJob]!=0) { ChangeVehiclePaintjob(vehicleid,VehiclesInfo[vehicleid][vPaintJob]); } }
Код HTML:
CMD:respawnveh(playerid, params []) { for(new v = 0; v < sizeof(VehiclesInfo); v++) { if(VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID] && VehiclesInfo[v][vSlot] == 1) { SetVehicleToRespawn(VehiclesInfo[v][vServerID]); SendClientMessage(playerid, COLOR_YELLOW, "car respawned!"); Tunen(v); } } return 1; }