SA-MP Forums Archive
making SendFormatedMessage... - 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: making SendFormatedMessage... (/showthread.php?tid=269128)



making SendFormatedMessage... - DRIFT_HUNTER - 15.07.2011

pawn Код:
stock SendFormatedMessage(playerid, string[], {Float,_}:...)
{
    new Str[256];
    //I cant figure out how i can use that Float
    format(Str, sizeof (Str), string, THESE_IS_THE_PROBLEM);
    SendClientMessage(playerid, Color:ORANGE, Str);
    return 1;
}



Re: making SendFormatedMessage... - Calgon - 15.07.2011

for, numargs, getarg & maybe setarg. (was going to warn you but I couldn't be bothered explaining why arguments aren't the most efficient method, and I was going on the code you provided with the format arguments)

https://sampforum.blast.hk/showthread.php?tid=77000


Re: making SendFormatedMessage... - DRIFT_HUNTER - 15.07.2011

Thx it helps


Re: making SendFormatedMessage... - Jochemd - 15.07.2011

Just use defines like ****** says

pawn Код:
new str[128];
#define SendFormatMessage(%0,%1,%2,%3) format(str, sizeof(str),%2,%3) && SendClientMessage(%0, %1, str)
#define SendFormatMessageToAll(%1,%2,%3) format(str, sizeof(str),%2,%3) && SendClientMessageToAll(%1, str)