Raised This Month: $ Target: $400
 0% 

Not Running


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 09-23-2007 , 19:29   Re: Not Running
Reply With Quote #7

Woops, i forgot to delete them.

But still not working, it compiles fine (Only with 4 errors because I didn't add those CVAR's yet) but anyway, it doesn't work at all.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <tfcx>
#include <engine>
#include <fun>

#define PLUGIN "TFC Events"
#define VERSION "1.0"
#define AUTHOR "X-Script"

new tfc_rewards
new tfc_hp_gain
new tfc_ap_gain 
new tfc_hp_limit
new tfc_ap_limit


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("tfc_red_capture"3"2=Red Capture Point")
    
register_logevent("tfc_blue_capture"3"2=Blue Capture Point")
    
    
register_event("DeathMsg""tfc_kill_notice""be")
    
    
tfc_rewards register_cvar("amx_awards""1")
    
tfc_hp_gain register_cvar("amx_gainhp""10")
    
tfc_ap_gain register_cvar("amx_gainap""20")
    
tfc_hp_limit register_cvar("amx_hplimit""100")
    
tfc_ap_limit register_cvar("amx_aplimit""100")
}

public 
plugin_precache()
{
    
precache_sound("fvox/hev_logon.wav")
    
precache_sound("items/itembk2.wav")
    
precache_sound("items/damage2.wav")
}


public 
client_putinserver(id)
{
    if ( 
get_pcvar_num(tfc_rewards) == )
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
name[32]
    
get_user_name(idname31)
    
    
client_print(idprint_chat"Hello %s Welcome To The Server!",name)
    return 
PLUGIN_HANDLED
}

public 
tfc_red_capture()
{
    new 
id get_loguser_index()
    
    if ( 
get_pcvar_num(tfc_rewards) == )
    {
        return 
PLUGIN_HANDLED
    
}
    
    if (!
is_user_connected(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
name[32
    
    new 
healthlimit get_cvar_num("amx_hplimit")
    new 
armorlimit get_cvar_num("amx_aplimit")
    new 
healthadd get_cvar_num("amx_gainhp")
    new 
armoradd get_cvar_num("amx_gainap")
    new 
health get_user_health(id)
    new 
armor get_user_armor(id)
    
    
get_user_name(idname31)
    
    
set_hudmessage(11200, -1.00.3006.06.00.50.151)
    
show_hudmessage(0"[TFC-GODS] %s has captured the RED FLAG",name)
    
client_cmd(id"spk items/itembk2.wav")
    
    
client_print(idprint_chat"[TFC-GODS] RED FLAG CAPTURED -- REWARDS: +Health, +Armor")
    
    if (
health healthadd)
    {
        
set_user_health(idhealthlimit healthadd)
        
client_cmd(id,"spk fvox/hev_logon.wav")
    }
    
    if (
health healthlimit)
    {
        
set_user_health(idhealthlimit)
    }
    
    if (
armor armorlimit)
    {
        
set_user_armor(idarmorlimit armoradd)
    }
    
    if (
armor armorlimit)
    {
        
set_user_armor(idarmorlimit)
    }
    return 
PLUGIN_HANDLED
}

public 
tfc_blue_capture()
{
    new 
id get_loguser_index()
    
    if ( 
get_pcvar_num(tfc_rewards) == )
    {
        return 
PLUGIN_HANDLED
    
}
    
    if (!
is_user_connected(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
name1[32
    
    new 
healthadd1 get_cvar_num("amx_hpgain")
    new 
armoradd1 get_cvar_num("amx_apgain")
    new 
healthlimit1 get_cvar_num("amx_hplimit")
    new 
armorlimit1 get_cvar_num("amx_aplimit")
    new 
health1 get_user_health(id)
    new 
armor1 get_user_armor(id)
    
    
get_user_name(idname131)
    
    
set_hudmessage(20011, -1.00.3006.06.00.50.151)
    
show_hudmessage(0"[TFC-GODS] %s has captured the BLUE FLAG",name1)
    
client_cmd(id"spk items/itembk2.wav")
    
    
client_print(idprint_chat"[TFC-GODS] BLUE FLAG CAPTURED -- REWARDS: +Health, +Armor")
    
    if (
health1 healthlimit1)
    {
        
set_user_health(idhealth1 healthadd1)
        
client_cmd(id,"spk fvox/hev_logon.wav")
    }
    
    if (
health1 healthlimit1)
    {
        
set_user_health(idhealthlimit1)
    }
    
    if (
armor1 armorlimit1)
    {
        
set_user_armor(idarmor1 armoradd1)
    }
    
    if (
armor1 armorlimit1)
    {
        
set_user_armor(idarmoradd1)
    }
    return 
PLUGIN_HANDLED
}

stock get_loguser_index() 
{
    new 
loguser[80], name[32]
    
read_logargv(0loguser79)
    
parse_loguser(logusername31)
    
    return 
get_user_index(name)
}
    

public 
tfc_kill_notice()
{
    new 
id get_loguser_index()
    
    if ( 
get_pcvar_num(tfc_rewards) == )
    {
        return 
PLUGIN_HANDLED
    
}
    
    if (!
is_user_connected(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
killer read_data(1)
    
    
set_hudmessage(405060, -1.00.3016.06.00.50.151)
    
show_hudmessage(killer"[TFC-GODS] You have killed an enemy!")
    
client_cmd(id"spk items/damage2.wav")
    return 
PLUGIN_HANDLED

X-Script 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 16:03.


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