Raised This Month: $ Target: $400
 0% 

Many erroes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-11-2014 , 08:53   Many erroes
Reply With Quote #1

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

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

#define PLUGIN "knifeitup"
#define VERSION "1.0"
#define AUTHOR "AUTohr"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("knifeitup_hp""25")
    
register_cvar("knifeitup_adminhp""100")
    
register_cvar("knifeitup_frags""5")
    
register_event("DeathMsg""Event_DeathMsg_knife""a")
}


new 
knifesounds[5][] =
{
    
"sound/knifesound/knife1",
    
"sound/knifesound/knife2",
    
"sound/knifesound/knife3",
    
"sound/knifesound/knife4",
    
"sound/knifesound/knife5"
}

public 
Event_DeathMsg_knife(id)
    
    
    new 
Killer read_data(1)
    new 
Victim read_data(2)
    
    if ((
Killer == Victim) || (get_user_team(Victim) == get_user_team(Killer)))
    return 
PLUGIN_CONTINUE
    
    
new CheckWeapon[6];
    
read_data(4CheckWeapon5);
    
    if (
equal(CheckWeapon"knife"))
    {
        new 
php get_cvar_num("knifeitup_hp")
        new 
ahp get_cvar_num("knifeitup_adminhp")
        new 
frags get_cvar_num("knifeitup_frags")
        

        if(
get_user_flags(id) & ADMIN_KICK
        {
            
cs_set_user_hp(Killerclamp(cs_get_user_hp(Killer) + ahp0100))
            
client_print(0print_chat"%s Got %s Frags %s hp For Knifing Admin %s"KillerfragsahpVictim)
            
cs_set_user_frags(killerclamp(cs_get_user_frags(Killer) + frags05))
            
client_cmd(0"spk %s"knifesounds)
        }
        
        else if
        {
        
cs_set_user_frags(killerclamp(cs_get_user_frags(Killer) + frags05))
        
cs_set_user_hp(Killerclamp(cs_get_user_hp(Killer) + php0100))
        
client_print(0print_chat"%s Got %s Frags %s hp For Knifing %s"KillerfragsphpVictim)
        
client_cmd(0"spk %s"knifesounds)
                     }
    }
    
    return 
PLUGIN_HANDLED
    
    
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang16393{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
knifeitup.sma(33) : error 003: declaration of a local variable must appear in a compound block
knifeitup.sma(36) : error 010: invalid function or declaration
knifeitup.sma(37) : error 010: invalid function or declaration
knifeitup.sma(40) : error 021: symbol already defined: "read_data"
knifeitup.sma(42) : error 010: invalid function or declaration
knifeitup.sma(49) : error 010: invalid function or declaration
knifeitup.sma(51) : error 010: invalid function or declaration
knifeitup.sma(53) : error 010: invalid function or declaration
knifeitup.sma(57) : error 010: invalid function or declaration
knifeitup.sma(59) : error 021: symbol already defined: "cs_set_user_frags"
knifeitup.sma(59) : error 010: invalid function or declaration
knifeitup.sma(60) : error 021: symbol already defined: "cs_set_user_hp"
knifeitup.sma(60) : error 010: invalid function or declaration
knifeitup.sma(66) : error 010: invalid function or declaration
knifeitup.sma(72) : warning 203: symbol is never used: "CheckWeapon"
knifeitup.sma(72) : warning 203: symbol is never used: "Victim"
knifeitup.sma(72) : warning 203: symbol is never used: "cs_set_user_frags"
knifeitup.sma(72) : warning 203: symbol is never used: "cs_set_user_hp"
knifeitup.sma(72) : warning 203: symbol is never used: "knifesounds"
14 Errors. Could not locate output file knifeitup.amx (compile failed).


I wanted to make a plugin that give frags + hp when knife a player and if knifed admin the frags must be different and when knifed each time a sound must be played and frags hp adminhp all in cvars but getting this errors Please help me in fixing this

Last edited by tousif; 12-11-2014 at 08:57.
tousif 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 15:22.


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