Skripta koju koristim:GhostTown
Detaljan opis problema:Ubacujem novu org,pa stavljam Labele na njihova vozila,ali mi izlaze errori.Evo ih labeli,error je izgleda nesto oko "mscar".Definisao sam "mscar" pa to ne pravi problem,pa je izgleda nesto drugo.
Dio skripte: mscar[0] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[0], vms13[0] ,0,0,0);
mscar[1] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[1], vms13[1] ,0,0,0);
mscar[2] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[2], vms13[2] ,0,0,0);
mscar[3] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[3], vms13[3] ,0,0,0);
mscar[4] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[4], vms13[4] ,0,0,0);
mscar[5] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[5], vms13[5] ,0,0,0);
mscar[6] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[6], vms13[6] ,0,0,0);
mscar[7] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[7], vms13[7] ,0,0,0);
mscar[8] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[8], vms13[8] ,0,0,0);
mscar[9] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[9], vms13[9] ,0,0,0);
mscar[10] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[10], vms13[10] ,0,0,0);
mscar[11] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[11], vms13[11] ,0,0,0);
mscar[12] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[12], vms13[12] ,0,0,0);
mscar[13] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[13], vms13[13] ,0,0,0);
mscar[14] = Create3DTextLabel(""ZUTA"[MS-13]", 0x33CCFFAA, 0.0, 0.0, 0.0, 35.0, 0, 1);
Attach3DTextLabelToVehicle(mscar[14], vms13[14] ,0,0,0);
Neke slike/video za lakse dobivanje pomoci(neobavezno):prntscr.com/h896al
Probaj da definises ovako:
[pawn]new Text3D:mscar[15][MAX_VEHICLES];
new ms13[15];[/pawn]
Zašto ne radiš preko loopa?
[pawn]
new ms13[15];
new Text3D:MS13_3D[15];
for(new Text_3D = 0; Text_3D < 15; Text_3D++)
{
MS13_3D[Text_3D] = Create3DTextLabel("[ MS13 ]", 0x33CCFFAA, 0.0, 0.0, 0.0, 20.0, 0, 0);
Attach3DTextLabelToVehicle(MS13_3D[Text_3D], ms13[Text_3D], 0.0, 0.0, 0.0);
}
[/pawn]
Navikao sam onako da radim.A i pocetnik sam u skriptanju.
Eto objasnili su ti , ali preko loopa ti je dosta lakse :) da ne ispisujes 200 linija kad mozes sve u 4 , 5 linija :)
Hvala <3,nego samo jedno pitanje Attach3DTextLabelToVehicle(MS13_3D[Text_3D], vms13[Text_3D], 0.0, 0.0, 0.0);
kod ovog vms13[Text_3D] da umesto Text_3D stavim koliko ima vozila ili samo da ostavim?
Kada uradim tako kao sto ste rekli label se ne stavi? Da nije zbog Text_3D u predzadnjoj liniji?
Citat: Sploxs poslato Novembar 09, 2017, 15:18:28 POSLE PODNE
Zašto ne radiš preko loopa?
[pawn]
new ms13[15];
new Text3D:MS13_3D[15];
for(new Text_3D = 0; Text_3D < 15; Text_3D++)
{
MS13_3D[Text_3D] = Create3DTextLabel("[ MS13 ]", 0x33CCFFAA, 0.0, 0.0, 0.0, 20.0, 0, 0);
Attach3DTextLabelToVehicle(MS13_3D[Text_3D], ms13[Text_3D], 0.0, 0.0, 0.0);
}
[/pawn]
Uradio sam kako ste rekli i nece :/
Fiiiiiiiks e hah
Uradio sam sa loopom i nece :/
Moras ovo
[pawn]for(new Text_3D = 0; Text_3D < 15; Text_3D++)
{
MS13_3D[Text_3D] = Create3DTextLabel("[ MS13 ]", 0x33CCFFAA, 0.0, 0.0, 0.0, 20.0, 0, 0);
Attach3DTextLabelToVehicle(MS13_3D[Text_3D], ms13[Text_3D], 0.0, 0.0, 0.0);
}[/pawn]
Ispod kreiranja MS13 vozila, znaci ispod CreateVehicle-a svih (Svih MS13 cvehiclea)
Radi,Hvala svima ;)