07.08.2016, 14:01
hello, i have a problem
but server_log :
[16:00:53] lancement du vehfonc
[16:00:53] Vйrification du moteur id 1.
[16:00:53] id 1, moteur йteint.
it was the fact that id 1, I will like it has done on all vehicles, can you help me ?
PHP код:
function vehfonc(){
print("lancement du vehfonc");
for(new vid = 1; vid < MAX_VEHICLES; vid++){
new engine, lights, alarm, doors, bonnet, boot, objective,str[128];
if(GetVehicleModel(vid) == 481 || GetVehicleModel(vid) == 509 || GetVehicleModel(vid) == 510) return 1;
if(vinfo[vid][Essence] > 0){
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
printf("Vйrification du moteur id %d.",vid);
if(engine == 0) return printf("id %d, moteur йteint.",vid);
if(vinfo[vid][Job] > 0 && vinfo[vid][Job] < 100) return printf("id %d, vehicule job.",vid);
vinfo[vid][Essence] -= 1;
print("retrait de l'essence id %d");
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++){
if(GetPlayerVehicleID(i) == vid){
format(str, sizeof(str), "Essence: %d", vinfo[vid][Essence]);
PlayerTextDrawSetString(i, TextEssenceVeh[i], str);
}
}
}
else{
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vid, 0, lights, alarm, vinfo[vid][Doors], bonnet, boot, objective);
}
}
return 1;
}
[16:00:53] lancement du vehfonc
[16:00:53] Vйrification du moteur id 1.
[16:00:53] id 1, moteur йteint.
it was the fact that id 1, I will like it has done on all vehicles, can you help me ?