Raised This Month: $ Target: $400
 0% 

Solved set_user_frags ..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-29-2017 , 09:01   set_user_frags ..
Reply With Quote #1

when i use for example:
amx_score player frags 10, frags does not view in score board till i kill someone or die
cs_set_user_deaths no problem with it
Code;
PHP Code:
    public Cmd_Score iPlayerlevelcid )
    {
        if ( ! ( 
cmd_access iPlayerlevelcid) ) )
            return 
PLUGIN_HANDLED
            
        
new szTarget32 ], szType[7], szAmmount[7];
        
        
read_argv 1szTargetcharsmax szTarget ) )
        
read_argv 2szTypecharsmax szType ) )
        
read_argv 3szAmmountcharsmax szAmmount ) )
        
        new 
iTarget cmd_target iPlayerszTarget)
    
        if( !
iTarget )
            return 
PLUGIN_HANDLED
            
        
new g_szAdminName 33 ], g_szTargetName 33 ], iAmmount str_to_num szAmmount );
        
        
get_user_name iPlayerg_szAdminNamecharsmax g_szAdminName ) )
        
get_user_name iTargetg_szTargetNamecharsmax g_szTargetName ) )
    
        if ( 
equalszType"frags" ) || str_to_numszType ) == 1  )
        {
            
set_user_frags iTargetiAmmount )
            
client_print0print_chat"ADMIN %s: set %s's frags to %d"g_szAdminNameg_szTargetNameiAmmount )
        }
            
        else if ( 
equal szType"deaths" ) || str_to_numszType ) == )
        {
            
cs_set_user_deaths iTargetiAmmount )
            
client_print0print_chat"ADMIN %s: set %s's deaths to %d"g_szAdminNameg_szTargetNameiAmmount )
        }
            
        else
        {
            
console_printiPlayer"[NaBlu$-GamING]: amx_score <player's name or #userid> < 1 | 2 or frags | deaths> <ammount> - Set frags/deaths to a player")
            return 
PLUGIN_HANDLED
        
}
        return 
PLUGIN_CONTINUE
    

__________________

Last edited by Ayman Khaled; 08-29-2017 at 09:31.
Ayman Khaled is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2017 , 09:06   Re: set_user_frags ..
Reply With Quote #2

Send a ScoreInfo message after set_user_frags.
__________________
HamletEagle is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-29-2017 , 09:30   Re: set_user_frags ..
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
Send a ScoreInfo message after set_user_frags.
Thanks, works well
__________________
Ayman Khaled is offline
Reply



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 09:57.


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