http://sampforum.hu/index.php?topic=15471.msg176482#msg176482
Ez egy bug benne én is kerestem a hibát de nem tudom énse :S
COMMAND:park(playerid, params[]){// Setup local variablesnew Float:x, Float:y, Float:z, Float:rot, vid, HouseID, Msg[128];new engine,lights,alarm,doors,bonnet,boot,objective;// If a player hasn\'t logged in properly, he cannot use this commandif (INT_IsPlayerLoggedIn(playerid) == 0) return 0;// Check if the player is inside a vehicle (he must be the driver)if (GetPlayerVehicleSeat(playerid) == 0){// Get the vehicle-idvid = GetPlayerVehicleID(playerid);// Get the HouseID to which this vehicle belongsHouseID = AVehicleData[vid][belongsToHouse];// Check if this vehicle belongs to a house (if not, the vehicle cannot be parked, as it\'s not a house-vehicle)if (HouseID != 0){ // Check if the vehicle is in range of the house-entrance (you cannot park a vehicle further away from your house than 150m) if (IsPlayerInRangeOfPoint(playerid, ParkRange, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ])) { // Get the player\'s position and angle GetVehiclePos(vid, x, y, z); GetVehicleZAngle(vid, rot); // Save those values for the vehicle AVehicleData[vid][spawnX] = x; AVehicleData[vid][spawnY] = y; AVehicleData[vid][spawnZ] = z; AVehicleData[vid][spawnRot] = rot; // Loop through all carslots of this house to find the vehicle-id for (new CarSlot; CarSlot < 10; CarSlot++) { // Check if this carslot holds the same vehicle-id if (AHouseData[HouseID][VehicleIDs][CarSlot] == vid) { House_ReplaceVehicle(HouseID, CarSlot); // Re-create the vehicle at the same spot the player wants to park his vehicle PutPlayerInVehicle(playerid, AHouseData[HouseID][VehicleIDs][CarSlot], 0); // Turn on the engine and lights GetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], 1, 1, alarm, doors, bonnet, boot, objective); break; // Stop the for-loop } } // Let the player know he parked his vehicle SendClientMessage(playerid, 0xFFFFFFFF, \"{00FF00}Leparkoltad a jármûved.\"); // Save the housefile HouseFile_Save(HouseID); } else { format(Msg, 128, \"{FFFF00}%iméteren{FF0000} belül kell parkolj a házadhoz közel.\", ParkRange); SendClientMessage(playerid, 0xFFFFFFFF, Msg); }}else SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Nem tudod leparkolni a jármûved, mert nem a te tulajdonodban van!\");}else SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Csak jármûben tudod leparkolni a saját jármûvedet.\");// Let the server know that this was a valid commandreturn 1;}
new component;for(new slot = 1; slot <= 13; slot++){component = GetVehicleComponentInSlot(vid,slot);//component változóba vagy/majd fájlba mentése}