if(!strcmp(cmd, \"/motor\", true) || !strcmp(cmd, \"/motor\", true)){ if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(!engineOn[GetPlayerVehicleID(playerid)]) { if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; } if(Gas[idcar] <= 0) { Msg(playerid, \"Nincs benzin!\"); return 1; } if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pPcarkey] == idcar) { } else if(PlayerInfo[playerid][pPcarkey2] == idcar) { } else { Msg(playerid,\"Nincs kulcsod ehhez a kocsihoz, ezért el kell lopnod! (( /ellop ))\"); return 1; } } if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) { return 1; } if(idcar == 59 || idcar == 60) { return 1; } if(idcar >= 135 && idcar <= 154) { if(HireCar[playerid] != idcar) { return 1; } } if(IsAHarvest(idcar)) { return 1; } if(IsASweeper(idcar)) { return 1; } if(gEngine[playerid] == 1) { return 1; } new playerveh = GetPlayerVehicleID(playerid); PutPlayerInVehicle(playerid, playerveh, 0); SendClientMessage(playerid, COLOR_LIGHTGREEN,\"Beindítod a motort...\"); SetTimerEx(\"StartingTheVehicle\",2000,0,\"i\",playerid); GameTextForPlayer(playerid, \"~w~Indítás...\",2000,3); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), \"(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /motor\",d,m,y,h,mi,s,sendername); CommandLog(string); return 1; } else if(engineOn[GetPlayerVehicleID(playerid)]) { if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; } if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) { return 1; } if(idcar == 59 || idcar == 60) { return 1; } if(idcar >= 135 && idcar <= 154) { if(HireCar[playerid] != idcar) { return 1; } } if(IsAHarvest(idcar)) { return 1; } if(IsASweeper(idcar)) { return 1; } engineOn[GetPlayerVehicleID(playerid)] = false; //SafeRemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid,0); format(string, sizeof(string), \"* Valaki leállította a motort. \"); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); gEngine[playerid] = 0; new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), \"(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine\",d,m,y,h,mi,s,sendername); CommandLog(string); return 1; } } } return 1;}
engineOn[GetPlayerVehicleID(playerid)] = true; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* Valaki Beindította a jármûve motorját.\"); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); gEngine[playerid] = 1; } case 3: { engineOn[GetPlayerVehicleID(playerid)] = true; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* Valaki Beindította a jármûve motorját.\"); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); gEngine[playerid] = 1;
engineOn[GetPlayerVehicleID(playerid)] = true; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* Valaki Beindította a jármûve motorját.\"); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); gEngine[playerid] = 1; new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); } case 3: { engineOn[GetPlayerVehicleID(playerid)] = true; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* Valaki Beindította a jármûve motorját.\"); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); gEngine[playerid] = 1; new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
new engine,lights,alarm,doors,bonnet,boot,objective;GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
ManualVehicleEngineAndLights()