How to get %s in text draw -
SnG.Scot_MisCuDI - 16.12.2011
Sup, how can i make it so i can use %s in a text draw. Like i type /startevent (name) and it shows (name) has started!
I got it to work with sendclientmessage but i dont know how for Gametextforall
example:
pawn Код:
format(string, 120, "[EVENT] %s Has Started. Type /yes to join.",tmp);
that will show in chatbox [EVENT]noob Has Started. Type /yes to join.
But then on the text draw it will show EVENT HAS STARTED type /yes to join. How can i changed the word EVENT to the name it sends in chat box.
pawn Код:
GameTextForAll("~w~ %s Has Started Type ~n~~r~/Yes ~g~To Join!",6000,3);
Re: How to get %s in text draw -
SnG.Scot_MisCuDI - 16.12.2011
Quote:
Originally Posted by belhot1992
Do it this way, it's better:
pawn Код:
format(string, 120, "[EVENT] %s Has Started. Type /yes to join.",tmp); for(new i; i<MAX_PLAYERS; i++) { SendClientMessage(i, COLOR_YELLOW, string); return 1; }
|
that wont make it show the event name on the screen. With a text draw. I need the GameTextForAll part.
Re: How to get %s in text draw -
Haydz - 16.12.2011
Quote:
Originally Posted by belhot1992
Do it this way, it's better:
pawn Код:
format(string, 120, "[EVENT] %s Has Started. Type /yes to join.",tmp); for(new i; i<MAX_PLAYERS; i++) { SendClientMessage(i, COLOR_YELLOW, string); return 1; }
|
Why should he use a loop to send the message? just use SendClientMessageToAll
pawn Код:
format(string, 70, "[EVENT] %s Has Started. Type /yes to join.",tmp);
GameTextForAll(string,6000,3);
Re: How to get %s in text draw -
SnG.Scot_MisCuDI - 16.12.2011
pawn Код:
error 017: undefined symbol "i"
Re: How to get %s in text draw -
Ballu Miaa - 16.12.2011
Quote:
Originally Posted by googamalugafoo
pawn Код:
error 017: undefined symbol "i"
|
As they already stated! Use this one
pawn Код:
format(string, 70, "[EVENT] %s Has Started. Type /yes to join.",tmp);
GameTextForAll(string,6000,3);
Re: How to get %s in text draw -
SnG.Scot_MisCuDI - 16.12.2011
Quote:
Originally Posted by Ballu Miaa
As they already stated! Use this one
pawn Код:
format(string, 70, "[EVENT] %s Has Started. Type /yes to join.",tmp); GameTextForAll(string,6000,3);
|
yeah i edited the code to that. But how can i change with ~w~ ~n~ and stuff
pawn Код:
GameTextForAll(string,6000,3);
Re: How to get %s in text draw -
Thresholdold - 16.12.2011
Quote:
Originally Posted by googamalugafoo
yeah i edited the code to that. But how can i change with ~w~ ~n~ and stuff
pawn Код:
GameTextForAll(string,6000,3);
|
with the format(string... just put ~w~ and ~n~ where you would want them to go as if they were part of GameTextForPlayer...
Example:
pawn Код:
format(string, 70, "~g~[EVENT] %s Has ~r~Started. ~n~~w~Type ~r~/yes ~g~to join.",tmp);
Re: How to get %s in text draw -
Ballu Miaa - 16.12.2011
Quote:
Originally Posted by Threshold
with the format(string... just put ~w~ and ~n~ where you would want them to go as if they were part of GameTextForPlayer...
Example:
pawn Код:
format(string, 70, "~g~[EVENT] %s Has ~r~Started. ~n~~w~Type ~r~/yes ~g~to join.",tmp);
|
Exactly!
Re: How to get %s in text draw -
SnG.Scot_MisCuDI - 16.12.2011
Quote:
Originally Posted by Threshold
with the format(string... just put ~w~ and ~n~ where you would want them to go as if they were part of GameTextForPlayer...
Example:
pawn Код:
format(string, 70, "~g~[EVENT] %s Has ~r~Started. ~n~~w~Type ~r~/yes ~g~to join.",tmp);
|
When i do this it shows in the text box the ~w~ etc.
Re: How to get %s in text draw - suhrab_mujeeb - 17.12.2011
Or use a textdraw and then use a timer to turn it off. How hard could that be?