05.11.2012, 13:58
You're only checking trailers IF they are attached. Are you looking for god-mode trailers all the time, or do you actually need the health amounts for individual trailers?
Heres something to start with:
Some notes on the loop you provided: If GetPlayerVehicleID returns a value OTHER than INVALID_VEHICLE_ID....you don't need to further check IsPlayerInAnyVehicle. If it returned a valid ID...they are in a vehicle.
Heres something to start with:
Код:
new vmodel; for(new v; v < MAX_VEHICLES; v++) { vmodel = GetVehicleModel(v); switch(vmodel) { case 435,450,569,570,584,590,591,606,607,608,610,611: //all trailers according to wiki.sa-mp.com { SetVehicleHealth(v,1000); } } }