Szerző Téma: PPC_Housing  (Megtekintve 995 alkalommal)

PPC_Housing
« Dátum: 2012. Május 06. - 17:23:00 »
0 Show voters
Sziasztok!
Hogy oldom azt meg hogy a PPC_Housingba a /park nál ne essen le a tuning???  :D
Én ezt használom:
http://sampforum.hu/index.php?topic=15471.msg176482#msg176482

 
Köszi elõre a helpet!

PPC_Housing
« Válasz #1 Dátum: 2012. Május 07. - 16:09:33 »
0 Show voters
Ez egy bug benne én is kerestem a hibát de nem tudom énse :S

PPC_Housing
« Válasz #2 Dátum: 2012. Május 07. - 21:59:38 »
0 Show voters
Idézetet írta: Striker date=1336399773\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21117\" data-ipsquote-contentclass=\"forums_Topic
Ez egy bug benne én is kerestem a hibát de nem tudom énse :S
 
A bug az az ami ott van de mégsem üzemel úgy ahogy kéne.
Gondolom nincs lementve a jármû tuningja, így az nem fog ottmaradni.
A /park parancsot másold be mert nincs kedvem letölteni a PPC_Housing-t.Kösz.

PPC_Housing
« Válasz #3 Dátum: 2012. Május 08. - 13:41:41 »
0 Show voters
A /park:
 
COMMAND:park(playerid, params[])
{
// Setup local variables
new 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 command
if (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-id
vid = GetPlayerVehicleID(playerid);
// Get the HouseID to which this vehicle belongs
HouseID = 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 command
return 1;
}

PPC_Housing
« Válasz #4 Dátum: 2012. Május 08. - 17:44:53 »
0 Show voters
new component;
for(new slot = 1; slot <= 13; slot++)
{
component = GetVehicleComponentInSlot(vid,slot);
//component változóba vagy/majd fájlba mentése
}

 
Nem vágom h itt mi a mentés vagy hogy van, de a fenn leírttal tudsz dolgozni. Az lekéri az összes tuningot. Lehetõleg a mentésnél mindig maradj a kapcsos zárójelen belül.

PPC_Housing
« Válasz #5 Dátum: 2012. Május 08. - 21:05:08 »
0 Show voters
most írd má le 1 kódba vagy illeszd be pls a /park parancsba h mit akarsz :)

PPC_Housing
« Válasz #6 Dátum: 2012. Május 07. - 21:59:38 »
0 Show voters
Idézetet írta: Striker date=1336399773\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21117\" data-ipsquote-contentclass=\"forums_Topic
Ez egy bug benne én is kerestem a hibát de nem tudom énse :S
 
A bug az az ami ott van de mégsem üzemel úgy ahogy kéne.
Gondolom nincs lementve a jármû tuningja, így az nem fog ottmaradni.
A /park parancsot másold be mert nincs kedvem letölteni a PPC_Housing-t.Kösz.

PPC_Housing
« Válasz #7 Dátum: 2012. Május 08. - 13:41:41 »
0 Show voters
A /park:
 
COMMAND:park(playerid, params[])
{
// Setup local variables
new 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 command
if (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-id
vid = GetPlayerVehicleID(playerid);
// Get the HouseID to which this vehicle belongs
HouseID = 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 command
return 1;
}

PPC_Housing
« Válasz #8 Dátum: 2012. Május 08. - 17:44:53 »
0 Show voters
new component;
for(new slot = 1; slot <= 13; slot++)
{
component = GetVehicleComponentInSlot(vid,slot);
//component változóba vagy/majd fájlba mentése
}

 
Nem vágom h itt mi a mentés vagy hogy van, de a fenn leírttal tudsz dolgozni. Az lekéri az összes tuningot. Lehetõleg a mentésnél mindig maradj a kapcsos zárójelen belül.

PPC_Housing
« Válasz #9 Dátum: 2012. Május 08. - 21:05:08 »
0 Show voters
most írd má le 1 kódba vagy illeszd be pls a /park parancsba h mit akarsz :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal