Raised This Month: $ Target: $400
 0% 

Explain a part of "Knife Kill Bonus" plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 02-28-2015 , 04:09   Explain a part of "Knife Kill Bonus" plugin
Reply With Quote #1

Hello,
Someone please explain me this part :
Code:
public onDeathMsgEvent()
{
    new id = read_data(1)
    
    new szWeapon[32]
    read_data(4, szWeapon, charsmax(szWeapon))
    
    if(equal(szWeapon, "knife") && is_user_alive(id))
    {
        new szName[32], szName2[32]
        get_user_name(id, szName, charsmax(szName))
        get_user_name(read_data(2), szName2, charsmax(szName2))
        
        set_hudmessage(255, 0, 0, 0.02, 0.2, 1, 0.1, 6.0, 0.1, 0.1, -1)
        ShowSyncHudMsg(0, g_iSync, "Player %s knifed %s and got 3frags+15HP+Speed", szName, szName2)
        
        client_cmd(id, "mp3 play %s", g_szSound)
        
        set_user_health(id, get_user_health( id ) + 15 )
        
        g_bHasSpeed[id] = true
        remove_task(id + TASK_ID)
        set_task(10.0, "taskRemoveSpeed", id + TASK_ID)
        set_user_maxspeed(id, FAST_SPEED)
        set_user_frags( id, get_user_frags( id ) + 3 )
    }
}
Thank You for your valuable time.
VarmaRitik is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-28-2015 , 04:34   Re: Explain a part of "Knife Kill Bonus" plugin
Reply With Quote #2

You need to make some effort to learn some stuff on your own. Nobody is going to explain that whole function for you. You can learn each of the small pieces on your own and come to a conclusion about what the function does.
__________________

Last edited by fysiks; 02-28-2015 at 04:36.
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-28-2015 , 07:24   Re: Explain a part of "Knife Kill Bonus" plugin
Reply With Quote #3

One topic is enough. https://forums.alliedmods.net/showth...00#post2267700
__________________

Last edited by HamletEagle; 02-28-2015 at 07:24.
HamletEagle 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 01:49.


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