Its posible string + text? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Its posible string + text? (
/showthread.php?tid=167010)
Its posible string + text? -
almighty - 10.08.2010
Is it posible to use String + text on a formatted string for sendclientmessage?... like this
format(string,sizeof(string),"%s, " + text,Name);
Assuming Text has some text?..
Re: Its posible string + text? -
JaTochNietDan - 10.08.2010
Quote:
Originally Posted by almighty
Is it posible to use String + text on a formatted string for sendclientmessage?... like this
format(string,sizeof(string),"%s, " + text,Name);
Assuming Text has some text?..
|
No, that's why we use format
This is assuming that you mean for instance Javascript-like syntax, where you can do string + "Hello " + "Sir"
Re: Its posible string + text? -
Hiddos - 10.08.2010
pawn Код:
format(string, sizeof string, "%s %s", Name, text);
Name is a string, text is a string, so you can fill in both.
Re: Its posible string + text? -
almighty - 10.08.2010
Quote:
Originally Posted by JaTochNietDan
No, that's why we use format
This is assuming that you mean for instance Javascript-like syntax, where you can do string + "Hello " + "Sir"
|
i've tried this one... did not work...
Quote:
Originally Posted by Hiddos
pawn Код:
format(string, sizeof string, "%s %s", Name, text);
Name is a string, text is a string, so you can fill in both.
|
Thanks for this one... it did work...
Re: Its posible string + text? -
randomkid88 - 10.08.2010
Quote:
Originally Posted by Hiddos
pawn Код:
format(string, sizeof string, "%s %s", Name, text);
Name is a string, text is a string, so you can fill in both.
|
Is it possible to make the name and Text be the same color? I'm trying to do this with ProxDetector and the name is always the Player's Color. I have seen it done before, I just can't get it to work.
Re: Its posible string + text? -
JaTochNietDan - 10.08.2010
Quote:
Originally Posted by almighty
i've tried this one... did not work...
Thanks for this one... it did work...
|
It's not supposed to work, this is Pawn not Javascript