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

Hagamos Un Plugin Entre Todos


  
 
 
Thread Tools Display Modes
internel
Member
Join Date: Nov 2012
Old 01-12-2013 , 13:38   Re: Hagamos Un Plugin Entre Todos
#31

Mi modificación:

PHP Code:
/* Plugin de la Seccion de Español de AlliedMods

* Changelog:

* v1.0 = Usuario AlgoChikitito crea el plugin con el comando /hola
* v1.1 = Uusario Kiske arregla el comando
* v1.2 = Usuario Destro- agrega el comando/idea
* v1.3 = Usuario Chaato agrega Colorchat
* v1.4 = - Usuario Asd' agrega sistema de niveles, junto a shinoda y KillLikoe modifican este sistema
*        - !Morte le agrega un HUD con la informacion del jugador
*        - stickcs agrega rangos
* v1.5 = - Asdito'^ modifica el sistema de rangos
*        - Chaato agrega un menu
* v1.6 = Internel agrega sistema de puntos (como los ammo packs) y agrega el changelog
*/


#include <amxmodx>   
#include <hamsandwich>  
#include <colorchat>  

const TASK_HUD 1654;  

new 
g_Autores[] = "AlgoChikitito, Kiske, Destro-, Chaato, Asd', shinoda, KillLikoe, !Morte, stickcs, Asdito', Chaato e Internel" 

#define ADMIN_FLAG     ADMIN_CVAR 
#define ID_HUD        ( TaskID - TASK_HUD )  

new Kills33 ];   
new 
Levels33 ];  
new 
g_rounds[33];  
new 
g_rango[33];  
new 
g_puntos[33];

new 
pcvar_puntospcvar_puntosganados

new const rangos[][] = { "Junior Member""Sub-Member""AM Member""Senior Member""Advanced Member""Extreme Member""Vip Member""Gold Member" }  
new const 
RoundsNecesaries[] = { 41022406698105124 }  

new 
Synchronized_Hud;  
new 
g_MaxPlayers

public 
plugin_init()      
{      
    
register_plugin"AlliedModders" "1.6" "AlliedModders" );   
      
    
RegisterHamHam_Killed"player""Forward_PlayerKilled");   
      
    
register_clcmd"say /Hi" "Command_Hi" )     
    
register_clcmd"say /Idea" "Command_Idea" );      
    
register_clcmd"say /Suggest" "Command_Suggests" );
    
register_clcmd"say /Compras" "Command_Compras" );
    
register_logevent("logevent_round_end"2"1=Round_End")  
    
    
pcvar_puntos register_cvar("puntos_partida""15")
    
pcvar_puntosganados register_cvar("puntos_pormuerte""10")
      
    
Synchronized_Hud CreateHudSyncObj(); 
    
g_MaxPlayers get_maxplayers( );  
}  

public 
client_putinserverIndex )

    
set_task1.0"Function_Hud"Index+TASK_HUD__"b" )  
    
g_puntos[Index] = get_pcvar_num(pcvar_puntos)
}
    
public 
Forward_PlayerKilledVictimAttackerShouldGibs )   
{   
    if( 
Victim == Attacker )   
        return 
HAM_IGNORED;   
      
    while( ++
KillsAttacker ] >= ( LevelsAttacker ] ) * 10 )   
    {   
        
LevelsAttacker ]++;   
        
g_puntos[Attacker] += get_pcvar_num(pcvar_puntosganados)
        
client_print_colorAttackerDontChange"^4[AMXX] ^1Has subido de nivel, tu nivel es: %i."LevelsAttacker ] );   
    }   
      
    
set_task3.0"Function_RespawnPlayer"Victim );   
      
    return 
HAM_IGNORED;   
}   

public 
Function_RespawnPlayerIndex )   
{   
    if( !
is_user_connectedIndex ) )   
        return;   
      
    
ExecuteHamBHam_CS_RoundRespawn,  Index );   
}   

public 
Function_HudTaskID )  
{  
    static 
IndexIndex ID_HUD  
      
    set_hudmessage
2552552550.020.1516.01.10.00.0, -)  
    
ShowSyncHudMsgID_HUDSynchronized_Hud"Nivel: %d - Kills: %d - Status: %s"LevelsIndex ], KillsIndex ], rangos[g_rangoIndex ] ]) 
}  

public 
Command_HiIndex )   
{       
    
client_print_colorIndexDontChange"^4[AMXX] ^1Hola, este plugin ha sido creado por la seccion Spanish de AlliedModders" );    
}    

public 
Command_IdeaIndex )      
{       
    
client_print_colorIndex DontChange"^4[AMXX] ^1Hagamos un nuevo mod entre todos!" );    
}    

public 
Command_SuggestsIndex )    
{    
    
client_print_colorIndexDontChange"^4[AMXX] ^1Otras sugerencias como la de Destro?" );      
}    
public 
logevent_round_end()  
{  
        static 
Index ;  
         
        for( 
Index 1Index <= g_MaxPlayersIndex++ ) 
        { 
                if ( 
get_user_flagsIndex ) & ADMIN_FLAG)  
                   
g_roundsIndex ] += 2  
                
else  
                   
g_roundsIndex ]++  
        
                
check_rangoIndex )  
        } 
}  
public 
check_rangoIndex )  
{  
        while(
g_roundsIndex ] >= RoundsNecesaries[g_rangoIndex ]])  
    {  
        if (
g_rangoIndex ] >= sizeof rangos)  
            
client_print_colorIndexDontChange"^4[AMXX] ^1Felicidades alcancaste el rango mayor AM")  
        else  
        {  
            
g_rangoIndex ]++  
            
client_print_colorIndexDontChange"^4[AMXX] !Has subido al RANGO: %s"rangos[g_rangoIndex ]])  
        }  
    }  
}  

public 
Command_Compras(id

    if(
is_user_alive(id)) 
    { 
        new 
Menu menu_create("\r AlliedModders\y Spanish Seccion\w Compras.""Compras_handle"
        
menu_additem(Menu"Compra 1" "1" ,0
        
menu_additem(Menu"Compra 2" "2" ,0
        
menu_additem(Menu"Compra 3" "3" ,0
        
menu_additem(Menu"Compra 4" "4" ,0
        
menu_additem(Menu"Compra 5" "6" ,0
        
menu_additem(Menu"\rINFO PLUG" "7" ,0
         
        
menu_setprop(Menu,MPROP_EXITNAME,"Salir."
        
menu_setprop(MenuMPROP_EXITMEXIT_ALL)  
        
menu_display(idMenu0)  
    } 
    else 
    { 
        
chat_color(id"!g[AMXX]!t No eres de la seccion: !g Spanish XD."
    } 

public 
Compras_handle(idMenuitem

    if (
item == MENU_EXIT)  
    { 
        
menu_destroy(Menu)  
        return 
PLUGIN_HANDLED  
    

     
     
    new 
iData[6];  
    new 
iAccess;  
    new 
iCallback;  
    new 
iName[64];  
    
menu_item_getinfo(MenuitemiAccess iData5iName 63iCallback
     
    switch (
str_to_num(iData))  
    {  
        case 
1
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
2
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
3
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
4
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
5
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
6
        { 
            
//AÑADIR OPCION Y/O COMPRA 
        

        case 
7
        { 
            
chat_color(id"!g[AMXX]!y Este plugin fue creado por la seccion!g Spanish!y de!g AlliedModders"
            
chat_color(id"!g[AMXX] !tAutores:!g %s"g_Autores
        } 
    } 
    return 
PLUGIN_HANDLED

internel is offline
 



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 04:09.


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