Scripting with format or without format? - 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: Scripting with format or without format? (
/showthread.php?tid=197022)
Scripting with format or without format? -
godknightx - 07.12.2010
Hi
I now using format for all formatting text.
But i now saw i can script without format function.
So which is the faster/better choice?
This (example):
Quote:
SendClientMessage(playerid, COLOR_WHITE, "Your ID is " playerid);
|
Or:
Quote:
format(text, sizeof(text), "Your ID is %d", playerid);
SendClientMessage(playerid, COLOR_WHITE, text);
|
?
Thanx for the replys
Re: Scripting with format or without format? -
armyoftwo - 07.12.2010
Код:
SendClientMessage(playerid, COLOR_WHITE, "Your ID is " playerid);
This won't work. You will have to use format
Re: Scripting with format or without format? -
RyDeR` - 07.12.2010
Possible.
See:
https://sampforum.blast.hk/showthread.php?tid=57018&p=550206
Just use
pawn Код:
CPF(playerid, COLOR_WHITE, "Your ID is %d", playerid);
Re: Scripting with format or without format? -
godknightx - 07.12.2010
I saw here:
http://freshdoublex.pastebin.com/9LiSRYkv
Line 32
Re: Scripting with format or without format? -
CyNiC - 08.12.2010
Change all for
pawn Код:
SendRconCommand(Hostname1);
,
pawn Код:
SendRconCommand(Hostname2);
and
pawn Код:
SendRconCommand(Hostname3);
.