24.09.2012, 14:32
I used y_va by ****** to do this. You can get it here http://pastebin.com/ALDi7hqC.
If you get errors when including it just remove it because some of ******' other includes already add this.
This is how you would make a SendClientMessageEx from this:
va_args<> should be the last arguement in the function you want to do this for. va_format should be used on a new variable and the third arguement should be the message that you want to format. The last arguement should be va_start<arguement number where va_args is minus 1>. va_args<> is the fourth arguement here so subtract that by one and you get three, which is why it's va_start<3>. Then you just execute the normal function using the variable you created.
If you get errors when including it just remove it because some of ******' other includes already add this.
This is how you would make a SendClientMessageEx from this:
pawn Код:
SendClientMessageEx(playerid, color, msg[], va_args<>)
{
new string[128];
va_format(string, sizeof(string), msg, va_start<3>);
return SendClientMessage(playerid, color, string);
}
va_args<> should be the last arguement in the function you want to do this for. va_format should be used on a new variable and the third arguement should be the message that you want to format. The last arguement should be va_start<arguement number where va_args is minus 1>. va_args<> is the fourth arguement here so subtract that by one and you get three, which is why it's va_start<3>. Then you just execute the normal function using the variable you created.