SA-MP Forums Archive
[HELP] SendClientFormatMessage. - 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: [HELP] SendClientFormatMessage. (/showthread.php?tid=127004)



[HELP] SendClientFormatMessage. - CaHbKo - 11.02.2010

Hi,

I just attempted to make a function which will send a formatted client message with the formatting stuff inside it. I made the header, no errors, but i have no idea how to use "{Float,_}:..." I just took it from the "format(...)" function.
pawn Код:
public SendClientFormatMessage(playerid, color, text[], {Float,_}:...)
{
    return 1;
}

//example:
...
    SendClientFormatMessage(playerid, COLOR_WHITE, "You are ID:%d on X%f Y%f Z%f, and you are a %s.", playerid, x, y, z, "noob");
...
Could someone finish this command and explain the "{Float,_}:..."?

Thanks.


Re: [HELP] SendClientFormatMessage. - dice7 - 11.02.2010

pawn Код:
#define SendClientFormatMessage(%1,%2,%3,%4) new string[128]; format(string, 128, (%3), %4); SendClientMessage(%1,(%2),string);



Re: [HELP] SendClientFormatMessage. - CaHbKo - 11.02.2010

Quote:
Originally Posted by dice7
pawn Код:
#define SendClientFormatMessage(%1,%2,%3,%4) new string[128]; format(string, 128, (%3), %4); SendClientMessage(%1,(%2),string);
pawn Код:
SendClientFormatMessage(playerid, COLOR_ADMINCMD, "[ ! ]You've moved mine ID:%d to X%0.2f Y%0.2f Z%0.2f", id, p[x], p[y], p[z]);
... gives me "error 036: empty statement". I tried to remove the floats and stuff, still no luck.


Re: [HELP] SendClientFormatMessage. - Correlli - 11.02.2010

http://forum.sa-mp.com/index.php?top...2209#msg902209


Re: [HELP] SendClientFormatMessage. - CaHbKo - 11.02.2010

Quote:
Originally Posted by Don Correlli
Okay, it's what i need, but how much the "BYTES_PER_CELL" should be?