new vehicleid, panels, doors, lights, tires;vehicleid = GetPlayerVehicleID(playerid);GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);panels = encode_panels(0, 0, 0, 0, 0, 0, 0); // KarosszériaUpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);doors = encode_doors(0, 0, 0, 0, 0, 0); // Csomagtartó, Motorháztető, AjtókUpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);lights = encode_lights(0, 0, 0, 0); // FényszórókUpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);tires = encode_tires(0, 0, 0, 0); // KerekekUpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);encode_tires(tire1, tire2, tire3, tire4){ return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);}encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper){ return flp | (frp << 4) | (rlp << | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);}encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door){ #pragma unused behind_driver_door #pragma unused behind_passenger_door return bonnet | (boot << | (driver_door << 16) | (passenger_door << 24);}encode_lights(light1, light2, light3, light4){ return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);}
PRCS:fix(playerid,params[]){new vehicleid, panels, doors, lights, tires;vehicleid = GetPlayerVehicleID(playerid);GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);doors = encode_doors(0, 0, 0, 0, 0, 0); // Csomagtartó, Motorháztető, AjtókUpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door){ #pragma unused behind_driver_door #pragma unused behind_passenger_door return bonnet | (boot << | (driver_door << 16) | (passenger_door << 24);}return 1;}
C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1750) : error 017: undefined symbol \"encode_doors\"C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1753) : error 017: undefined symbol \"encode_doors\"C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1755) : error 017: undefined symbol \"behind_driver_door\"C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1756) : error 017: undefined symbol \"behind_passenger_door\"C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1757) : error 017: undefined symbol \"bonnet\"C:\\Users\\Property\\Desktop\\123\\gamemodes\\123.pwn(1759) : warning 225: unreachable codePawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
CMD:repair(playerid, params[]){ if(sscanf(params, \"s[16]\", params[0])) return SendClientMessage(playerid, -1, \"Használat: /repair [engine, panels, doors, lights, tires]\"); new vehicleid, panels, doors, lights, tires; vehicleid = GetPlayerVehicleID(playerid); GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires); if(!strcmp(params[0], \"engine\", true)) { SetVehicleHealth(vehicleid, 1000); // Motor } else if(!strcmp(params[0], \"panels\", true)) { panels = encode_panels(0, 0, 0, 0, 0, 0, 0); // Karosszéria } else if(!strcmp(params[0], \"doors\", true)) { doors = encode_doors(0, 0, 0, 0, 0, 0); // Csomagtartó, Motorháztető, Ajtók } else if(!strcmp(params[0], \"lights\", true)) { lights = encode_lights(0, 0, 0, 0); // Fényszórók } else if(!strcmp(params[0], \"tires\", true)) { tires = encode_tires(0, 0, 0, 0); // Kerekek } else SendClientMessage(playerid, -1, \"Hiba: Nincs ilyen elem.\"); UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); return 1;}encode_tires(tire1, tire2, tire3, tire4){ return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);}encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper){ return flp | (frp << 4) | (rlp << | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);}encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door){ #pragma unused behind_driver_door #pragma unused behind_passenger_door return bonnet | (boot << | (driver_door << 16) | (passenger_door << 24);}encode_lights(light1, light2, light3, light4){ return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);}