if(strcmp(cmd, \"/motor\", true) == 0){ if(IsPlayerConnected(playerid)) { new newcar; newcar = GetPlayerVehicleID(playerid); if(IsAnOwnableCar(newcar)) { if(PlayerInfo[playerid][pPcarkey] == newcar) { } else if(PlayerInfo[playerid][pPcarkey2] == newcar) { } else if(PlayerInfo[playerid][pPcarkey3] == newcar) { } else { SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\"); return 1; } } if(IsPlayerInAnyVehicle(playerid)) { if(!engineOn[GetPlayerVehicleID(playerid)]) // jármű elindítás { if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; } if(kerekbilincs[GetPlayerVehicleID(playerid)] != 0) { SendClientMessage(playerid, COLOR_LIGHTRED, \"A jármű kerekén kerékbilincs van.\"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; } if(gEngine[playerid] == 0) { if(Gas[newcar] >= 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = true; SetTimerEx(\"StartingTheVehicle\",3500,0,\"i\",playerid); format(string, sizeof(string), \"* %s elkezdett beindítani egy járművet.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective); TogglePlayerControllable(playerid, false); gEngine[playerid] = 1; return 1; } else SendClientMessage(playerid, COLOR_GREY, \"Kifogyott az üzemanyag.\"); } } if(engineOn[GetPlayerVehicleID(playerid)]) // jármű leállítás { if(gEngine[playerid] == 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = false; TogglePlayerControllable(playerid, true); PutPlayerInVehicle(playerid, newcar, 0); format(string, sizeof(string), \"* %s leállította egy jármű motorját.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective); gEngine[playerid] = 0; return 1; } } } else SendClientMessage(playerid, COLOR_GREY, \"Nem vagy járműben.\"); } return 1;}
if(strcmp(cmd, \"/motor\", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { new newcar; newcar = GetPlayerVehicleID(playerid); if(IsAnOwnableCar(newcar)) { if(PlayerInfo[playerid][pPcarkey] != newcar && PlayerInfo[playerid][pPcarkey2] != newcar && PlayerInfo[playerid][pPcarkey3] != newcar) { SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\"); return 1; } else { if(!engineOn[GetPlayerVehicleID(playerid)]) // jármű elindítás { if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; } if(kerekbilincs[GetPlayerVehicleID(playerid)] != 0) { SendClientMessage(playerid, COLOR_LIGHTRED, \"A jármű kerekén kerékbilincs van.\"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; } if(gEngine[playerid] == 0) { if(Gas[newcar] >= 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = true; SetTimerEx(\"StartingTheVehicle\",3500,0,\"i\",playerid); format(string, sizeof(string), \"* %s elkezdett beindítani egy járművet.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective); TogglePlayerControllable(playerid, false); gEngine[playerid] = 1; return 1; } else SendClientMessage(playerid, COLOR_GREY, \"Kifogyott az üzemanyag.\"); } } if(engineOn[GetPlayerVehicleID(playerid)]) // jármű leállítás { if(gEngine[playerid] == 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = false; TogglePlayerControllable(playerid, true); PutPlayerInVehicle(playerid, newcar, 0); format(string, sizeof(string), \"* %s leállította egy jármű motorját.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective); gEngine[playerid] = 0; return 1; } } } } else { SendClientMessage(playerid,-1,\"Ez nem IsAnOwnableCar kategóriájú jármű ha van ilyen nézd meg hogy minek kéne lenni és írd még hozzá!\"); } } else SendClientMessage(playerid, COLOR_GREY, \"Nem vagy járműben.\"); } return 1; }
if(strcmp(cmd, \"/motor\", true) == 0){if(IsPlayerConnected(playerid)){if(IsPlayerInAnyVehicle(playerid)){ new newcar; newcar = GetPlayerVehicleID(playerid); if(IsAnOwnableCar(newcar)) { if((PlayerInfo[playerid][pPcarkey] != newcar && PlayerInfo[playerid][pPcarkey2] != newcar && PlayerInfo[playerid][pPcarkey3] != newcar) ) { SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\"); return 1; } } if(RendorKocsik(newcar) && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) { SendClientMessage(playerid, COLOR_LIGHTRED, \"Nincs kulcsod a járműhöz.\"); return 1; } if(!engineOn[GetPlayerVehicleID(playerid)]) // jármű elindítás { if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { return 1; } if(kerekbilincs[GetPlayerVehicleID(playerid)] != 0) { SendClientMessage(playerid, COLOR_LIGHTRED, \"A jármű kerekén kerékbilincs van.\"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; } if(gEngine[playerid] == 0) { if(Gas[newcar] >= 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = true; SetTimerEx(\"StartingTheVehicle\",3500,0,\"i\",playerid); format(string, sizeof(string), \"* %s elkezdett beindítani egy járművet.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective); TogglePlayerControllable(playerid, false); gEngine[playerid] = 1; return 1; } else SendClientMessage(playerid, COLOR_GREY, \"Kifogyott az üzemanyag.\"); } } if(engineOn[GetPlayerVehicleID(playerid)]) // jármű leállítás { if(gEngine[playerid] == 1) { new nev[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(nev)); engineOn[GetPlayerVehicleID(playerid)] = false; TogglePlayerControllable(playerid, true); PutPlayerInVehicle(playerid, newcar, 0); format(string, sizeof(string), \"* %s leállította egy jármű motorját.\", nev); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective); gEngine[playerid] = 0; return 1; } }}else { SendClientMessage(playerid, COLOR_GREY, \"Nem vagy járműben.\");}}return 1;}