[Pomoc] dodavanje vozila

Započeo Lexa, Avgust 27, 2013, 00:49:53 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ime moda:GForce(stara verzija)
Opis problema:Zelim da dodam vozila u organizacije ali vozila nema uskripti.ima u scriptfiles sve je zajedno ali ne razumjem kako se dodaje jer u skripti nisu definisani brojevi od kojeg do kojeg je za koju orgu:
Dio skripte:Ovo je dio iz scriptfiles,cars:
570,0,0,0,-1944.375000,87.511703,27.000600,180.000000,1,1,-1,0,0,0,0,0,265
596,0,1,0,1535.9575,-1667.7548,13.1019,0.2468,-1,-1,1800,1,0,1,0,0,266
596,0,1,0,1536.0054,-1677.1958,13.0796,181.4164,-1,-1,1800,1,0,1,0,0,267
596,0,1,0,1546.220703,-1667.883666,5.722300,87.975601,-1,-1,1800,1,0,1,0,0,268
596,0,1,0,1545.537353,-1663.198730,5.721700,89.947799,-1,-1,1800,1,0,1,0,0,269
528,0,1,0,1545.345703,-1659.064208,5.723000,90.698303,-1,-1,1800,1,0,1,0,0,270
560,0,1,0,1584.764404,-1676.452514,5.689599,269.629913,-1,-1,1800,1,0,1,0,0,271




A ovo je dio iz skripte:
}

IsAFBICar(carid)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
    {
if(CarInfo[i][cID] == carid)
{
if (CarInfo[i][cFaction] == CAR_FACTION_FBI)
{
    return true;
}
}
}
return false;


-Ovako su svi definisani.



Citat: Lexa poslato Avgust 27, 2013, 00:49:53 PRE PODNE
Ime moda:GForce(stara verzija)
Opis problema:Zelim da dodam vozila u organizacije ali vozila nema uskripti.ima u scriptfiles sve je zajedno ali ne razumjem kako se dodaje jer u skripti nisu definisani brojevi od kojeg do kojeg je za koju orgu:
Dio skripte:Ovo je dio iz scriptfiles,cars:
570,0,0,0,-1944.375000,87.511703,27.000600,180.000000,1,1,-1,0,0,0,0,0,265
596,0,1,0,1535.9575,-1667.7548,13.1019,0.2468,-1,-1,1800,1,0,1,0,0,266
596,0,1,0,1536.0054,-1677.1958,13.0796,181.4164,-1,-1,1800,1,0,1,0,0,267
596,0,1,0,1546.220703,-1667.883666,5.722300,87.975601,-1,-1,1800,1,0,1,0,0,268
596,0,1,0,1545.537353,-1663.198730,5.721700,89.947799,-1,-1,1800,1,0,1,0,0,269
528,0,1,0,1545.345703,-1659.064208,5.723000,90.698303,-1,-1,1800,1,0,1,0,0,270
560,0,1,0,1584.764404,-1676.452514,5.689599,269.629913,-1,-1,1800,1,0,1,0,0,271




A ovo je dio iz skripte:
}

IsAFBICar(carid)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
    {
if(CarInfo[i][cID] == carid)
{
if (CarInfo[i][cFaction] == CAR_FACTION_FBI)
{
    return true;
}
}
}
return false;


-Ovako su svi definisani.

Moraš to imat u skripti jer ovo iz ScriptFilesa to ti je za OwnerShip kako ja kontam :)
[TuT]-Vozila na posebnog igrača- http://balkan-samp.com/forum/index.php?topic=78806.0 | [FS]-G.P.S- http://balkan-samp.com/forum/index.php?topic=73768.0
[FS]-Rcon Panel- http://balkan-samp.com/forum/index.php?topic=72595.0 | [GM]-Division Street(stari)- http://balkan-samp.com/forum/index.php?topic=78810.0
Citat: magarac poslato Avgust 28, 2013, 18:58:01 POSLE PODNE
Ma jbt ne zelim ja to...... koji k ce mi takva camera di trci okolo......

<script type="text/javascript">
var bannersnack_embed = {"hash":"bxui659h2","width":400,"height":130,"t":1421676936,"userId":16712396,"bgcolor":"#3D3D3D","wmode":"opaque"};
</script>
<script type="text/javascript" src="http://files.bannersnack.com/iframe/embed.js"></script>

Probaj da dodajes na sledeci nacin:

Pocetak skripte

new KolazaORG[4];//ja sam stavio broj 4 jer sam dole dodao samo 4 vozila, ti ako imas vise povecas ovaj broj na onoliko koliko imas vozila!

Onda ovaj public stavi na kraju skripte


forward KolaORG(carid);
public KolaORG(carid)
{
for(new i = 0; i < sizeof(KolazaORG); i++)
{
if(carid == KolazaORG[i]) return 1;
}
return 0;
}


I pod OnGameModeInit dodajes vozila na sledeci nacin:

KolazaORG[0] = AddStaticVehicle(....
KolazaORG[1]= AddStaticVehicle(....
KolazaORG[2] = AddStaticVehicle(....
KolazaORG[3] = AddStaticVehicle(....