Raised This Month: $51 Target: $400
 12% 

[Ayuda] SpecList


  
 
 
Thread Tools Display Modes
Author Message
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 12-02-2012 , 14:57   [Ayuda] SpecList
#1

Holas, estoy haciendo un speclist(que te aparezca en un hudd quien te spectea) y necesitaba saber como sacar quien spectea a quien :S

Muchias Grachias
Anti is offline
Send a message via Skype™ to Anti
el999gonzalo
BANNED
Join Date: Aug 2012
Old 12-02-2012 , 15:02   Re: [Ayuda] SpecList
#2

hay un plugin que hace eso y ya esta hecho , hechale una miradita a ver si te ayuda

http://forums.alliedmods.net/showthread.php?p=408500
el999gonzalo is offline
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 12-02-2012 , 17:09   Re: [Ayuda] SpecList
#3

si, lo habia visto y me dio ideas para ir haciendolo pero me quede en como saber quien spectea a quien,
aca subo lo poco que hice, si ven algo mal avisen.
ya se que aparece aunque no lo spectee nadie y tiene bugs o cosas sin ver(por ejemplo que todos los specs saldrian en una linea sola), pero no voy a ver eso hasta haber terminado lo de los specs bien.
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN    "SpecList"
#define AUTHOR    "Anti"
#define VERSION    "1.0"

new gFps[33];
new 
gMaxPlayers;
new 
specOn 1
new 
muertos[33];
new 
vivos[33];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /speclist""cmdSpecList");
    
    
register_forwardFM_CmdStart"FM_CmdStart_Pre");    
    
    
set_task(1.0"check_list",_,_,_,"b");
    
    
gMaxPlayers get_maxplayers()
}

public 
FM_CmdStart_Pre(idiHandle )
{
    
gFps[id] = floatround1000.0 / ( get_uciHandleUC_Msec ) ) );
}

public 
cmdSpecList(id)
{
    if(
specOn == 1) {
        
specOn 0
        client_print
(idprint_chat"Desactivastes el SpecList")
    }
    else {
        
specOn 1
        client_print
(idprint_chat"Activastes el SpecList")
    }
}

public 
check_list()
{
    if(
specOn == 1)
    {
        static 
szName[33];
        
        for (new 
users 0users gMaxPlayersusers++)
        {
            if (
is_user_alive(users))
            {
                
vivos[users] = get_user_name(usersszName32)
                
huddmessage(users)
            }
            if (!
is_user_alive(users))
            {
                
muertos[users] = get_user_name(usersszName32)
                
huddmessage(users)
            }
        }
    }
}

public 
huddmessage(id)
{
    
set_hudmessage(255255255, -0.75, -1.0)
    
show_hudmessage(id"%s: (%d)^n %s",vivosgFps[id], muertos)

Muchas Gracias
Anti is offline
Send a message via Skype™ to Anti
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 12-02-2012 , 17:12   Re: [Ayuda] SpecList
#4

Que necesitas exáctamente de ese plugin, yo hice uno parecido hace un tiempo. No está del todo optimizado pero se entiende un poco más que el de IanCamarata o el de Fatalis. http://forums.alliedmods.net/showthread.php?t=176182
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 12-02-2012 , 17:26   Re: [Ayuda] SpecList
#5

una pregunta:
es lo mismo poner el task en plugin_init?

PHP Code:
public client_putinserver(id)
{
    if(
is_user_connected(id))
    {
        
set_task(0.1"ShowSpecs_Task"id__"b")
    }

segundo:
en el mio ya saque quien esta muerto y quien no pero no se como sacar quien spectea a quien

Last edited by Anti; 12-02-2012 at 17:28.
Anti is offline
Send a message via Skype™ to Anti
el999gonzalo
BANNED
Join Date: Aug 2012
Old 12-02-2012 , 17:52   Re: [Ayuda] SpecList
#6

Quote:
Originally Posted by Anti View Post
una pregunta:
es lo mismo poner el task en plugin_init?

PHP Code:
public client_putinserver(id)
{
    if(
is_user_connected(id))
    {
        
set_task(0.1"ShowSpecs_Task"id__"b")
    }

El plugin_init no tiene ID

ademas no tendria sentido pues harias un task infinito a nadie xd
el999gonzalo is offline
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 12-02-2012 , 18:29   Re: [Ayuda] SpecList
#7

http://forums.alliedmods.net/showpos...50&postcount=6
Adaptalo a tus necesidades
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 12-03-2012 , 11:51   Re: [Ayuda] SpecList
#8

ya encontre algo que me sirve muchas graciasssss!!
Anti is offline
Send a message via Skype™ to Anti
 



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 00:38.


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