Raised This Month: $ Target: $400
 0% 

Not Running


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 09-23-2007 , 17:36   Not Running
Reply With Quote #1

I just made a plugin for TFC I was going to release untill I tested it and it didn't work worth shit. It compiles fine, only with 4 errors that only regard the CVAR's [Don't mind them, there not the problem].

I was wondering if somebody could help and get it working, it just doesn't work at all. No errors, nothing.

Don't ignore this thread, take the time and help me.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <tfcx>
#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(id)
{
    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(id)
{
    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
}

public 
tfc_kill_notice(id)
{
    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