Respawn issues [Crosshair fix]

For scripting examples for learning how to use AMXX.
User avatar
Archive-Poster
Posts: 1267
Gender:
United States of America

Respawn issues [Crosshair fix]

Post by Archive-Poster »

Today I noticed that if you get respawned, sometimes, I don't know if it happens always, you get this type of crosshair (additionally to the normal one):

So, I've fixed this issue calling a simmilar function to this one in Ham_Spawn post:

Code: Select all

stock FixCrosshair( id ) 
{
    static iCrosshair;
    if ( !iCrosshair )
    {
        iCrosshair = get_user_msgid( "Crosshair" );
    }
    
    message_begin( MSG_ONE_UNRELIABLE, iCrosshair, _, id ); 
    write_byte( 0 ); 
    message_end( ); 
} 
It's better catching get_user_msgid( ) return value though.

Who is online

Users browsing this forum: No registered users and 1 guest