Szerző Téma: Jármû spawn kordináta át írása  (Megtekintve 726 alkalommal)

Jármû spawn kordináta át írása
« Dátum: 2012. Augusztus 01. - 21:24:02 »
0 Show voters
Sziasztok
 
Hol lehetne át írni a nem leparkolt kocsik kordinátáját  mert nekem olyan helyen van ahol laggot okoz és oda szeretném le spawnoltatni õket ahol nem okoz laggot

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Jármû spawn kordináta át írása
« Válasz #1 Dátum: 2012. Augusztus 01. - 23:42:57 »
0 Show voters
Ezt nem értem  :facepalm:
Akkor most írd le szépen.. vagyis átt szeretnéd írni a nemlétezõ kocsi kordínátáját?  ???

Nem elérhető IXT

  • 2502
  • Steph Curry
    • Profil megtekintése
Jármû spawn kordináta át írása
« Válasz #2 Dátum: 2012. Augusztus 02. - 08:10:47 »
0 Show voters
Elõször is másold be a jelenlegi koórdinátákat :)

Jármû spawn kordináta át írása
« Válasz #3 Dátum: 2012. Augusztus 02. - 10:32:35 »
0 Show voters
Van a kamionos mód meg van adva hogy veszel egy házat és veszel bele autókat van olyan parancs hogy /park ezzel a parancsal lehet le parkirózni de van néhány ember aki ezt nem teszi meg és van olyan hogy aki nem parkolja le akkor az adott kordinátára le teszi azokat a jármûveket na én ezt akarom át írni de azt sem tudom hogy melyik PPC inc-be van benne

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Jármû spawn kordináta át írása
« Válasz #4 Dátum: 2012. Augusztus 02. - 10:37:31 »
0 Show voters
Szerintem a /park -paracsban lévõ fríssítõt ami leparkolja a kocsit azt az OnPlayerExitVehicle alá kell tenni de másképpen mert ha egy munka kocsiba beszál azt is fríssíti.
Másold be  a/park parancsát!

Jármû spawn kordináta át írása
« Válasz #5 Dátum: 2012. Augusztus 02. - 11:31:41 »
0 Show voters
Idézetet írta: ZyZu date=1343896651\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"25347\" data-ipsquote-contentclass=\"forums_Topic
Szerintem a /park -paracsban lévõ fríssítõt ami leparkolja a kocsit azt az OnPlayerExitVehicle alá kell tenni de másképpen mert ha egy munka kocsiba beszál azt is fríssíti.
Másold be  a/park parancsát!
 
Na ez egy jó ötlet..
Én elõször arra gondoltam, hogy tûntesse el DestroyVehicle függvénnyel... De utólag belegondolva nem jó ötlet. :D

Jármû spawn kordináta át írása
« Válasz #6 Dátum: 2012. Augusztus 02. - 11:41:42 »
0 Show voters
/ This command checks if the player is inside a vehicle that he owns and if he\'s in range of the house where the vehicle is assigned to
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;
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/park\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// 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 the vehicle is owned (owner-check is not really required, as another player would get kicked out very fast)
   // AND it must belong to a house that the player owns
   if ((AVehicleData[vid][Owned] == true) && (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;
         // Find the vehicle in the player\'s houses
         for (new i; i < MAX_HOUSESPERPLAYER; i++)
         {
            // Get the HouseID of the current house
             HouseID = APlayerData[playerid][Houses];
            // 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
                  GetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], engine, lights, alarm, doors, bonnet, boot, objective);
                  SetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], 1, lights, alarm, doors, bonnet, boot, objective);
                       break; // Stop the for-loop
               }
            }
         }
         // Let the player know he parked his vehicle
         SendClientMessage(playerid, 0x00FF00FF, \"Leparkoltál a kocsival\");
         // Save the player-file (and his houses)
         PlayerFile_Save(playerid);
      }
      else
      {
          format(Msg, 128, \"{FF0000}Ház közelében kell lenned hogy le tudj parkolni\", ParkRange);
          SendClientMessage(playerid, 0xFFFFFFFF, Msg);
      }
   }
   else
       SendClientMessage(playerid, 0xFF0000FF, \"Nem parkolhatsz le ezzel a jarmûvel,nem a tiéd\");
}
else
    SendClientMessage(playerid, 0xFF0000FF, \"Nincs mit leparkolni\");
}
else
    return 0;
// Let the server know that this was a valid command
return 1;
}

 
Tess

Dupla hozzászólás automatikusan összefûzve. ( 2012. Augusztus 02. - 19:25:17 )

// Buy a vehicle and assign it to the house
Dialog_BuyCar(playerid, response, listitem)
{
// Just close the dialog if the player clicked \"Cancel\"
if(!response) return 1;
// Setup local variables
new Counter, Msg[128], cComponents[14];
// Get the HouseID
new HouseID = APlayerData[playerid][CurrentHouse];
// Loop through the entire list of buyable vehicles
for (new i; i < sizeof(ABuyableVehicles); i++)
{
// Check if the vehicle in the list has the same class as requested
if (ABuyableVehicles[VehicleClass] == APlayerData[playerid][DialogBuyVClass])
{
    // Check if this is the vehicle that the player chose
    if (Counter == listitem)
   {
       // Check if the player has enough money to afford buying this vehicle
       if (APlayerData[playerid][PlayerMoney] >= (ABuyableVehicles[Price]))
       {
         // Add the vehicle to the house (this sets ownership and other data that\'s needed)
         // The vehicles are by default created inside the hangar of KACC Military Fuels instead of near the EasterBoard Farm
         House_AddVehicle(HouseID, ABuyableVehicles[CarModel], 0, cComponents, 697.0, 3342.0, 3.9, 0.0, -1, -1);
         // Let the player pay for buying the vehicle
         APlayerData[playerid][PlayerMoney] = APlayerData[playerid][PlayerMoney] - ABuyableVehicles[Price];
         // Let the player know he bought a vehicle
         format(Msg, 128, TXT_PlayerBoughtVehicle, ABuyableVehicles[CarName], ABuyableVehicles[Price]);
         SendClientMessage(playerid, 0xFFFFFFFF, Msg);
         SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerMustUseGetcarAndPark);
         // Save the player-file (and his houses)
         PlayerFile_Save(playerid);
      }
      else // The player has not enough money to buy this vehicle
          SendClientMessage(playerid, 0xFFFFFFFF, TXT_CannotAffordVehicle);
      // Stop looking for the vehicle, as it\'s found and given to the player already
      return 1;
   }
    else // The player chose another vehicle from the same class, keep looking for another one
        Counter++;
}
}
return 1;
}

 
Közben meg találtam és át is írtam a kordinátákat de ugyan oda spawnolja vissza
« Utoljára szerkesztve: 2012. Augusztus 02. - 19:25:17 írta jozsi0502 »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal