Raised This Month: $ Target: $400
 0% 

Play longer on the server = more status (Glow rank)


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-15-2008 , 10:13   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #11

It can not work, id can not be passed like that. You have to loop through all players.
__________________
Arkshine is offline
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 11-15-2008 , 11:29   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #12

Quote:
Originally Posted by arkshine View Post
It can not work, id can not be passed like that. You have to loop through all players.
Thats what i thought, but didnt know how to do it. so ya. haha. i tried.
__________________
[B]
{PHILMAGROIN} is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-15-2008 , 12:09   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #13

try this

PHP Code:
#include <amxmodx>
#include <fun>
#include <time>

new gEnabled;
new 
gMaxplayers;

public 
plugin_init() {
    
register_plugin("Glow Rank""1.0""xPaw / PHILMAGROIN");
    
gEnabled register_cvar("amx_glowrank""1");
    
gMaxplayers get_maxplayers();
    
    
register_logevent("glowrank",2,"0=World triggered","1=Round_Start");
    
register_dictionary("time.txt");
}

public 
glowrank() {
    if( 
get_pcvar_num(gEnabled) ) {
        for(new 
id=1id<=gMaxplayersid++) {
            new 
timeLength[128], s_timeUnits[32], s_unitType[4];
            
            
read_argv(1s_timeUnits31);
            new 
timeUnits str_to_num(s_timeUnits);
            
read_argv(2s_unitType3);

            if (
equali(s_unitType"MIN"))
                
get_time_length(idtimeUnitstimeunit_minutestimeLength127);
            
            
            if( 
timeUnits 10 ) {
                
set_user_rendering(id,kRenderFxGlowShell,0,255,0,kRenderNormal,20);
                
client_print(idprint_chat"You are glowing!");
            }
            
            if( 
timeUnits 20 ) {
                
set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,20);
                
client_print(idprint_chat"You are glowing2!");
            }
            
            if( 
timeUnits 40 ) {
                
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,20);
                
client_print(idprint_chat"You are glowing!3");
            }
            
            if( 
timeUnits 80 ) {
                
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,100);
                
client_print(idprint_chat"You are glowing4!");
            }
        }
            
    }
    return 
PLUGIN_HANDLED;

__________________
xPaw is offline
koss_4life
BANNED
Join Date: Jun 2008
Location: Heaven
Old 11-15-2008 , 13:37   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #14

Quote:
Originally Posted by xPaw View Post
try this

PHP Code:
    register_dictionary("time.txt"); 
Do you need this file: time.txt or its ok without it? Im gonna try this now, thanks mates! Will come back with edit how it worked!
koss_4life is offline
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 11-15-2008 , 18:26   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #15

Quote:
Originally Posted by koss_4life View Post
Do you need this file: time.txt or its ok without it? Im gonna try this now, thanks mates! Will come back with edit how it worked!
yes you need it.
__________________
[B]
{PHILMAGROIN} is offline
koss_4life
BANNED
Join Date: Jun 2008
Location: Heaven
Old 11-16-2008 , 16:53   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #16

Does this work for anyone?

Cause I could not make it work for my server

Maybe cause I use the "semi-clip plugin" too? Here is the no-block plugin I use in my server

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>

#define PLUGIN "Semiclip"
#define VERSION "1.31"
#define AUTHOR "skyjur"

new bool:plrSolid[33]
new 
bool:plrRestore[33]

new 
maxplayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink"preThink")
    
register_forward(FM_PlayerPostThink"postThink")
    
    
register_forward(FM_AddToFullPack"addToFullPack"1)
    
    
maxplayers get_maxplayers()
}

public 
addToFullPack(eseenthosthostflagsplayerpSet)
{
    if(
player)
    {
        if(
plrSolid[host] && plrSolid[ent])
        {
            
set_es(esES_SolidSOLID_NOT)
            
set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmt85)
        }
    }
}

FirstThink()
{
    for(new 
1<= maxplayersi++)
    {
        if(!
is_user_alive(i) || cs_get_user_team(i) != CS_TEAM_CT)
        {
            
plrSolid[i] = false
            
continue
        }
        
        
plrSolid[i] = pev(ipev_solid) == SOLID_SLIDEBOX true false
    
}
}

public 
preThink(id)
{
    static 
iLastThink
    
    
if(LastThink id)
    {
        
FirstThink()
    }
    
LastThink id

    
    
if(!plrSolid[id]) return
    
    for(
1<= maxplayersi++)
    {
        if(!
plrSolid[i] || id == i) continue
        
        
set_pev(ipev_solidSOLID_NOT)
        
plrRestore[i] = true
    
}
}

public 
postThink(id)
{
    static 
i
    
    
for(1<= maxplayersi++)
    {
        if(
plrRestore[i])
        {
            
set_pev(ipev_solidSOLID_SLIDEBOX)
            
plrRestore[i] = false
        
}
    }

Or do you need the register_dictionary("time.txt"-file to make it work?

Last edited by koss_4life; 11-16-2008 at 17:13.
koss_4life is offline
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 11-17-2008 , 00:18   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #17

yes you need the register_dictionary("time.txt") but it does not work. i tried it.
__________________
[B]
{PHILMAGROIN} is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-17-2008 , 11:04   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #18

It's from semiclip plugin. As you can see there is ES_Render... and the rendering is reseted. You must disable that plugin or use only one.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-17-2008 , 12:30   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #19

he can remove this string i think
PHP Code:
            set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmt85
__________________
xPaw is offline
koss_4life
BANNED
Join Date: Jun 2008
Location: Heaven
Old 11-17-2008 , 14:01   Re: Play longer on the server = more status (Glow rank)
Reply With Quote #20

Quote:
Originally Posted by xPaw View Post
he can remove this string i think
PHP Code:
            set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmt85
I will try that way! Thanks! And what abut that .txt file? Can you please upload it?
koss_4life is offline
Reply



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 05:53.


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