AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   glow mod (https://forums.alliedmods.net/showthread.php?t=230295)

ezio_auditore 11-23-2013 03:43

glow mod
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
new g_Version[] = "1.0";
new 
g_Lead_CT = -1
new g_Lead_T  = -1
GlowLeaders
() {
    if (
i_numplayers 2) return
    
i_numplayers get_playersnum(1);
    new 
i_Lead_CT_frags  = -100
    
new i_Lead_T_frags   = -100
    
new i_Lead_CT_deaths = -100
    
new i_Lead_T_deaths  = -100
    
new s_team[3]
    new 
i_frags
    
new i_deaths
    g_Lead_CT 
= -1
    g_Lead_T  
= -1
    
for (new i_player 0i_player i_numplayersi_player++) {
        
i_frags  get_user_frags(i_player)
        
i_deaths get_user_deaths(i_player)
        
get_user_team(i_players_team3)
        if (
equali(s_team,"CT",2))
            if ((
i_frags i_Lead_CT_frags) ||
                ((
i_frags == i_Lead_CT_frags) && (i_deaths i_Lead_CT_deaths))) {
                
i_Lead_CT_frags  i_frags
                i_Lead_CT_deaths 
i_deaths
                g_Lead_CT        
i_player
  client_print
(id,print_chat,"[GLOW]CT : %s is selected",i_name)
            }
        if (
equali(s_team,"TE",2))
            if ((
i_frags i_Lead_T_frags) ||
                ((
i_frags == i_Lead_T_frags) && (i_deaths i_Lead_T_deaths))) {
                
i_Lead_T_frags  i_frags
                i_Lead_T_deaths 
i_deaths
                g_Lead_T        
i_player
  client_print
(id,print_chat,"[GLOW]T : %s is selected",i_name)
            }
    }
    if (
g_Lead_CT != -1set_user_rendering(g_Lead_CTkRenderFxGlowShell00255kRenderNormal15)
    if (
g_Lead_T  != -1set_user_rendering(g_Lead_T,  kRenderFxGlowShell25500kRenderNormal15)
    
client_print(id,print_chat,"[GLOW]KILL THEM")
}
public 
roundStart(id)
{
    
GlowLeaders()
   }
public 
reportGlow(id)
{
    new 
s_message[] = "Lead Players Glow at and the killer of lead player gets their glow"
    
set_hudmessage(0,255,00.050.5020.13.00.020.0210)
    
show_hudmessage(ids_message)
    
client_print(idprint_chats_message)
    return 
PLUGIN_HANDLED
}
public 
plugin_init()
{
    
register_plugin("Transfer The Glow""1.00""ezio_auditore");
    
register_clcmd("say /glow""reportGlow")
    
register_clcmd("say_team /glow""reportGlow")
    return 
PLUGIN_CONTINUE;


This code prints like this :-
CT : CT is selected
T : CT is selected

and disconnects after a round
what is my error...
can anyone transfer the glow to g_Lead_CT to KillerOfg_Lead_CT and same for T
pls pls pls pls help
<I'LL GIVE CREDIT IN MY NEXT PLUGIN>


All times are GMT -4. The time now is 23:13.

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