Raised This Month: $ Target: $400
 0% 

Slaughter Reward


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 08-06-2009 , 06:10   Slaughter Reward
Reply With Quote #1

Why don't give reward?????

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Slaughter Reward"
#define VERSION "1.0"
#define AUTHOR "BOYSplayCS"

#define Killed ADMIN_LEVEL_H

new Reward


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg""Event_Death""a""1 > 0")
    
    
Reward register_cvar("amx_kill_reward""300")
}

public 
Event_Death()
{
    new 
Killer read_data(1)
    new 
Victim read_data(2)

    if((
Killer == Victim) || !(get_user_flags(Victim) & Killed) || (get_user_team(Victim) == get_user_team(Killer)))
        return 
PLUGIN_CONTINUE

    
new CheckWeapon[6];
    
read_data(4CheckWeapon5);

    if(
equal(CheckWeapon"knife"))
    {
        new 
KillReward get_pcvar_num(Reward)

        
cs_set_user_money(Killerclamp(cs_get_user_money(Killer) + KillReward016000))
        
client_print(Killerprint_chat"[AMXX] You have slaughtered an player! You have been awarded an extra %s dollars!"KillReward)
    }
    return 
PLUGIN_HANDLED


Last edited by Debesėlis; 08-06-2009 at 08:05.
Debesėlis is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 08-06-2009 , 07:30   Re: Slaughter Reward
Reply With Quote #2

Anybody?
Debesėlis is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-06-2009 , 08:09   Re: Slaughter Reward
Reply With Quote #3

I see nothing wrong. You are in scripting section, so don't ask without even trying to search yourself. Try to debug with some client_print() and you will find fastly. Plus don't bump before 15 days, it's in the rules..
__________________
Arkshine is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 08-06-2009 , 08:27   Re: Slaughter Reward
Reply With Quote #4

Nothing wrong... When kill the player (ADMIN_LEVEL_H) nothing happens... No money no message on the chat...
Debesėlis is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-06-2009 , 09:37   Re: Slaughter Reward
Reply With Quote #5

"1 > 0" -> "1>0"
__________________
Arkshine is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 08-06-2009 , 10:44   Re: Slaughter Reward
Reply With Quote #6

It works! Thanks!

Last edited by Debesėlis; 08-06-2009 at 10:48.
Debesėlis 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 18:17.


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