new bool:feladat=false;new bool:feladatvege=false;if( !feladat ){new var0 = 0;var0 = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, var0)) { new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));if (pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515) { new string[200]; new rand = random(sizeof(TruckingMissionRandom)); CreatePlayerMission(playerid, TruckingMissionRandom[rand][useTrailerCheck], TruckingMissionRandom[rand][MissionPay], TruckingMissionRandom[rand][loadx],TruckingMissionRandom[rand][loady], TruckingMissionRandom[rand][loadz], TruckingMissionRandom[rand][unloadx],TruckingMissionRandom[rand][unloady], TruckingMissionRandom[rand][unloadz]); format(string, sizeof(string), \"Feladat: %s\", TruckingMissionRandom[rand][MissionName]); SendClientMessage(playerid, 0x00FF00FF, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem dolgozhatsz ilyen jármûvel!\"); }feladat=true;}}else if( feladatvege ) { CancelPlayersCurrentMission(playerid); feladat=false; SendClientMessage(playerid, 0xFF0000AA, \"Feladat megszakítva!\"); } }
if(newkeys & KEY_SUBMISSION) //2-es gombal feladatot ad { if( !feladat ) { new var0 = 0; var0 = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, var0)) { new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid)); if (pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515) { new string[200]; new rand = random(sizeof(TruckingMissionRandom)); CreatePlayerMission(playerid, TruckingMissionRandom[rand][useTrailerCheck], TruckingMissionRandom[rand][MissionPay], TruckingMissionRandom[rand][loadx],TruckingMissionRandom[rand][loady], TruckingMissionRandom[rand][loadz], TruckingMissionRandom[rand][unloadx],TruckingMissionRandom[rand][unloady], TruckingMissionRandom[rand][unloadz]); format(string, sizeof(string), \"Feladat: %s\", TruckingMissionRandom[rand][MissionName]); SendClientMessage(playerid, 0x00FF00FF, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem dolgozhatsz ilyen jármûvel!\"); } feladat=true; }} else if( !feladatvege ) { CancelPlayersCurrentMission(playerid); feladat=false; SendClientMessage(playerid, 0xFF0000AA, \"Feladat megszakítva!\"); new dosh = 0; dosh = GetPlayerMoney(playerid), GivePlayerMoney(playerid, dosh+1000); } }