SA-MP Forums Archive
y_va - Format Hex Problem - 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)
+--- Thread: y_va - Format Hex Problem (/showthread.php?tid=354326)



y_va - Format Hex Problem - aRoach - 26.06.2012



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 );



Re: y_va - Format Hex Problem - Grand_Micha - 26.06.2012

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?


Re: y_va - Format Hex Problem - aRoach - 26.06.2012

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

But thanks for the help..


Re: y_va - Format Hex Problem - Grand_Micha - 26.06.2012

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.


Re: y_va - Format Hex Problem - aRoach - 26.06.2012

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