Raised This Month: $ Target: $400
 0% 

Grenade Bonus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 05-07-2010 , 23:50   Grenade Bonus
Reply With Quote #1

I tried to write a plugin, that gives 1 grenade to a player that makes a frag with a grenade.

Here is the code

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Grenade Bonus"
#define VERSION "1.0"
#define AUTHOR "OptimuS"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("DeathMsg""playerDeath""a""1>0")
}

public 
playerDeath()
{
    new 
killer read_data(1)
    new 
victim read_data(2)
    new 
weapon[8]
    
read_data(4weapon7)
 
    if (
killer != victim && equal(weapon"grenade"))
    {
        new 
clipammo
        
new const uid get_user_index(killer)
        
get_user_ammo(uidCSW_HEGRENADEclipammo)
        if(
ammo == 0)
        {
            
give_item(uid"weapon_hegrenade")
        }
    }

        

And this is the error log from the compiler

Code:
//// groptimus.sma
// D:\groptimus.sma(26) : error 035: argument type mismatch (argume
nt 1)
Line 26 is

new const uid = get_user_index(killer);

Any help would be appreciated, thank you.
DjOptimuS is offline
 



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 03:45.


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