Szerző Téma: [TuT] Megmaradó tuningos kocsi (respawn után is)  (Megtekintve 3379 alkalommal)

Nem elérhető Black

[TuT] Megmaradó tuningos kocsi (respawn után is)
« Dátum: 2010. Május 08. - 22:04:21 »
0 Show voters
Üdv mindenkinek. nos akkor bele is csapok a lecsóba.
kell egy:
 
new blacksultan;

 valahova a mod elejére. ( m1. hova)
a \'blacksultan\' helyett bármit használhatsz, de a továbbiakban is azt használd.
következo:
 
 
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == blacksultan)
{
AddVehicleComponent(blacksultan,1010);
AddVehicleComponent(blacksultan,1028);
AddVehicleComponent(blacksultan,1026);
AddVehicleComponent(blacksultan,1027);
AddVehicleComponent(blacksultan,1030);
AddVehicleComponent(blacksultan,1031);
AddVehicleComponent(blacksultan,1074);
AddVehicleComponent(blacksultan,1139);
AddVehicleComponent(blacksultan,1140);
AddVehicleComponent(blacksultan,1169);
AddVehicleComponent(blacksultan,1132)
 
return 1;
}
return 1;
}

 
ha paintjobot is szeretnél rá akkor az:  \'   ChangeVehiclePaintjob(blacksultan,2) \' is kell bele. a 2-es a végén a paintjob fajtája. 0-2-ig vannak. 3-as leszedi.
következo:
 
   blacksultan = CreateVehicle(560,305.9777,-1158.4508,80.6178,226.5667,1,1,6000);
AddVehicleComponent(blacksultan,1010);
AddVehicleComponent(blacksultan,1028);
AddVehicleComponent(blacksultan,1026);
AddVehicleComponent(blacksultan,1027);
AddVehicleComponent(blacksultan,1030);
AddVehicleComponent(blacksultan,1031);
AddVehicleComponent(blacksultan,1074);
AddVehicleComponent(blacksultan,1139);
AddVehicleComponent(blacksultan,1140);
AddVehicleComponent(blacksultan,1169);
AddVehicleComponent(blacksultan,1132);

 
a kocsi színe fehér (1) legyen, mert a feketén (0-n) nem látszik a paintjob! a végén a \'6000\' az az ido hogy hány MP után respawnoljon a kocsi ha nem ül benne senki. nos ennyi lenne. remélem tudtam segíteni. :)
« Utoljára szerkesztve: 2010. Május 08. - 22:06:46 írta Black »

GroX

  • Vendég
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #1 Dátum: 2010. Május 08. - 22:50:03 »
0 Show voters
a végén a \'6000\' az az ido hogy hány MP után respawnoljon[/quote]
Ööö inkább Virtual World.
Bocs hülyeséget írtam. xd
Amúgy jó.
« Utoljára szerkesztve: 2010. Május 08. - 22:52:06 írta GroX »

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #2 Dátum: 2010. Május 08. - 22:51:54 »
0 Show voters
Idézetet írta: GroX date=1273351803\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1602\" data-ipsquote-contentclass=\"forums_Topic

a végén a \'6000\' az az ido hogy hány MP után respawnoljon
Ööö inkább Virtual World.
 
[/quote]
Nem, Black jól mondta.

GroX

  • Vendég
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #3 Dátum: 2010. Május 08. - 22:52:40 »
0 Show voters
Idézetet írta: ZeRo date=1273351914\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1602\" data-ipsquote-contentclass=\"forums_Topic


 
a végén a \'6000\' az az ido hogy hány MP után respawnoljon
Ööö inkább Virtual World.
 
[/quote]
Nem, Black jól mondta.
 
[/quote]
2 mp-vel javítottam át azelott h írtál volna b. (azaz nem akkor javítottam akkor jutott eszembe)

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #4 Dátum: 2010. Május 08. - 22:54:21 »
0 Show voters
Idézetet írta: GroX date=1273351960\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1602\" data-ipsquote-contentclass=\"forums_Topic


 

 
a végén a \'6000\' az az ido hogy hány MP után respawnoljon
Ööö inkább Virtual World.
 
[/quote]
Nem, Black jól mondta.
 
[/quote]
2 mp-vel javítottam át azelott h írtál volna b. (azaz nem akkor javítottam akkor jutott eszembe)
 
[/quote]
Bocs, nem láthattam.  :dead:

GroX

  • Vendég
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #5 Dátum: 2010. Május 08. - 22:55:11 »
0 Show voters
Nembaj mindenki hibázhat, én is...

Nem elérhető Black

[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #6 Dátum: 2010. Május 09. - 06:56:03 »
0 Show voters
köszi GroX. am mostmár több TuTot fogok írni meg segíteni a bajbajutottaknak, mert nagyából kész vagyok az RP modommal és rá érek segíteni a kezdo scriptereknek. :) (idáig csak MSN-en segítettem.. :D ) szóóval lehet hozzámvágni kérdéseket ;D

[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #7 Dátum: 2010. Május 13. - 18:47:58 »
0 Show voters
Jó tut  ;)

Nem elérhető Linda

[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #8 Dátum: 2010. Május 23. - 19:21:38 »
0 Show voters
Azt le tudná írni valaki hogy ne csak egy kocsira hanem az összesre visszatöltse a tuningot respawn után?
Az RP módomba nagyon jól jönne, köszi elore is

Nem elérhető Lömpi

  • 1257
    • Profil megtekintése
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #9 Dátum: 2010. Május 23. - 21:22:12 »
0 Show voters
Idézetet írta: Linda date=1274635298\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1602\" data-ipsquote-contentclass=\"forums_Topic
Azt le tudná írni valaki hogy ne csak egy kocsira hanem az összesre visszatöltse a tuningot respawn után?
Az RP módomba nagyon jól jönne, köszi elore is
 
GetVehicleModel

Nem elérhető krisk

  • 2380
    • Profil megtekintése
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #10 Dátum: 2010. Május 23. - 21:28:27 »
0 Show voters
Jó nagy baromságot írtam az előbb, fixelem is magam:
 

public OnVehicleSpawn(vehicleid) {
AddVehicleComponent(vehicleid,1010);
AddVehicleComponent(vehicleid,1028);
AddVehicleComponent(vehicleid,1026);
AddVehicleComponent(vehicleid,1027);
AddVehicleComponent(vehicleid,1030);
AddVehicleComponent(vehicleid,1031);
AddVehicleComponent(vehicleid,1074);
AddVehicleComponent(vehicleid,1139);
AddVehicleComponent(vehicleid,1140);
AddVehicleComponent(vehicleid,1169);
AddVehicleComponent(vehicleid,1132);
}

 
De  ha csak mondjuk egy adott modelljű kocsira akarod akkor:
 

public OnVehicleSpawn(vehicleid) {
  if(GetVehicleModel(vehicleid) == 560) { // Ha a kocsi modell ID-je 560 (ez a sultan) akkor...
AddVehicleComponent(vehicleid,1010);
AddVehicleComponent(vehicleid,1028);
AddVehicleComponent(vehicleid,1026);
AddVehicleComponent(vehicleid,1027);
AddVehicleComponent(vehicleid,1030);
AddVehicleComponent(vehicleid,1031);
AddVehicleComponent(vehicleid,1074);
AddVehicleComponent(vehicleid,1139);
AddVehicleComponent(vehicleid,1140);
AddVehicleComponent(vehicleid,1169);
AddVehicleComponent(vehicleid,1132);
  }
}

 
Ha többet akarsz akkor használhatod az OR operátort:
 
if(GetVehicleModel(vehicleid) == 560 || GetVehicleModel(vehicleid) == 562) { // Ha a kocsi modell ID-je 560 (ez a sultan) VAGY a kocsi modell ID-je 562 (ez az elegy)

 
Jó ha tudod: Ha át akarod állítani a kocsid virtual worldjét akkor azt így tedd:
 
SetVehicleVirtualWorld(1, 5);

 
Ezzel az 1-es IDjű kocsi virtual worldjét álíltottad be. Ha megnevezted valahogy így:
 
 // globális térbe:
new sultan[MAX_VEHICLES];
// OnGameModeInit
sultan = AddStaticVehicle(blablablabaa);

 
Akkor elég ha a nevére hivatkozunk:
 
SetVehicleVirtualWorld(sultan, 5);

 
Ha viszont a jelenlegi kocsinkat akarjuk átállítani:
 
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),5);
« Utoljára szerkesztve: 2010. Május 24. - 08:11:51 írta krisk »

[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #11 Dátum: 2010. Július 25. - 16:00:22 »
0 Show voters
Csosztök jó kis TuT de nekem van egy problémám !
 
D:\\Gta\\GtaSaMp Server 2\\gamemodes\\StuntAndDrift.pwn(8240) : warning 203: symbol is never used: \"blacksultan\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Warning.

Ez miért lehet a modm legvége és nncs ott semmi !

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
[TuT] Megmaradó tuningos kocsi (respawn után is)
« Válasz #12 Dátum: 2010. Július 25. - 16:05:27 »
0 Show voters
ez azt jelenti, hogy sehol sem használod a blacksultan -t

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal