Jump to content
  • 0

TextDraw


Deejaybwg

Question

Am pus acest text draw pentru players online:

[pawn]players = TextDrawCreate(54.000000, 326.000000, "_");

TextDrawBackgroundColor(players, 255);

TextDrawFont(players, 2);

TextDrawLetterSize(players, 0.500000, 1.000000);

TextDrawColor(players, -65281);

TextDrawSetOutline(players, 1);

TextDrawSetProportional(players, 1);

for(new i; i < MAX_PLAYERS; i ++)

{

if(IsPlayerConnected(i))

{

TextDrawShowForPlayer(i, players);

TextDrawShowForPlayer(i, Textdraw0);

TextDrawShowForPlayer(i, Textdraw1);

TextDrawShowForPlayer(i, Textdraw2);

TextDrawShowForPlayer(i, Textdraw3);

TextDrawShowForPlayer(i, Textdraw4);

TextDrawShowForPlayer(i, Textdraw5);

TextDrawShowForPlayer(i, Textdraw6);

TextDrawShowForPlayer(i, Textdraw7);

TextDrawShowForPlayer(i, Textdraw8);

TextDrawShowForPlayer(i, Textdraw9);

TextDrawShowForPlayer(i, Textdraw10);

TextDrawShowForPlayer(i, Textdraw11);

TextDrawShowForPlayer(i, Textdraw16);

TextDrawShowForPlayer(i, Textdraw17);

TextDrawShowForPlayer(i, Textdraw18);

}

}[/pawn]

L-am pus in locul celuilalt textdraw pentru players online care il aveam, am dat compile si:

D:\[RSG]\Gamemodes\RSG.pwn(1062) : error 017: undefined symbol "Textdraw10"

D:\[RSG]\Gamemodes\RSG.pwn(1063) : error 017: undefined symbol "Textdraw11"

D:\[RSG]\Gamemodes\RSG.pwn(1064) : error 017: undefined symbol "Textdraw16"

D:\[RSG]\Gamemodes\RSG.pwn(1065) : error 017: undefined symbol "Textdraw17"

D:\[RSG]\Gamemodes\RSG.pwn(1066) : error 017: undefined symbol "Textdraw18"

Liniile:

1062                        TextDrawShowForPlayer(i, Textdraw10);

1063                        TextDrawShowForPlayer(i, Textdraw11);

1064                        TextDrawShowForPlayer(i, Textdraw16);

1065                        TextDrawShowForPlayer(i, Textdraw17);

1066                        TextDrawShowForPlayer(i, Textdraw18);

De ce da erorile astea?

www.youtube.com/thebwgg

Link to comment
Share on other sites

23 answers to this question

Recommended Posts

Am pus:

[pawn]  players = TextDrawCreate(54.000000, 326.000000, "_");

TextDrawBackgroundColor(players, 255);

TextDrawFont(players, 2);

TextDrawLetterSize(players, 0.500000, 1.000000);

TextDrawColor(players, -65281);

TextDrawSetOutline(players, 1);

TextDrawSetProportional(players, 1);

for(new i; i < MAX_PLAYERS; i ++)

{

if(IsPlayerConnected(i))

{

          new Textdraw10;

          new Textdraw11;

          new Textdraw16;

          new Textdraw17;

          new Textdraw18;);

}

}[/pawn]

Si uite ce a iesit:

D:\[RSG]\Gamemodes\RSG.pwn(1055) : error 029: invalid expression, assumed zero

D:\[RSG]\Gamemodes\RSG.pwn(1055) : warning 215: expression has no effect

D:\[RSG]\Gamemodes\RSG.pwn(1055) : warning 203: symbol is never used: "Textdraw18"

D:\[RSG]\Gamemodes\RSG.pwn(1054) : warning 203: symbol is never used: "Textdraw17"

D:\[RSG]\Gamemodes\RSG.pwn(1053) : warning 203: symbol is never used: "Textdraw16"

D:\[RSG]\Gamemodes\RSG.pwn(1052) : warning 203: symbol is never used: "Textdraw11"

D:\[RSG]\Gamemodes\RSG.pwn(1051) : warning 203: symbol is never used: "Textdraw10"

www.youtube.com/thebwgg

Link to comment
Share on other sites

Asta le pui la OnGameModeInit.

[pawn]    players = TextDrawCreate(54.000000, 326.000000, "_");

    TextDrawBackgroundColor(players, 255);

    TextDrawFont(players, 2);

    TextDrawLetterSize(players, 0.500000, 1.000000);

    TextDrawColor(players, -65281);

    TextDrawSetOutline(players, 1);

    TextDrawSetProportional(players, 1);[/pawn]

Iar astea le pui la inceputul scriptului:

[pawn]new Text:Textdraw10;

new Text:Textdraw11;

new Text:Textdraw16;

new Text:Textdraw17;

new Text:Textdraw18;

new Text:players[/pawn]

Iar la OnPlayerConnect pui

[pawn]TextDrawShowForPlayer(playerid,players);[/pawn]

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

=-" post="76465" timestamp="1307827965"]

Asta le pui la OnGameModeInit.

[pawn]    players = TextDrawCreate(54.000000, 326.000000, "_");

    TextDrawBackgroundColor(players, 255);

    TextDrawFont(players, 2);

    TextDrawLetterSize(players, 0.500000, 1.000000);

    TextDrawColor(players, -65281);

    TextDrawSetOutline(players, 1);

    TextDrawSetProportional(players, 1);[/pawn]

Iar astea le pui la inceputul scriptului:

[pawn]new Text:Textdraw10;

new Text:Textdraw11;

new Text:Textdraw16;

new Text:Textdraw17;

new Text:Textdraw18;

new Text:players[/pawn]

Iar la OnPlayerConnect pui

[pawn]TextDrawShowForPlayer(playerid,players);[/pawn]

Cum adica la OnGameModeInit pun:

players = TextDrawCreate(54.000000, 326.000000, "_");

    TextDrawBackgroundColor(players, 255);

    TextDrawFont(players, 2);

    TextDrawLetterSize(players, 0.500000, 1.000000);

    TextDrawColor(players, -65281);

    TextDrawSetOutline(players, 1);

    TextDrawSetProportional(players, 1);[/pawn]

Si la "inceputul scriptului pun":

Text:Textdraw10;

new Text:Textdraw11;

new Text:Textdraw16;

new Text:Textdraw17;

new Text:Textdraw18;

new Text:players

? TextDraw-ul acesat e in GM.

Nu inteleg cum sa fac.. Adica la "inceputul scriptului" asa pur si simplu? Am pus si imi da erori.. :undecided:

www.youtube.com/thebwgg

Link to comment
Share on other sites

Cauta in script "new" (fara ghilimele) si o sa-ti dea altele pe la inceput (in primele linii ale scriptului), mai exact dupa #include <a_samp>

Apoi cauti public OnGameModeInit si daca te uiti pe acolo sigur vei gasi alte TextDraw-uri si o sa vezi cum se pun.

Foloseste Ctrl+F pentru a cauta.

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Ruben" post="76859" timestamp="1307940772"]

U esti mai marele scripterilor vad,nu ai inceput tot ca el?Sau inca esti mai varza ca el?Si comentezi sa te bagi singur in seama!

eu am invatat singur ;) nu ceream ajutor si la textdraw :| o_0

hai ca am dat-o in offtopic :))

<a href=http://devilone.ro>

devilone-banner.png</a>

Link to comment
Share on other sites

stuntman-=!!" post="76966" timestamp="1307967794"]

e GameText, cauta-l si scoate ] de la sfarsit.

Asta e TextDraw-ul:

players = TextDrawCreate(70.0, 325.0, "_");

  TextDrawBackgroundColor(players, 255);

  TextDrawFont(players, 3);

  TextDrawLetterSize(players, 0.429999, 1.400000);

  TextDrawColor(players,0x000000ff);

  TextDrawSetOutline(players, 1);

  TextDrawSetProportional(players, 1);

Nu gasesc niciun ] :undecided: Am uitat eu sa pun ca este textdraw pentru players online.. Scuze..

www.youtube.com/thebwgg

Link to comment
Share on other sites

te duci la :

public OnPlayerSpawn
la
	new strings[215];
   	format(strings, 15, "~w~%d/~r~50",GetOnLinePlayers());
   	TextDrawSetString(players, strings);
   	TextDrawShowForPlayer(playerid, players);
	UpdateTime();

si in loc de /50 iti pui cati vrei tu 8-|

app la mine nu scad Playeri....

decat cresc...

<a href=http://devilone.ro>

devilone-banner.png</a>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.