Raised This Month: $ Target: $400
 0% 

reset user_kill 1 death?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 10-30-2009 , 14:23   reset user_kill 1 death?
Reply With Quote #1

PHP Code:
#include <fakemeta_util>

#define EXTRAOFFSET 5
#define OFFSET_DEATHS 555
#define OFFSET_INTERALMODEL 126
#define OFFSET_TEAM 114

 
public function(id)
{
    
//Kill user
    
fm_user_kill(id,1)

    
//Reset Score
    
fm_cs_set_user_deaths(id0)
    
fm_set_user_frags(id0)
}

stock fm_cs_set_user_deaths(clientdeaths)
{
    
set_pdata_int(clientOFFSET_DEATHSdeathsEXTRAOFFSET);
    
    static 
ScoreInfo;
    if( 
ScoreInfo || (ScoreInfo get_user_msgid("ScoreInfo")) )
    {
        
emessage_begin(MSG_BROADCASTScoreInfo);
        
ewrite_byte(client);
        
ewrite_short(get_user_frags(client));
        
ewrite_short(deaths);
        
ewrite_short(0);
        
ewrite_short(_:fm_cs_get_user_team(client));
        
emessage_end();
    }
}

stock CsTeams:fm_cs_get_user_team(client, &{CsInternalModel,_}:model=CS_DONTCHANGE)
{
    
model CsInternalModel:get_pdata_int(clientOFFSET_INTERALMODELEXTRAOFFSET)
    
    return 
CsTeams:get_pdata_int(clientOFFSET_TEAMEXTRAOFFSET)

why the code is not work to remove the 1 death?
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 10-30-2009 at 14:34.
biscuit628 is offline
Amonel
Senior Member
Join Date: May 2009
Old 10-30-2009 , 17:14   Re: reset user_kill 1 death?
Reply With Quote #2

fm_cs_set_user_deaths(id, 0)
fm_set_user_frags(id, 0)

should be

fm_cs_set_user_deaths(id, 0)
fm_set_user_deaths(id, 0)


i think .. .hmm :-??
Amonel is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-30-2009 , 17:31   Re: reset user_kill 1 death?
Reply With Quote #3

Use cstrike and fun natives is more efficient.

user_kill(id)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)



cs_set_user_deaths = 1 native
fm_cs_set_user_deaths = 10 natives
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 10-30-2009 , 19:58   Re: reset user_kill 1 death?
Reply With Quote #4

PHP Code:
function( id )
{
   
user_killid); // Set second parameter to 1 and no frag will be removed.
   
cs_set_user_deathsidcs_get_user_deathsid ) - );

__________________
In Flames we trust!
Nextra is offline
Reply


Thread Tools
Display Modes

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 17:41.


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