Jump to content

Question

Posted

Salut, am bagat un TextDraw cu playeri online deasupra mapei ! Problema este: Atunci cand playerul se deconecteaza nu scade numarul de playeri online la texdraw ! Acesta este textdrawul folosit:  https://laleagane.ro/forum/threads/589293-Tutorial-SA-MP-Cum-sa-faci-un-textdraw-sa-arate-jucatorii-online

 

De la ce poate fi?

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

Incearca sa pui asta la OnPlayerDisconnect:

for(new i = 0 , i < MAX_PLAYERS, i++)
{   
new strings[15];
    format(strings, 15, "%d/50",GetOnLinePlayers());
    TextDrawSetString(players , strings);
    TextDrawShowForPlayer(i , players);
}
Edited by #Teddy

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

  • 0
Posted

Tot degeaba! Am incercat fel si fel de metode dar in zadar! Nu imi mai scade numarul de playeri din textdraw... !

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

  • 0
Posted (edited)

Incearca asa:

stock GetOnLinePlayers()
{
new OnLine;
for(new i, g = GetMaxPlayers(); i < g; i++)
{
if(IsPlayerConnected(i))
{
OnLine++;
{
}
else
{
OnLine--;
}
}
return OnLine;
}

sau incearca sa pui la OnPlayerUpdate:

new strings[15];
    format(strings, 15, "%d/50",GetOnLinePlayers());
    TextDrawSetString(players , strings);
    TextDrawShowForPlayer(playerid , players);
Edited by #Teddy

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

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.