Welcome Soldier.



[APORTE] Rangos por Puntos.

Sky^^ Sin conexión
User
#1
Un aporte simple, tal vez a alguien le sirva.


Código:
Código PHP:
#include <amxmodx>

new gRange33 ], gPoints33 ];

enum 
_:REQUIREDRANGES
{
    
NAME[32],
    
PRICE
};

new const 
RangesInfo[ ][ REQUIREDRANGES ] =
{
    { 
"Rango 1"100 },
    { 
"Rango 2"200 },
    { 
"Rango 3"300 },
    { 
"Rango 4"400 },
    { 
"Rango 5"500 }
};

public 
plugin_init( )
{
    
register_plugin"RangesForPoints""1.0""Skylar and Kikizon" );
    
    
register_event"DeathMsg""event_Death""a" );
    
    
register_clcmd"say /rango""CheckRange" );
    
register_clcmd"say /puntos""CheckPoints" );
}

public 
event_Death( )
{
    new 
Attacker read_data);
    new 
Victim read_data);
    
    if( 
Victim == Attacker ) return;
    if( !
is_user_aliveAttacker ) ) return;
    
    
UpdateRangeAttacker);
}

public 
CheckRangeid )
{
    
client_printidprint_chat"Eres rango %s."RangesInfogRangeid ] ][ NAME ] );
    return 
PLUGIN_HANDLED;
}
public 
CheckPointsid )
{
    
client_printidprint_chat"Tienes %d punto%s."gPointsid ], gPointsid ] == "" "s" );
    return 
PLUGIN_HANDLED;
}

public 
UpdateRangeidpoints )
{
    
gPointsid ] += points;
    
    new 
Range gRangeid ];
    
    while( 
gPointsid ] >= RangesInfogRangeid ] ][ PRICE ] )
        ++
gRangeid ];
    
    if( 
Range gRangeid ] )
        
client_printidprint_chat"Felicidades! Subiste al rango %s."RangesInfogRangeid ] ][ NAME ] );



Salu2.
[Imagen: 76561198095047868.png]

Perfil de amxmodx-es: Skylar
[+] 7 users say Thank You to Sky^^ for this post
Responder



Mensajes en este tema
Rangos por Puntos. - por Sky^^ - 08-26-2017, 02:09 AM
RE: Rangos por Puntos. - por Snower - 08-26-2017, 02:16 AM
RE: Rangos por Puntos. - por Sky^^ - 08-26-2017, 02:33 AM
RE: Rangos por Puntos. - por !Test! LaLo - 08-26-2017, 03:49 PM



Usuarios navegando en este tema:
1 invitado(s)



Sobre M X E M E X I C O

Comunidad MxE © 2020 - La mejorar comunidad de Counter Strike 1.6 .