Its posible string + text?
#1

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?..
Reply
#2

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"
Reply
#3

pawn Код:
format(string, sizeof string, "%s %s", Name, text);
Name is a string, text is a string, so you can fill in both.
Reply
#4

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...
Reply
#5

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.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)