Peršokti į turinį
  • ŽAIDIMAI
  • , ŽAIDIMAI
  • ŽAIDIMAI

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 5096 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

Sveiki.Sampe esu tikrai nenaujas žmogus,bet servo scriptinimuose ir kituose panašiuose reikaluose esu žalias.Man iškilo tokia beda,viska darau nuo 0.Mokinuosi iš samp wiki,bet man sukliudė pamoka mašinų kėlimas.Štai palei šita pamoką viską dariau:

Vehicle spawns

Now let's add some vehicles. The vehicle spawn lines are put in the OnGameModeInit callback, aswell as the player classes spawnpoints, the Gamemode name and other stuff. We'll do that later. Most of the commands in PAWN do pretty much exactly as they're named, we want to add a vehicle so lets look for vehicle commands:

CreateVehicle();

AddStaticVehicle();

If you click on either of these and look in the status bar (the bar at the bottom of the editor) you will see their syntax (what information/parameters you need to give them to work):

[a_samp.inc] native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_time);

[a_samp.inc] native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);

Now they both look equally as good, but this is where prior knowledge comes in, CreateVehicle only places one car ingame, AddStaticVehicle creates a vehicle spawn, so when the car is destroyed or desynched it will reappear back where you placed the spawn. These need to be created at the start of the game so you would place this in your "OnGameModeInit()" callback.

Ir kaip man padaryti kad gautusi šios eilutės: [a_samp.inc] native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_time);

[a_samp.inc] native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);

Mano mašinų pavizdys:

	//mašinos
   AddStaticVehicle(497,-49.8017,-249.1267,37.0723,359.5442,0,1); // Heli
   AddStaticVehicleEx(431,1804.59997559,-1646.00000000,13.80000019,270.00000000,-1,-1,15); //Bus
   AddStaticVehicleEx(596,1801.69995117,-1642.09997559,13.30000019,270.00000000,-1,-1,15); //Police Car (LSPD)
   AddStaticVehicleEx(596,1801.69995117,-1638.30004883,13.30000019,270.00000000,-1,-1,15); //Police Car (LSPD)
   AddStaticVehicleEx(523,1800.40002441,-1635.19995117,13.19999981,270.00000000,-1,-1,15); //HPV1000
   AddStaticVehicleEx(523,1800.40002441,-1633.30004883,13.19999981,270.00000000,-1,-1,15); //HPV1000
return 1;
}

WWW.KALĖJIMAS.LT - DARBAI BUS TĘSIAMI TOLIAU!

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 5096 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

  • Šiame puslapyje naršo:   0 nariai

    • Nėra registruotų narių peržiūrinčių šį forumą.

Skelbimai


×
×
  • Sukurti naują...