3D TEKST TUTORIAL
FUNKCIJA #1:Ovo ti je funkcija da napraviš 3D tekst za igraća kojeg ti želiš:
CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS) (http://wiki.sa-mp.com/wiki/CreatePlayer3DTextLabel)
playerid The player which should see the newly created 3DText Label.
text[] The initial text. Its used like a normal string.
color The text Color
x X-Coordinate/X-Offset if attached
y Y-Coordinate/Y-Offset if attached
z Z-Coordinate/Z-Offset if attached
DrawDistance The distance where you are able to see the 3D Text Label
attachedplayer The player you want to attach the 3D Text Label to. (None: INVALID_PLAYER_ID)
attachedvehicle The vehicle you want to attach the 3D Text Label to. (None: INVALID_VEHICLE_ID)
testLOS 0/1 Test the line-of-sight so this text can't be seen through walls
PRIMJER #1:new
PlayerText3D:playertextid; // pazi na oznaku PlayerText3D: - jer to je za CreatePlayer3DTextLabel funkciju
new
Float:X,
Float:Y,
Float:Z;
GetPlayerPos(playerid, X, Y, Z);
playertextid = CreatePlayer3DTextLabel(playerid, "This is a\nPLAYER 3d text.", 0x008080FF, X, Y, Z, 40.0);Kao što vidiš, ovdje nisam koristio:
attachedplayer The player you want to attach the 3D Text Label to. (None: INVALID_PLAYER_ID)
attachedvehicle The vehicle you want to attach the 3D Text Label to. (None: INVALID_VEHICLE_ID)
testLOS 0/1 Test the line-of-sight so this text can't be seen through walls
jer ti ne trebaju (za sada), osim testLOS - ako želiš vidjeti 3D tekst kroz SA objekte.
FUNKCIJA #2:Ovo ti je funkcija da napraviš 3D tekst za sve igraće (globalno):
Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS) (http://wiki.sa-mp.com/wiki/Create3DTextLabel)
text[] The initial text. Its used like a normal string.
color The text Color
x X-Coordinate/X-Offset if attached
y Y-Coordinate/Y-Offset if attached
z Z-Coordinate/Z-Offset if attached
DrawDistance The distance where you are able to see the 3D Text Label
VirtualWorld The virtual world in which you are able to see the 3D Text
testLOS 0/1 Test the line-of-sight so this text can't be seen through walls
PRIMJER #2:new
Text3D:textid; // pazi na oznaku Text3D: - jer to je za Create3DTextLabel funkciju
textid = Create3DTextLabel("This is a\nGLOBAL 3d text.", 0x008080FF, 50.0, 50.0, 50.0, 40.0, 0);Opet kao što vidiš, ovdje nisam koristio:
testLOS 0/1 Test the line-of-sight so this text can't be seen through walls
FUNKCIJA #3:Ovo ti je funkcija da uništiš 3D tekst za igraća kojeg ti želiš:
DeletePlayer3DTextLabel(playerid, PlayerText3D:id) (http://wiki.sa-mp.com/wiki/DeletePlayer3DTextLabel)
playerid The player which shouldn't see the 3D Text anymore.
PlayerText3D:id The 3D Text Label you want to destroy.
PRIMJER #3:DeletePlayer3DTextLabel(playerid, playertextid);FUNKCIJA #4:Ovo ti je funkcija da uništiš 3D tekst za sve igraće (globalno):
Delete3DTextLabel(Text3D:id) (http://wiki.sa-mp.com/wiki/Delete3DTextLabel)
Text3D:id The ID of the 3D text label you want to destroy.
PRIMJER #4:Delete3DTextLabel(textid);FUNKCIJA #5:Ovo ti je funkcija da promijeniš 3D tekst za igraća kojeg ti želiš:
UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, text[]) (http://wiki.sa-mp.com/wiki/UpdatePlayer3DTextLabelText)
playerid The player for which the 3D Text Label was created.
PlayerText3D:id The 3D Text Label you want to update.
color The color the 3D Text Label should have from now on.
text[] The new text which the 3D Text Label should have from now on.
PRIMJER #5:UpdatePlayer3DTextLabelText(playerid, playertextid, 0x90C9C9FF, "This is a\nCHANGED PLAYER 3d text.");FUNKCIJA #6:Ovo ti je funkcija da promijeniš 3D tekst za sve igraće (globalno):
Update3DTextLabelText(PlayerText3D:id, color, text[]) (http://wiki.sa-mp.com/wiki/Update3DTextLabelText)
PlayerText3D:id The 3D Text Label you want to update.
color The color the 3D Text Label should have from now on.
text[] The new text which the 3D Text Label should have from now on.
PRIMJER #6:Update3DTextLabelText(textid, 0x90C9C9FF, "This is a\nCHANGED GLOBAL 3d text.");FUNKCIJA #7:Ovo ti je funkcija da prikaćiš 3D tekst na igraća kojeg ti želiš:
Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ) (http://wiki.sa-mp.com/wiki/Attach3DTextLabelToPlayer)
Text3D:id The 3D Text Label you want to attach.
playerid The player you want to attach the 3D Text Label to.
OffsetX The Offset-X coordinate of the player (the player is 0.0,0.0,0.0).
OffsetY The Offset-Y coordinate of the player (the player is 0.0,0.0,0.0).
OffsetZ The Offset-Z coordinate of the player (the player is 0.0,0.0,0.0).
PRIMJER #7:Attach3DTextLabelToPlayer(textid, playerid, 0.0, 0.0, 0.0);FUNKCIJA #8:Ovo ti je funkcija da prikaćiš 3D tekst na vozilo koje ti želiš:
Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ) (http://wiki.sa-mp.com/wiki/Attach3DTextLabelToVehicle)
Text3D:id The 3D Text Label you want to attach.
vehicleid The vehicle you want to attach the 3D Text Label to.
OffsetX The Offset-X coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0)..
OffsetY The Offset-Y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0)..
OffsetZ The Offset-Z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0)..
PRIMJER #8:new
vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
Attach3DTextLabelToVehicle(textid, vehicleid, 0.0, 0.0, 0.0);VIÅ E INFORMACIJA:Vjerojatno ste primjetili
\n više puta - koristite to ako želite da prebacite tekst u novu liniju.
Znaći ovo:
Update3DTextLabelText(textid, 0x90C9C9FF, "This is a\nCHANGED GLOBAL 3d text.");Bi trebalo da izgleda ovako:
This is a
CHANGED GLOBAL 3d text.
(http://banners.copyscape.com/images/cs-bk-120x60.gif)
korisno
Veoma lijepo , dobar tut ! :)
Nicee good work mate ! ;)
dobar tut svaka cast.... ;)
Jako dobar i koristan tut... ;)
trebao bih pomoc za to recimo
Tako da ti pise kada je kuca na prodaji ili ja kupljena, ili kada je bizz na prodaji ili kupljen
Hvala..
Ma dobro to ali kako napravit da igraÄu piÅ¡e iznad glave ono Å¡to on na piÅ¡e u textboxu
http://wiki.sa-mp.com/wiki/SetPlayerChatBubble (http://wiki.sa-mp.com/wiki/SetPlayerChatBubble)
Korisno,jednostavno i lako.
Pomoći će nekima :)
ok je... malo je tupavo sto je na engleskom (mislim ja znam eng al neki i neznaju)
Ne razumijem zasto refreshate temu staru godinu dana??? ???
valjda je to neka fora..
Citat: Derekonja poslato Decembar 01, 2010, 19:40:29 POSLE PODNE
valjda je to neka fora..
Da,fora?
Pa ti si spammer najveci ovdje...
ONTOPIC:Jel radi ovo na 0.3c?
Citat: [BE] BestOne poslato Decembar 02, 2010, 14:06:02 POSLE PODNE
Citat: Derekonja poslato Decembar 01, 2010, 19:40:29 POSLE PODNE
valjda je to neka fora..
Da,fora?
Pa ti si spammer najveci ovdje...
ONTOPIC:Jel radi ovo na 0.3c?
nije spamer tek jedan post napiso
a ovo je dobro za 3d-text hvala onome sto je napravio tut
Sry za refresh.
Napravio sam nekoliko NPCova i zanima me kako da prikacim 3DText na njih | Da im onako iznad glave kao pise Ime_Prezime ?
ja mislim da to pise odma
Pa da pise,ne bih pitao kako da stavim :-*
Mislim da napises new 3dbot;
Pa dolje 3dbot; = 3dtext...
I onda dalje valjda znas :)
Odlicno ;D
znam skriptat,ali ;D ovo mi je posluzilo majke mi!
Citat: OiSkora poslato Februar 17, 2011, 14:29:01 POSLE PODNE
znam skriptat,ali ;D ovo mi je posluzilo majke mi!
Molim vas da ne refresujete teme ako nemate neko pitanje...
Imam pitanje, Kako da ovo stavim samo na odredjeno mesto? na primer na trg da stavim da pise "Opstinski Trg" isto u 3D? kako to ?
Uzmes koordinate gdje zelis da ti bude text i ubacis u ovo.
evo ti samo ti stavi kordinate koje hoces
Create3DTextLabel("Text",COLOR_YELLOW, 1560.0179,-2202.1699,13.5469,50.0,0,0);
Citat: Don Mangano poslato Mart 03, 2011, 17:27:51 POSLE PODNE
Odlicno odradjen posao,bravo ;)
Nemoj refresati teme ako nemas pitanje!
Post obrisan!
Ja imam pitanje,ovdje ima 100 stvari a ja neznam koja je prava,koristite Zbrkane rjeci+nesto je na Engleskom,e sad koje je tu da napravim da mi npr pise 3d text "rent motora" i da svi vide,to je kao npr ono sta negdje pise
"Kuca na prodaju
Cjena:13999$
kucaj /buyhouse da kupis
Lvl za kupnju kuce:4"
Ja ocu da samo npr pise "rent motora" koji je to "korak" ovdje?
Create3DTextLabel (http://wiki.sa-mp.com/wiki/Create3DTextLabel)
Tu pogledaj i bice ti jasno
Evo ga uspeo sam ;) Sve radi samo sad imam warninge
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(140) : warning 204: symbol is assigned a value that is never used: "bazenulaz"
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(139) : warning 204: symbol is assigned a value that is never used: "odjeca"
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(141) : warning 204: symbol is assigned a value that is never used: "spawn"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.
Znam da je Tema stara,ali refresh je sa razlogom!
Obrisi te linije!
Edit: Ili nam postaj sve sta si radio(ako nije predugacko) pa da vidimo gdje si pogresio!
To na pocetak
new Text3D:odjeca;
new Text3D:bazenulaz;
new Text3D:spawn;
Ovo pod OnGameModInt
odjeca = Create3DTextLabel("Odjeca", 0xAA3333AA, 566.9622,-2077.8528,2.8952, 40.0, 0);
bazenulaz = Create3DTextLabel("Dobro Dosli na Bazen", 0xFFFF00AA, 1310.3176,-1370.8679,14.4877, 50.0, 0);
spawn = Create3DTextLabel("Diversion Stunt/DM", 0x33AA33AA, 404.5104,2456.2856,16.5000, 90.0, 0);
Warning:
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(142) : warning 204: symbol is assigned a value that is never used: "bazenulaz"
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(141) : warning 204: symbol is assigned a value that is never used: "odjeca"
C:\Documents and Settings\Danijel\Desktop\Diversion Stunt DM\gamemodes\Diversion.pwn(143) : warning 204: symbol is assigned a value that is never used: "spawn"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.
Reci mi zasto si onda radio
new Text3D:odjeca; i ostali nisu ti potrebni ako neces nesto da uradis sa njima naprimer da obrises...
Delete3DTextLabel(odjeca);
Pa kad obrisem,izbaci mi 3 erora "undefinden simbol" to mora biti,radio sam po tutu
Verovatno si izbrisao samo new a nisi ovo:
odjeca = Create3DTextLabel("Odjeca", 0xAA3333AA, 566.9622,-2077.8528,2.8952, 40.0, 0);
bazenulaz = Create3DTextLabel("Dobro Dosli na Bazen", 0xFFFF00AA, 1310.3176,-1370.8679,14.4877, 50.0, 0);
spawn = Create3DTextLabel("Diversion Stunt/DM", 0x33AA33AA, 404.5104,2456.2856,16.5000, 90.0, 0);
hvala pomogao si mi Kingu 8)