[TuT] Tablice na vozilima (0.3c)

Započeo LuKsA, Januar 12, 2011, 18:07:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

U ovom tutorijalu cu vam objasniti kako napraviti jednostavno i lijepe tablice za vozila, 0.3c system tablica.

Pronadjite callback OnVehicleSpawn(vehicleid), te ispod dodajte:

new rand = random(3000); rand += 1500;
new string[32];
format(string, sizeof(string), "{D20000}LS-{FFFFFF}%d", rand);
SetVehicleNumberPlate(vehicleid, string);


Objasnjenje:

new rand = random(3000); rand += 1500;

stavlja novu varijablu sa random brojevima od 0-3000, te nakon toga dodaje tom random broju 1500, npr. ako u randomu izade broj 1234 tada se dodaje 1500 tome i izade 2734.




new string[32];

Novi string sa 32 celija.




format(string, sizeof(string), "{D20000}LS-{FFFFFF}%d", rand);

Format funkcija ukljucuje string varijable i druge stringove. {D20000}LS-{FFFFFF}%d objasnjava da bude "LS-" pisalo crvenom bojom, a random broj (rand varijabla) bude pisala bijelom bojom, Color Embedding (0.3c)




SetVehicleNumberPlate(vehicleid, string);

Nova funkcija u 0.3c koja stavlja text tablice na odredeno vozilo, to je sad vehicleid, a text je string koji smo prije definirali putem format-a.
Poslednja Izmena: April 17, 2012, 14:52:32 POSLE PODNE od joXy_
Aequam memento rebus in arduis servare mentem.

Samo ispod OnVehicleSpawn dodam i bice na svakom vozilu,ili moram kraj svakog auta u skripti stavljat ?

Na svakom ce bit.
Aequam memento rebus in arduis servare mentem.


A, kako napraviti da bude za odredjeni auto ?
Mike Marquez | House of Rave is Trippy Place ! |

Citat: Rey_McShakur poslato Januar 13, 2011, 10:22:21 PRE PODNE
A, kako napraviti da bude za odredjeni auto ?

Napravis da bude po ideu auta ... Ali to je malo glupo ja sam napravio da recimo id 18 da je LS-18 kao tablica i sad kad budem pravio komandu mocice da traze kriminalca uz pomoc tablica :)

pa to je realno da ga traze po tablicama, pa kako murija radi... netko je zapisao tablice i murija preko njih nadje...
Mike Marquez | House of Rave is Trippy Place ! |

Meni ovo ne radi... sev sam ubacio, i tocno napisao, al nema na autima nis napisano...  :-X imam gf mod, a nisam mogo nac callback OnVehicleSpawn pa sam dodao na kraju moda... nez zas ne radi.. Zna ko drugi? ako zna da mi pomogne...
//

Ima OnVehicleSpawn na sredini negdi..A ako nema dodaj na sredini..I mora imat


Btw:Ako napravim po ID auta onda ima vise auta istog ID onda nevalja traziti tablice po ID auta kad ima vise auta sa ID npr 444
Poslednja Izmena: Januar 13, 2011, 23:02:25 POSLE PODNE od Marek

Nema, pritisnuo sam ctrl+f i upiso OnVehicleSpawn i nije naslo... nez ni ja zas... :S
//

Nema ni meni omg di da dodam tooooooooooooooo

hahaaha, prvo govoris da ima sigurno, a sad kazes da nema ni tebi i neznas di da to napravis OMG -.- dodaj na kraju skripte, al meni to nece radit tako :S probaj ti, valjda ce tebi radit...
//

Oce evo ovo sam dobio !! xaxaxaxaxa
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2066) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2092) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2122) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2123) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2147) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2396) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2400) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2411) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2423) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2427) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2439) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2443) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2447) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2451) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2455) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2459) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2463) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2467) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2471) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2475) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2487) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2491) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2495) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2499) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2503) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\BALKAN~1\GAMEMO~1\BALKAN~1.PWN(2515) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.




Poslednja Izmena: Januar 13, 2011, 23:17:04 POSLE PODNE od Marek

Jesi ti tocno tako kako je ovdje u tutu napisano napisao??? To nije od prije???
//

Evo sad sam tocno kao u tutu stavio


public VehicleSpawn
{

     new rand = random(3000); rand += 1500;
     new string[32];
     format(string, sizeof(string), "{D20000}LS-{FFFFFF}%d", rand);
     SetVehicleNumberPlate(vehicleid, string);

Tako stavio i izbaci errore