Jump to content

SetObjectMaterialText


Gireada

Recommended Posts

M-am gandit sa va arat cum functioneaza functia SetObjectMaterialText.

Pentru a parcurge acest tutorial aveti nevoie de Map Editor

Primadata sa va explic functia.

ID obiect - ID-ul obiectului.

Textul  - Textul pe care vrem sal scriem.

materialindex - Daca vrem sa inlocuim matarialul obiectului cu text.

materialsize - Marimea materialuli. Aveti aici marimile

fontface - Frontul din fata.

fontsize - Marimea frontului (Maxim 255).

bold - Daca va fi scris cu bold

fontcolor - Culoarea text-ului(ARGB) adica 0xFF000000(negru)

backcolor - Culoare de fundal(ARGB)

textalignment - Alinierea obiectului (initial: left)

Primul pas:

Deschide Map editorul si ne ducem la locul unde vrem sa scrie.

tutorial1y.jpg

Pasul 2: Cautam un perete, care a fost adaugat in 0.3e.

[img width=500 height=400] tutorial2uo.jpg

Pasul 3: Il introducem.

[img width=500 height=400] tutorial3ln.jpg

Pasul 4: Luam obiectul si il introducem in GameMode, sub OnGameModeInit.

[pawn]new tutorial = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);[/pawn]

Pasul 5:Sub obiect adaugam functia SetObjectMaterialText

Va fi asa:

[pawn]new tutorial = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText(tutorial, "Tutorial", 0, OBJECT_MATERIAL_SIZE_256x128,\

"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);[/pawn]

Il testam. El va arata asa:

[img width=500 height=400] samp059ec.png

Sfarsit.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Nu nu poti la doar pe peretii aia din 0.3e si setezi tu marimea lui.

Merge sa scri dar forma la font , rezolutaia se ia dupa perete/wall , Deci daca vrei sa scri de exemplu pe sosea , nu o sa vezi intins pe tot spatiu cuvantul "test" o sa fie de vro 10 12 ori , fata verso . Poate pe versiunea urmatoare o sa avem functi noi si o sa mearga

Link to comment
Share on other sites

  • 1 month later...

[pawn]C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(2055) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"[/pawn]

de ce? imi da asta

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

am luat aceliasi obiect si

C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1042 -- 1043) : error 076: syntax error in the expression, or invalid function call
C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1043) : error 021: symbol already defined: "object"
C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1041) : warning 204: symbol is assigned a value that is never used: "object"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

[pawn]new object = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText

new object = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText(object, "Tutorial", 0, OBJECT_MATERIAL_SIZE_256x128,\

"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

return 1;[/pawn]

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

am luat aceliasi obiect si

C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1042 -- 1043) : error 076: syntax error in the expression, or invalid function call
C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1043) : error 021: symbol already defined: "object"
C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(1041) : warning 204: symbol is assigned a value that is never used: "object"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

[pawn]new object = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText

new object = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText(object, "Tutorial", 0, OBJECT_MATERIAL_SIZE_256x128,\

"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

return 1;[/pawn]

Ai de 2 ori object .

[pawn]new object = CreateObject(19353, 210.06, 1924.85, 24.27,  0.00, 0.00, 90.00);

SetObjectMaterialText[/pawn]

STERGE-L !

idiots.png
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.