""#DEFINED" + "STRING" - 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: ""#DEFINED" + "STRING" (
/showthread.php?tid=270360)
""#DEFINED" + "STRING" -
blackwave - 20.07.2011
How do I add a defined sentece + a certain word or phrase (string) ?
Example:
Код:
#define MY "Login screen - Gamemode" // I defined that as a phrase
SendClientMessage(playerid, color, "MY + "Hello"");
// it's like if I'd send "Login - Gamemode Hello");
Re: ""#DEFINED" + "STRING" -
DRIFT_HUNTER - 20.07.2011
pawn Код:
SendClientMessage(playerid, color, MY" Hello");
But i dont think you need that i think you need
https://sampwiki.blast.hk/wiki/Format
Re: ""#DEFINED" + "STRING" -
=WoR=Varth - 20.07.2011
Use format:
pawn Код:
new string[48];
format(string,sizeof(string),"%s Hello",MY);
SendClientMessage(playerid, color, string);
Re: ""#DEFINED" + "STRING" -
blackwave - 20.07.2011
Quote:
Originally Posted by varthshenon
Use format:
pawn Код:
new string[48]; format(string,sizeof(string),"%s Hello",MY); SendClientMessage(playerid, color, string);
|
I was too lazy to think about that xd. But I got something similar, Thanks.
Re: ""#DEFINED" + "STRING" -
MoroDan - 20.07.2011
Quote:
Originally Posted by blackwave
How do I add a defined sentece + a certain word or phrase (string) ?
Example:
Код:
#define MY "Login screen - Gamemode" // I defined that as a phrase
SendClientMessage(playerid, color, "MY + "Hello"");
// it's like if I'd send "Login - Gamemode Hello");
|
But you can do like this:
PHP код:
#define MY "Login screen - Gamemode" // I defined that as a phrase
SendClientMessage(playerid, 0xFFAABBCC, ""MY" Hello");