Raised This Month: $ Target: $400
 0% 

Knife Reward


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Big Joe
Junior Member
Join Date: Sep 2009
Old 12-02-2010 , 13:44   Knife Reward
Reply With Quote #1

Hi there! I wanted to make a plugin, that will count 3 knife kills per round and give a player a reward.
PHP Code:
#include <amxmodx>
 
new knife[32] = {0,...}
public 
plugin_init() {
 
register_plugin("Knife Reward","1.0","Big Joe")
 
register_event("RoundTime""eventStartRound""bc")
}
public 
client_death(killerwpnindex)
{
 if (
wpnindex == CSW_KNIFE)
               {
         new 
killer_name[32]
 
  
get_user_name(killerkiller_name31)
                
knife[killer] ++
        }
 
 if (
knife[killer] == 3
        {
  
server_cmd("molotov_give %s"killer)
        }
}
public 
client_putinserver(id) {
 
knife[id] = 0;
 
 return 
PLUGIN_CONTINUE
}
public 
eventStartRound (id) {
 
knife[id] = 0;
 
 return 
PLUGIN_CONTINUE

The code compiles, but doesn't work, though the molotov plugin is ON. Help, plz!
Big Joe is offline
 


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 11:23.


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