y_va - Format Hex Problem
#1



Well I have a problem...

Function:
pawn Код:
stock FormatMSGToAll( color, string[ ], va_args<> )
{
    format( _S_T_R_, sizeof _S_T_R_, string, va_start<2> );
    SendClientMessageToAll( color, _S_T_R_ );
   
    return ( 1 );
}
Use:
pawn Код:
FormatMSGToAll( GetPlayerColor( playerid ), "%s["C_W"%d{%06x}] "C_W"connected to the server.", pName( playerid ), playerid, GetPlayerColor( playerid ) >>> 8 );
Reply
#2

Quote:
Important Note: GetPlayerColor will return nothing unless SetPlayerColor has been used!
Click HERE for a fix.
Have you set the player's color when they connect? Moreover, are you using this OnPlayerConnect?
Reply
#3

Yes, I've set the color, I'm not so dumb...

But thanks for the help..
Reply
#4

pawn Код:
FormatMSGToAll( GetPlayerColor( playerid ), "%s["C_W"%d{%06x}] "C_W"connected to the server.", pName( playerid ), playerid, GetPlayerColor( playerid ) >>> 8 );
Why is there that C_W? Also, if you wanted to set quotation marks, use \". Otherwise, please explain what you wanted to do, and also, why you were using bits.
Reply
#5

I'm so fucked up...
Thanks...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)