This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Top players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 01-19-2012 , 06:16   Top players
Reply With Quote #1

PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <hamsandwich> 
#include <csstats>

#define PLUGIN "TOPPlayer"
#define VERSION "1.0"
#define AUTHOR "digkill"

new g_topEnt[33]
new 
MODEL_1[] = "models/player/top1/top1.mdl"
new MODEL_2[] = "models/player/top1/top1.mdl"
new MODEL_3[] = "models/player/top2/top2.mdl"
new MODEL_4[] = "models/player/top2/top2.mdl"
new MODEL_5[] = "models/player/top3/top3.mdl"
new MODEL_6[] = "models/player/top3/top3.mdl"
new g_CachedStringInfoTarget

public plugin_init()
{
   
register_plugin(PLUGINVERSIONAUTHOR)
   
register_cvar("mestop""Serverin top15 zirvesinden %name% oyuna girdi!"
   
register_cvar("amxflag","1")
   
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
   
g_CachedStringInfoTarget engfuncEngFunc_AllocString"info_target" );
}
public 
topjoin(user[]) 
{
    if (
get_cvar_num("amxflag")==0){
    return 
PLUGIN_HANDLED
    
}
   if (
get_cvar_num("amxflag")==1){
   new 
message[192]
   
get_cvar_string("mestop"message191)
   
replace(message191"%name%"user[1])
   
set_hudmessage(255000.400.4506.06.00.50.154)
   
show_hudmessage(0message)
   
   return 
PLUGIN_CONTINUE
   
}
   return 
PLUGIN_CONTINUE
}
public 
plugin_precache()
{
    
precache_model(MODEL_1)
    
precache_model("models/player/top1/top1T.mdl")
    
precache_model(MODEL_2)
    
precache_model(MODEL_3)
    
precache_model(MODEL_4)
    
precache_model(MODEL_5)
    
precache_model(MODEL_6)

}
public 
fwHamPlayerSpawnPost(id
{
   new 
stats[8], bodyhits[8]
   new 
iRank
   
new user[32], len
   iRank 
get_user_stats(idstatsbodyhits)
   
user[0] = id
   len 
get_user_name(id,user[1],31)
   
if(
<= iRank <= )
   {

      if(
is_user_alive(id))
      {
         new 
iEnt g_topEnt[id]
         new 
iEnt2 g_topEnt[id]
         if( !
pev_valid(iEnt))
         {
            
set_task(2.0"topjoin"0user,len 2)
              
client_print(idprint_chat"Hosgeldiniz, Top15te 1. siradasiniz!")
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEntpev_aimentid)
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEnt2pev_aimentid)
            
engfunc(EngFunc_SetModeliEntMODEL_1)
            
engfunc(EngFunc_SetModeliEnt2MODEL_2)
         }
      }
   }
   if(
<= iRank <= 2)
   {
      if(
is_user_alive(id))
      {
         new 
iEnt g_topEnt[id]
         new 
iEnt2 g_topEnt[id]
         if( !
pev_valid(iEnt))
         {
            
set_task(2.0"topjoin"0user,len 2)
              
client_print(idprint_chat"Hosgeldiniz, Top15te 2. siradasiniz!")
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEntpev_aimentid)
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEnt2pev_aimentid)
            
engfunc(EngFunc_SetModeliEntMODEL_3)
            
engfunc(EngFunc_SetModeliEnt2MODEL_4)
         }
      }
   }
   if(
<= iRank <= 3)
   {
      if(
is_user_alive(id))
      {
         new 
iEnt g_topEnt[id]
         new 
iEnt2 g_topEnt[id]
         if( !
pev_valid(iEnt))
         {
            
set_task(2.0"topjoin"0user,len 2)
              
client_print(idprint_chat"Hosgeldiniz, Top15te 3. siradasiniz!")
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget)
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEntpev_aimentid)
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW)
            
set_pev(iEnt2pev_aimentid)
            
engfunc(EngFunc_SetModeliEntMODEL_5)
            
engfunc(EngFunc_SetModeliEnt2MODEL_6)
         }
      }
   }
   else
   {
      return 
PLUGIN_HANDLED
   
}
   return 
PLUGIN_CONTINUE


/tmp/text8yClSA.sma(32) : warning 217: loose indentation
/tmp/text8yClSA.sma(63) : warning 217: loose indentation
/tmp/text8yClSA.sma(73) : warning 217: loose indentation
/tmp/text8yClSA.sma(74) : warning 217: loose indentation
/tmp/text8yClSA.sma(85) : warning 217: loose indentation
/tmp/text8yClSA.sma(94) : warning 217: loose indentation
/tmp/text8yClSA.sma(95) : warning 217: loose indentation
/tmp/text8yClSA.sma(115) : warning 217: loose indentation
/tmp/text8yClSA.sma(116) : warning 217: loose indentation


Can someone help me to fix these warnings?
aaa131 is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 01-19-2012 , 08:21   Re: Top players
Reply With Quote #2

PHP Code:
#include <amxmodx>  
#include <fakemeta>  
#include <hamsandwich>  
#include <csstats> 

#define PLUGIN "TOPPlayer" 
#define VERSION "1.0" 
#define AUTHOR "digkill" 

new g_topEnt[33
new 
MODEL_1[] = "models/player/top1/top1.mdl" 
new MODEL_2[] = "models/player/top1/top1.mdl" 
new MODEL_3[] = "models/player/top2/top2.mdl" 
new MODEL_4[] = "models/player/top2/top2.mdl" 
new MODEL_5[] = "models/player/top3/top3.mdl" 
new MODEL_6[] = "models/player/top3/top3.mdl" 
new g_CachedStringInfoTarget 

public plugin_init() 

   
register_plugin(PLUGINVERSIONAUTHOR
   
register_cvar("mestop""Serverin top15 zirvesinden %name% oyuna girdi!")  
   
register_cvar("amxflag","1"
   
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
   
g_CachedStringInfoTarget engfuncEngFunc_AllocString"info_target" ); 

public 
topjoin(user[])  

        if (
get_cvar_num("amxflag")==0)
        { 
            return 
PLUGIN_HANDLED 
        

        
        if (
get_cvar_num("amxflag")==1)
        { 
        new 
message[192
        
get_cvar_string("mestop"message191
        
replace(message191"%name%"user[1]) 
        
set_hudmessage(255000.400.4506.06.00.50.154
        
show_hudmessage(0message
        
        return 
PLUGIN_CONTINUE 
        

        
        return 
PLUGIN_CONTINUE 

public 
plugin_precache() 

    
precache_model(MODEL_1
    
precache_model("models/player/top1/top1T.mdl"
    
precache_model(MODEL_2
    
precache_model(MODEL_3
    
precache_model(MODEL_4
    
precache_model(MODEL_5
    
precache_model(MODEL_6


public 
fwHamPlayerSpawnPost(id)  

   new 
stats[8], bodyhits[8
   new 
iRank 
   
new user[32], len 
   iRank 
get_user_stats(idstatsbodyhits
   
user[0] = id 
   len 
get_user_name(id,user[1],31
    
   if(
<= iRank <= 
   { 

      if(
is_user_alive(id)) 
      { 
         new 
iEnt g_topEnt[id
         new 
iEnt2 g_topEnt[id
         if( !
pev_valid(iEnt)) 
         { 
            
set_task(2.0"topjoin"0user,len 2
            
client_print(idprint_chat"Hosgeldiniz, Top15te 1. siradasiniz!"
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEntpev_aimentid
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEnt2pev_aimentid
            
engfunc(EngFunc_SetModeliEntMODEL_1
            
engfunc(EngFunc_SetModeliEnt2MODEL_2
         } 
      } 
   } 
   if(
<= iRank <= 2
   { 
      if(
is_user_alive(id)) 
      { 
         new 
iEnt g_topEnt[id
         new 
iEnt2 g_topEnt[id
         if( !
pev_valid(iEnt)) 
         { 
            
set_task(2.0"topjoin"0user,len 2
            
client_print(idprint_chat"Hosgeldiniz, Top15te 2. siradasiniz!"
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEntpev_aimentid
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEnt2pev_aimentid
            
engfunc(EngFunc_SetModeliEntMODEL_3
            
engfunc(EngFunc_SetModeliEnt2MODEL_4
         } 
      } 
   } 
   if(
<= iRank <= 3
   { 
      if(
is_user_alive(id)) 
      { 
         new 
iEnt g_topEnt[id
         new 
iEnt2 g_topEnt[id
         if( !
pev_valid(iEnt)) 
         { 
            
set_task(2.0"topjoin"0user,len 2
            
client_print(idprint_chat"Hosgeldiniz, Top15te 3. siradasiniz!"
            
g_topEnt[id] = iEnt engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
g_topEnt[id] = iEnt2 engfunc(EngFunc_CreateNamedEntityg_CachedStringInfoTarget
            
set_pev(iEntpev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEntpev_aimentid
            
set_pev(iEnt2pev_movetypeMOVETYPE_FOLLOW
            
set_pev(iEnt2pev_aimentid
            
engfunc(EngFunc_SetModeliEntMODEL_5
            
engfunc(EngFunc_SetModeliEnt2MODEL_6
         } 
      } 
   } 
   else 
   { 
      return 
PLUGIN_HANDLED 
   

   return 
PLUGIN_CONTINUE 


__________________
kiki33hun is offline
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 01-19-2012 , 08:51   Re: Top players
Reply With Quote #3

Thank you!
aaa131 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 20:58.


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