Raised This Month: $ Target: $400
 0% 

Spectator List


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 01-14-2012 , 18:29   Spectator List
#1

Estoy rehaciendo mi KZMod y bueno quise agregarle un speclist, los 2 que están en Alliedmods son Feos y viejos.

Entonces hice uno, está un poco más limpio.

PHP Code:
#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN "Spectator List"
#define VERSION "1.0"
#define AUTHOR "GlaDiuS"
 
new g_HudSync
 
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
 
    
g_HudSync CreateHudSyncObj()
}
 
public 
client_putinserver(id)
{
    if(
is_user_connected(id))
    {
        
set_task(0.1"ShowSpecs_Task"id__"b")
    }
}
 
public 
ShowSpecs_Task(id)
{
    if(!
is_user_connected(id))
    {
        return 
PLUGIN_HANDLED
    
}
 
    if(
pev(idpev_iuser1) == || pev(idpev_iuser1) == 3)
    {
        return 
PLUGIN_HANDLED
    
}
 
    static 
Player;
    
Player is_user_alive(id) ? id pev(idpev_iuser2)
 
    new 
CountSpecSpecMsg[256], SpecName[32]
    new 
Players[32], Numid2
 
    get_players
(PlayersNum"bch")
    for(new 
iNumi++)
    {
        
id2 Players[i]
 
        if(
pev(id2pev_iuser1) == || pev(id2pev_iuser1) == 2)
        {
            
get_user_name(id2SpecNamesizeof SpecName 1)
            if(
CountSpec)
            { 
                
add(SpecMsgsizeof SpecMsg 1"^n^t^t^t")
            }
 
            
format(SpecMsgsizeof SpecMsg 1"%s%s (%s View)"strlen(SpecMsg) > SpecMsg ""SpecNamepev(id2pev_iuser1) == "3rd" "First")
            
CountSpec++
        }
    }
 
    if(
CountSpec && is_user_alive(Player))
    {
        new 
PlayerName[32]
        
get_user_name(PlayerPlayerNamesizeof PlayerName 1)
        
format(SpecMsgsizeof SpecMsg 1"SPECTATING %s (%d): %s"PlayerNameCountSpecSpecMsg)
 
        
set_hudmessage(02202550.60.1400.00.20.00.02)
        
ShowSyncHudMsg(idg_HudSyncSpecMsg)
    }
    return 
PLUGIN_HANDLED


Cualquier cosa me dicen. Saludos
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 01-14-2012 at 20:54.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
 



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 06:57.


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