Converting User Input to Textdraw Issues - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Converting User Input to Textdraw Issues (
/showthread.php?tid=655692)
Converting User Input to Textdraw Issues -
SlayerHodge - 27.06.2018
Problem: I am having an issue/ignorant on how to create a textdraw box in which will place inputs of users.
Expectations: It is for a Dealer System, in which I have fully functioning without the textdraws. What I wanted to do is when a player(s) who is connected to specified dealerid(playerid) makes a bet, everyone who is connected to that specified table would be able to see their wager/bet, for example: John $1.000.000 1st Line.
the list of bets would be updated when ever the next player makes a bet. example: John $1.000.000 1st Line\n James $1.000.000 2nd Line.
Re: Converting User Input to Textdraw Issues -
Akeem - 27.06.2018
Loop through the players and use an if statement to get whether or not the player is at that dealer and show him the textdraw. When that player now use /wager you can set that textdrawtext and then show it to the player. Them reset the text when the dealer do something like /clearwagers...
Re: Converting User Input to Textdraw Issues -
GTLS - 27.06.2018
Quote:
Originally Posted by Akeem
Lol,
|
Whats funny?
anwyays,
just use this :
https://sampwiki.blast.hk/wiki/Strcat
and add the new info inside it. For eg:
PHP код:
new string[68];
strcat(string, "Hello");
strcat(string, "\nWorld");
TextDrawSetString(TextDrawID, string);
This will out put:
inside your textdraw box. So everytime a new player places a bet, just strcat the old string with new player's bet and its amount.
Re: Converting User Input to Textdraw Issues -
Akeem - 27.06.2018
Quote:
Originally Posted by GTLS
Whats funny?
|
I have my reasons sir. i wasn't laughing at his question.