[HR/SR:TUT] 3D tekst
#1

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, FloatrawDistance, attachedplayer, attachedvehicle, testLOS)
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
PlayerText3Dlayertextid; // 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, FloatrawDistance, virtualworld, testLOS)
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)
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)
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[])
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[])
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)
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)
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:
Code:
This is a
CHANGED GLOBAL 3d text.




BY: Don Correlli
Reply
#2

Odlično odrađeno, support +1
Reply
#3

superr
Reply
#4

lepo! +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)