How to?..
#1

How to display a text for player under the cash ammount for example of "Coins system" like:
Код:
CMD:mygears(playerid, params[])
{
        format(sstring, sizeof(sstring), "\t%s 's Gears ammount:\n\nYou Have: %d Gears!", Global_Name, PlayerInfo[playerid][GoldCoins]);
        ShowPlayerDialog(playerid, MyCoins, BOX,"Gears Info",sstring,"Quit","");
        return 1;
I need it to show how many coins a player have once he connects till he disconnects.
Reply
#2

You should use a Textdraw for that which can be updated every second.
Reply
#3

The question is how to display the ammount of gears in the textdraw?
Reply
#4

If i'm not wrong it supposed to be like that:
PHP код:
new Text:PTextDraw[MAX_PLAYERS]; // on top 
PHP код:
PTextDraw[playerid] = TextDrawCreate(x,y," "); // on player connect 
PHP код:
TextDrawDestroy(PTextDraw[playerid]); // onplayerdisconnect 
And For update text
PHP код:
  new string[150];
  
format(stringsizeof(string), "\t%s 's Gears ammount:\n\nYou Have: %d Gears!"Global_NamePlayerInfo[playerid][GoldCoins]);
  
TextDrawSetString(PTextDraw[playerid],string);
  
TextDrawShowForPlayer(playerid,PTextDraw); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)