AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DHUD problem! (https://forums.alliedmods.net/showthread.php?t=184010)

dFF 04-29-2012 15:24

DHUD problem!
 
I tried to make a simple dHud stocks, Here is a partial code:
PHP Code:

Used:
static 
szName32 ]; get_user_nameiKillerszNamecharsmaxszName ) )
__show__dhudmessage_playeriKiller, { 0255}, "Wow^nYou %s"szName )

Stocks:
__show__dhudmessage_playeridszRGB], const szMessage[ ], any:... )
{
    new 
szBuffer128 ], dhud_color
    vformat
szBuffercharsmaxszBuffer ), szMessage)
    
    
dhud_color szRGB] + ( szRGB] << ) + ( szRGB] << 16 )
    
    
message_beginMSG_ONE_UNRELIABLESVC_DIRECTOR, .player=id )
    {
        
write_bytestrlenszBuffer ) + 31 )
        
write_byteDRC_CMD_MESSAGE )
        
write_byte)            // effect
        
write_longdhud_color )    // color
        
write_long_:-1.0 )        // x
        
write_long_:0.55 )    // y
        
write_long_:0.1 )        // fade in
        
write_long_:1.0 )        // fade out
        
write_long_:3.0 )        // holdtime
        
write_long_:6.0 )        // fx time
        
write_stringszBuffer )    // message
    
}
    
message_end()


And the server Crash on Linux OS (os type centos), but on Windows server not crashed! What is the problem ?

<VeCo> 04-29-2012 15:25

Re: DHUD problem!
 
Why don't you use the existing dhudmessage.inc?

dFF 04-29-2012 15:26

Re: DHUD problem!
 
Because I want to used less functions.


All times are GMT -4. The time now is 07:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.