CMD:cst(playerid, params[]){#pragma unused params new vehid = GetClosestVehicle(playerid);if(VehicleInfo[vehid][VEH_BOOT] == 0){VehicleInfo[vehid][VEH_BOOT] = 1;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_ON, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Kinyitottad a csomagtartót !\");format(strg, sizeof(strg), \"%s kinyitotta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}else if(VehicleInfo[vehid][VEH_BOOT] == 1){VehicleInfo[vehid][VEH_BOOT] = 0;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_OFF, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Becsuktad a csomagtartót !\");format(strg, sizeof(strg), \"%s becsukta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}return 1;}
CMD:cst(playerid, params[]){#pragma unused params new vehid = GetClosestVehicle(playerid);if(VehicleInfo[vehid][VEH_BOOT] == 0){VehicleInfo[vehid][VEH_BOOT] = 1;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_ON, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Kinyitottad a csomagtartót !\");format(strg, sizeof(strg), \"%s kinyitotta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}else if(VehicleInfo[vehid][VEH_BOOT] == 1){VehicleInfo[vehid][VEH_BOOT] = 0;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo [vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_OFF, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Becsuktad a csomagtartót !\");format(strg, sizeof(strg), \"%s becsukta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}return 1;}
Üdv!Lenne egy kis problémám a csomagtartó kinyitásával, akárhogy próbálom, nem nyílik ki a csomagtartó. A motorháztetõ kinyitását sikerült megoldani úgyanígy, de valahogy a csomagtartóval nem mûködik.Itt van a parancs: CMD:cst(playerid, params[]){#pragma unused params new vehid = GetClosestVehicle(playerid);if(VehicleInfo[vehid][VEH_BOOT] == 0){VehicleInfo[vehid][VEH_BOOT] = 1;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_ON, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Kinyitottad a csomagtartót !\");format(strg, sizeof(strg), \"%s kinyitotta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}else if(VehicleInfo[vehid][VEH_BOOT] == 1){VehicleInfo[vehid][VEH_BOOT] = 0;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_OFF, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Becsuktad a csomagtartót !\");format(strg, sizeof(strg), \"%s becsukta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}return 1;} Megköszönném, ha segítenétek, mert már hetek óta gondolkozom ezen
new vBoot[MAX_PLAYERS];new engine,lights,alarm,doors,bonnet,boot,objective;CMD:cst(playerid, params[]){if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");new VehID = GetPlayerVehicleID(playerid);if(vBoot[VehID] == 0){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,1,objective);vBoot[VehID] = 1;}else if(vBoot[VehID] == 1){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,0,objective);vBoot[VehID] = 0;}return 1;}
Üdv!Lenne egy kis problémám a csomagtartó kinyitásával, akárhogy próbálom, nem nyílik ki a csomagtartó. A motorháztetõ kinyitását sikerült megoldani úgyanígy, de valahogy a csomagtartóval nem mûködik.Itt van a parancs: CMD:cst(playerid, params[]){#pragma unused params new vehid = GetClosestVehicle(playerid);if(VehicleInfo[vehid][VEH_BOOT] == 0){VehicleInfo[vehid][VEH_BOOT] = 1;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_ON, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Kinyitottad a csomagtartót !\");format(strg, sizeof(strg), \"%s kinyitotta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}else if(VehicleInfo[vehid][VEH_BOOT] == 1){VehicleInfo[vehid][VEH_BOOT] = 0;SetVehicleParamsEx(vehid, VehicleInfo[vehid][VEH_ENGINE], VehicleInfo[vehid][VEH_LIGHTS], VehicleInfo[vehid][VEH_ALARM], VehicleInfo[vehid][VEH_DOORS], VehicleInfo[vehid][VEH_BONNET], VEHICLE_PARAMS_OFF, VehicleInfo[vehid][VEH_OBJECTIVE]);SendClientMessage(playerid, COLOR_AUTO, \"Becsuktad a csomagtartót !\");format(strg, sizeof(strg), \"%s becsukta a csomagtartót.\", GetName(playerid));ProxDetector(20.0, playerid, strg,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);Add_Log(CmdLog, strg);return 1;}return 1;} Megköszönném, ha segítenétek, mert már hetek óta gondolkozom ezen new vBoot[MAX_PLAYERS];new engine,lights,alarm,doors,bonnet,boot,objective;CMD:cst(playerid, params[]){if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");new VehID = GetPlayerVehicleID(playerid);if(vBoot[VehID] == 0){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,1,objective);vBoot[VehID] = 1;}else if(vBoot[VehID] == 1){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,0,objective);vBoot[VehID] = 0;}return 1;} Nálam ez tökéletesen mûködik. [/quote]Így: new vBoot[MAX_PLAYERS];new engine,lights,alarm,doors,bonnet,boot,objective;CMD:cst(playerid, params[]){if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");new VehID = GetPlayerVehicleID(playerid);if(vBoot[VehID] == 0){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,0,boot,objective);vBoot[VehID] = 1;}else if(vBoot[VehID] == 1){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,0,boot,objective);vBoot[VehID] = 0;}return 1;}
new vBoot[MAX_PLAYERS];new engine,lights,alarm,doors,bonnet,boot,objective;CMD:cst(playerid, params[]){if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");new VehID = GetPlayerVehicleID(playerid);if(vBoot[VehID] == 0){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,0,boot,objective);vBoot[VehID] = 1;}else if(vBoot[VehID] == 1){GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);SetVehicleParamsEx(VehID,engine,lights,alarm,doors,0,boot,objective);vBoot[VehID] = 0;}return 1;}