ManualVehicleEngineAndLights();
#include <a_samp>new bool:EngineON[MAX_VEHICLES];public OnFilterScriptInit() { ManualVehicleEngineAndLights();print(\"Motorindító FS betöltve\");return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(!strcmp(cmdtext, \"/motor\", true)) { new vehicleid = GetPlayerVehicleID(playerid); if(!EngineON[vehicleid]) { EngineON[vehicleid] = true; UpdateVehicleParamsEx(vehicleid, true, \"Engine\");}else { EngineON[vehicleid] = false; UpdateVehicleParamsEx(vehicleid, false, \"Engine\"); return 1;} } return 1;}stock UpdateVehicleParamsEx(vehicleid, bool: status, {_, Float}: ...) { // készítő: Ryder new vehicleParams[7];new vehicleParamsData[7][10] = { {\"Engine\"},{\"Lights\"}, {\"Alarm\"}, {\"Doors\"}, {\"Bonnet\"}, {\"Boot\"}, {\"Objective\"} }; new totalArgs = numargs(); if(totalArgs < 3) {return 0;} GetVehicleParamsEx(vehicleid, vehicleParams[0], vehicleParams[1], vehicleParams[2], vehicleParams[3], vehicleParams[4], vehicleParams[5], vehicleParams[6]); for(new i = 2, j = 0, ch = \'\\0\'; i != totalArgs; ++i) { new tempString[10]; for(j = 0; (ch = getarg(i, j)) != EOS; ++j) { tempString[j] = ch; } for(j = 0; j != sizeof(vehicleParamsData); ++j) { if(!strcmp(vehicleParamsData[j], tempString, true)) { vehicleParams[j] = status; } } } SetVehicleParamsEx(vehicleid, vehicleParams[0], vehicleParams[1], vehicleParams[2], vehicleParams[3], vehicleParams[4], vehicleParams[5], vehicleParams[6]); return 1;}
#include <zcmd> //mod elejérepublic OnGameModeInit() //alá valahová{ManualVehicleEngineAndLights();return 1;}//==========================CMD:motorbe(playerid, params[]){ new vid = GetPlayerVehicleID(playerid); if(vid != INVALID_VEHICLE_ID) GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); return 1;}CMD:motorki(playerid, params[]){ new vid = GetPlayerVehicleID(playerid); if(vid != INVALID_VEHICLE_ID) GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); return 1;}