[HELP] SendClientFormatMessage.
#1

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

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)