Jump to content

Cum sa faci un TextDraw sa arate jucatorii online.


MrBlack

Recommended Posts

  • 2 weeks later...
  • 3 weeks later...
  • 4 months later...

m-am gandit un pic si... am zis sa-l fac un pic mai "inteligent" :))

[pawn]

#include <a_samp>

new Text:players;

public OnFilterScriptInit()

{

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);

retextdraw();

}

public OnPlayerConnect(playerid)

{

retextdraw();

return 1;

}

public OnPlayerDisconnect(playerid)

{

retextdraw();

return 1;

}

stock GetOnLinePlayers()

{

new OnLine;

for(new i, g = GetMaxPlayers(); i < g; i++)

if(IsPlayerConnected(i))

OnLine++;

return OnLine;

}

stock retextdraw()

{

TextDrawHideForAll(players);

new string[15];

format(string, 15, "%d/50",GetOnLinePlayers());

TextDrawSetString(players, string);

TextDrawShowForAll(players);

}

public OnFilterScriptExit()

{

TextDrawHideForAll(players);

TextDrawDestroy(players);

return 1;

}[/pawn]

[glow=pink,2,300]cu un simplu stock....cand ies jucatorii de pe server stockul il ascunde seteaza iar td-ul si il arata....dar o face atat de repede ca "nici nu dispare"

la fel si cand intra un jucator pe server.[/glow]

[glow=green,2,300]bug rezolvat[/glow]

bafta all;) :D

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 4 months later...
  • 2 weeks later...
  • 3 months 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.

×
×
  • 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.