Jump to content

Cum sa faci un TextDraw sa arate jucatorii online.


Recommended Posts

  • 2 weeks later...
  • 3 weeks later...
Posted

foarte tare tutorialul...

4/5 ptr ca ai un bug...

    cand un jucator iese de pe server...    nu mai scade...ci doar ramane 5/ 50 sa zicem si pe server sunt doar 2...    daca stii cum se poate rezolva...  iti dau 5/5  ptr tutorial bv

  • 4 months later...
Posted

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.