Raised This Month: $ Target: $400
 0% 

Trouble with cs_set_user_defuse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-20-2009 , 12:24   Re: Trouble with cs_set_user_defuse
Reply With Quote #5

Quote:
Originally Posted by Alucard^ View Post
Hi... i have a trouble with this function....

For example i set:

PHP Code:
cs_set_user_defuse(id125500
But when the round end and i respawn the color of defuse back to green =/

I tried with:

PHP Code:
RegisterHam(Ham_Spawn"player""PlayerSpawn")

...

public 
PlayerSpawn(id)
        
cs_set_user_defuse(id125500
But nothing.
The fact is cs updates players hud after they spawn so, default icon values are restored.
If it's made as in standart half life coding, it is proceeded in UpdateClientData when m_fInitHUD == 1, so the icon will be set back to green after you spawn, or when you execute fullupdate command, or when you make a demo.

Try this :
PHP Code:
#include <amxmodx>
#include <cstrike>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("defuser icon color"VERSION"ConnorMcLeod")

    
register_event("StatusIcon""Event_StatusIcon_defuser""be""1=1""2=defuser")
}

public 
Event_StatusIcon_defuserid )
{
    
cs_set_user_defuse(id125000)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:12.


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