Welcome Soldier.



[R CS:GO] Aport3

ChrstopH Ausente
Hypnotize
#1
Acá les traigo un pequeño aporte.  :troll:
Autor; io
Plugin: Rangos CS:GO 
Versión: 1,0

Espero que le sirva a alguien o les genere visitas (?)

Hay cosas incompletas pero que va, está fri.
Código PHP:
/* Script generated by Pawn Studio 

    Rangos CS:GO v1.0

*/

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <colorchat>
#include <adv_vault>

new const PLUGIN[][] = {"Rangos + Skins CS:GO""1,0""ChrstopHr" "[R CS:GO]"};

#define m_LastHitGroup 75
#define TASK_SHOWHUD     50000
#define ID_SHOWHUD     (taskid - TASK_SHOWHUD)
#define cs_get_user_team(%1)    get_pdata_int(%1,114)

enum TutorColor TUTOR_RED 1TUTOR_BLUETUTOR_YELLOWTUTOR_GREEN };
enum 
_:ArmasCSW_NAMEWPN_ID[20], V_MDL[70], NAMEE[70], NivelCATEGORIA};
enum KNIFES 1M4A1AWPDEAGLEGLOCK18AK47USP };
enum 
_:rango rangos_nombre[64], nivel_requerido };
enum 
_:ADM_DATA ADMIN_TYPE30 ], ADMIN_FLAGS };
enum Cargar 0Guardar };
enum PTSMAX_FIELDS };

new const 
WEAPONENTNAMES[][] = { """weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
    
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
    
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
    
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
"weapon_ak47""weapon_knife""weapon_p90" }

new const 
rangos[][rango] =  {
    { 
"--"100 },
    {
"Newbie"200},
    {
"Soldado"350},
    { 
"Silver I"688 },
    { 
"Silver II"3888 },
    { 
"Silver III"10388 },
    { 
"Silver IV"20938 },
    { 
"Silver Elite"36288 },
    { 
"Silver Elite Master"44189 },
    { 
"Gold Nova I"57198 },
    { 
"Gold Nova II"72896 },
    { 
"Gold Nova III"91578 },
    { 
"Gold Nova Master"115039 },
    { 
"Master Guardian I"143521 },
    { 
"Master Guardian II"178071 },
    { 
"Master Guardian Elite"218974 },
    { 
"Distinguished Master Guardian"266372 },
    { 
"Legendary Eagle"319588 },
    { 
"Legendary Eagle Master"379214 },
    { 
"Supreme Master First Class"445082 },
    { 
"The Global Elite"516995 },
    { 
"The Global Elite II"517995 },
    {
"Amo Supremo"519995},
    {
""99999999}
}
new const 
Admins[][ADM_DATA] =
{
    { 
"[ adm1 :v ]"ADMIN_RCON },
    { 
"[ adm2 :v ]"ADMIN_LEVEL_A },
    { 
"[ adm3 :v ]"ADMIN_LEVEL_B },
    { 
"[ adm4 :v ]"ADMIN_LEVEL_G },
    { 
"[ adm5 :v ]"ADMIN_LEVEL_H }
};

new const 
CT[][] = { "Go_arctic""Go_gign""Go_gsg9" };
new const 
TT[][] = { "Go_sas""Go_terror""Go_urban" };
new const 
ADMIN_TT[][] = { "adm_go" };
new const 
ADMIN_CT[][] = { "adm_go2" };
new const 
g_TutorPrecache[][] = {  
    
"gfx/career/icon_!.tga"
    
"gfx/career/icon_!-bigger.tga"
    
"gfx/career/icon_i.tga" 
    
"gfx/career/icon_i-bigger.tga"
    
"gfx/career/icon_skulls.tga",
    
"gfx/career/round_corner_ne.tga"
    
"gfx/career/round_corner_nw.tga"
    
"gfx/career/round_corner_se.tga"
    
"gfx/career/round_corner_sw.tga"
    
"resource/TutorScheme.res"
    
"resource/UI/TutorTextWindow.res"
}

new const 
Modelos[][Armas] = 
{
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifebutterfly.mdl""knifebutterfly"3KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifefalchion.mdl""knifefalchion"6KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifehuntsman.mdl""knifehuntsman"9KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifelore.mdl""knifelore"12KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifem9fade.mdl""knifem9fade"15KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifem9huntsmanurban.mdl""knifem9huntsmanurban"18KNIFES}, 
    
    
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1chanticosfire.mdl""m4a1chanticosfire"3M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1cyrex.mdl""m4a1cyrex"6M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1goldencoil.mdl""m4a1goldencoil"9M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1guardian2.mdl""m4a1guardian2"12M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1howl.mdl""m4a1howl"15M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1icarus1.mdl""m4a1icarus1"18M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1masterpiece.mdl""m4a1masterpiece"21M4A1},
    
    
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpboom.mdl""awpboom"4AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpdragonlore.mdl""awpdragonlore"9AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpfireblaze.mdl""awpfireblaze"12AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpgraffiti.mdl""awpgraffiti"15AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awplightningstrike.mdl""awplightningstrike"18AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awptigertooth.mdl""awptigertooth"20AWP},
    
    
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglealexandria.mdl""deaglealexandria"4DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleblackred.mdl""deagleblackred"9DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleblaze.mdl""deagleblaze"12DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleconspiracy.mdl""deagleconspiracy"15DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglefireelemental.mdl""deaglefireelemental"18DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglewildfire.mdl""deaglewildfire"20DEAGLE},
    
    
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18candyapple.mdl""lock18candyapple"4GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18element.mdl""glock18element"9GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18fade.mdl""glock18fade"12GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18fireelemental.mdl""lock18fireelemental"15GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18pink.mdl""glock18pink"18GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18TriStrike.mdl""glock18TriStrike"20GLOCK18},
    
    
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47aquamarine.mdl""ak47aquamarine"3AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47casehardened.mdl""ak47casehardened"6AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47fireserpent.mdl""ak47fireserpent"9AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47fuelinjector.mdl""ak47fuelinjector"12AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47Misty.mdl""ak47Misty"15AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47propaganda.mdl""ak47propaganda"18AK47},
    
    
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspcaiman.mdl""uspcaiman"4USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspcondor.mdl""uspcondor"9USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspfuelinjector.mdl""uspfuelinjector"12USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspguardian.mdl""uspguardian"15USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_usporion.mdl""usporion"18USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_usppink.mdl""usppink"21USP}
}
new 
g_isPoint33 ], g_isRango33 ], g_isDivision33 ], g_isElegida33 ];
new 
g_isTipo33 ][ 30 ], g_isName33 ][ 32 ];
new 
g_isMsgTutorg_isMsgTutCloseg_isMaxPlayers;
new 
MsgHudSync;
new const 
horas[] = { 000408121620  };
new 
boolg_isHappytimeg_isCat33 ];
new 
iCampos[MAX_FIELDS], iVault;

const 
TASK_TUTOR 467666646;

public 
plugin_init()
{
    
register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
    
// Add your own code here
    
    
RegisterHam(Ham_Killed"player""Ham_PlayerKilled"1);
    
RegisterHam(Ham_Spawn        "player"    "ham_PlayerSpawn_Post"1);
    for(new 
1sizeof WEAPONENTNAMESi++)
        if(
WEAPONENTNAMES[i][0]) RegisterHam(Ham_Item_DeployWEAPONENTNAMES[i], "ham_ItemDeploy_AllWeapons"1)
    
    
register_forward(FM_SetModel"fw_SetModel"
    
    
register_event("HLTV""round_start""a""1=0""2=0");
    
    
g_isMsgTutor get_user_msgid("TutorText");
    
g_isMsgTutClose get_user_msgid("TutorClose");
    
g_isMaxPlayers get_maxplayers();
    
MsgHudSync CreateHudSyncObj();
    
    
register_concmd("go_puntos""cmd_puntos"ADMIN_RCON"<nombre> <puntos>");
    
    
register_clcmd("say test""cmdMenu");
    
register_clcmd("say""BlockSay");
    
    
iVault adv_vault_open("asad"false);
    
    
iCampos[PTS   adv_vault_register_field(iVault"pts");
    
    
adv_vault_init(iVault);
}

public 
plugin_precache()
{
    static 
i;
    
    for(
0sizeof(TT); ++iprecache_player_model(TT[i]);
    for(
0sizeof(CT); ++iprecache_player_model(CT[i]);
    for(
0sizeof(ADMIN_TT); ++iprecache_player_model(ADMIN_TT[i]);
    for(
0sizeof(ADMIN_CT); ++iprecache_player_model(ADMIN_CT[i]);
    for(
0sizeof g_TutorPrecachei++) engfunc(EngFunc_PrecacheGeneric,g_TutorPrecache[i]);
    for(
0sizeof Modelosi++) precache_model(Modelos[i][V_MDL]);
    
}
public 
cmd_puntos (idpuntoscid)
{
    if (!
cmd_access(idpuntoscid3)) return PLUGIN_HANDLED;
    new 
arg[33], arg2[10];
    
read_argv(1argcharsmax(arg));
    
read_argv(2arg2charsmax(arg2));
    
    new 
Player cmd_target(idarg,CMDTARGET_ONLY_ALIVE);
    
    if (!
Player)
    {
        
client_print(idprint_console"Player no registrado."); return PLUGIN_HANDLED;
    }
    
    
g_isPoint[Player] += str_to_num(arg2) ;
    
chequear_rango(Player);
    
    return 
PLUGIN_HANDLED;

public 
client_putinserverindex ) {
    
    
g_isDivisionindex ] = g_isRangoindex ] = 0
    
g_isPointindex ] = 100;
    
set_task(1.0"ShowHUD"index+TASK_SHOWHUD__"b" );
    
    
get_user_nameindexg_isNameindex ], 31 );
    
g_isTipoindex ] = "^0";
    
    if(
is_user_adminindex ))
    {
        static 
iflagsflags get_user_flagsindex );
        
        for(
sizeof Admins i++ ) 
        {
            if(
flags Admins[i][ADMIN_FLAGS])
            { 
                    
                formatex
(g_isTipo[index], charsmax(g_isTipo), "%s"Admins[i][ADMIN_TYPE]);
                break;
            }
        }
    }
    
Type(indexCargar);
}
public 
client_disconnect(index) { remove_task(index+TASK_SHOWHUD); Type(indexGuardar); }
public 
round_start() {
    
set_task(0.1,"happyhour");
    
    for(new 
1<= g_isMaxPlayers; ++i)
        
client_print(iprint_chat"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
}
public 
happyhour(id)
{
    new 
data[12];
    
get_time("%H"data12);
    new 
Tiempo str_to_num(data);
    
    for(new 
i=0;<= sizeof horas 1;i++)
    {
        if(
Tiempo != horas[i]) continue;
        
g_isHappytime true;
        break;
    }
    if(
g_isHappytime)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] Estas Jugando La hora feliz"PLUGIN[3]);
        
client_print(idprint_chat"Estas en^x04 Happy Hour^x01 disfruta mientas ganas el^x04 Doble^x01 de Puntos");
    }

public 
ShowHUD(const taskid)
{
    new 
id
    id 
ID_SHOWHUD
    
    
if (!is_user_alive(id))
    {
        
id pev(idpev_iuser2)
        if (!
is_user_alive(id)) return;
    }
    
    
set_hudmessage(255550.00.2006.01.10.00.0 
    ShowSyncHudMsg
(idMsgHudSync"//*===== CS:GO Mexico =====*\\^nRango: %s | Puntos: %d/519995^nDivision: %d^nHH: %sctivado^nSig. Rango: %s^n//*=====================*\\",
    
rangos[g_isRango[id]][rangos_nombre], g_isPoint[id], g_isDivision[id], g_isHappytime "A" "Desa"rangos[g_isRango[id]+1][rangos_nombre])

public 
Ham_PlayerKilled(const victim, const attacker, const shouldgib) {
    if (!
is_user_connected(attacker) || (victim == attacker)) return; 
    
    if(
g_isPointattacker ] >= 519995)
        
client_print(attackerprint_chat"%s alcanzaste el maximo de puntos no puedes sumar mas!"PLUGIN[3]);
    else{
        if( 
g_isPointvictim ] >= )
        {
            if(
get_pdata_int(victimm_LastHitGroup5) == HIT_HEAD){
                
g_isPointattacker ] += g_isHappytime 5
                
client_print(attackerprint_chat"%s Ganas %s Puntos por matar de HS."PLUGIN[3], g_isHappytime "7" "5" );
                
                
g_isPointvictim ] -= g_isHappytime 5;
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir de HeadShot.",PLUGIN[3], g_isHappytime "7" "5"  );
            }
            else if (
get_user_weapon(attacker) == CSW_KNIFE){
                
g_isPointattacker ] += g_isHappytime 12 10
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar con knife."PLUGIN[3], g_isHappytime 12 10);
                
                
g_isPointvictim ] -= g_isHappytime 12 10;
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir de knife.",PLUGIN[3], g_isHappytime "10" "12"  );
            }
            else{
                
g_isPointattacker ] += g_isHappytime 3
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar."PLUGIN[3], g_isHappytime 3);
                
                
g_isPointvictim ] -= g_isHappytime 3
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir.",PLUGIN[3], g_isHappytime "6" "3"  );
            }
        }
        else if( 
g_isPointvictim ] == )
        {
            if(
get_pdata_int(victimm_LastHitGroup5) == HIT_HEAD){
                
g_isPointattacker ] += g_isHappytime 5
                
client_print(attackerprint_chat"%s Ganas %s Puntos por matar de HS."PLUGIN[3], g_isHappytime "7" "5" );
                
            }
            else if (
get_user_weapon(attacker) == CSW_KNIFE){
                
g_isPointattacker ] += g_isHappytime 12 10
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar con knife."PLUGIN[3], g_isHappytime 12 10);
            }
            else{
                
g_isPointattacker ] += g_isHappytime 3
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar."PLUGIN[3], g_isHappytime 3);
            }
        } 
    }
    
    new 
Float:flHealthFloat:flMaxHealth 125.0pev(attackerpev_healthflHealth);
    if( 
flHealth flMaxHealth )
    {
        new 
Float:flNewHealth; new Float:flBonus 10.0;
        
        
flNewHealth floatmin(flHealth flBonusflMaxHealth);
        
set_pev(attackerpev_healthflNewHealth);
        
        
ColorChat(attackerNORMAL"^4[^3CS:GO^4]^1 En Horabuena Recibiste ^4+%.0f ^1de hp"flNewHealth flHealth);
    }
    
    
chequear_rango(attacker);
    
chequear_rango(victim);
}
public 
ham_PlayerSpawn_Post(const id)
{
    if(!
is_user_alive(id)) return;
    
    switch(
cs_get_user_team(id)) {
        case 
CS_TEAM_CT:{
            if(
is_user_admin(id))
                
cs_set_user_model(idADMIN_CT[random(sizeof ADMIN_CT)]);
            else
            
cs_set_user_model(idCT[random(sizeof CT)]);
        }
        case 
CS_TEAM_T: {
            if(
is_user_admin(id))
                
cs_set_user_model(idADMIN_TT[random(sizeof ADMIN_TT)]);
            else
            
cs_set_user_model(idTT[random(sizeof TT)]);
        }
    }
    
    
tutorMake(idTUTOR_GREEN3.0"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
    
client_print(idprint_chat"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
}
public 
chequear_rango(const id)
{
    static 
levellevel g_isRango[id];
    
    while(
g_isPoint[id] >= rangos[g_isRango[id]][nivel_requerido] && g_isRango[id] < sizeof (rangos)+)
        ++
g_isRango[id];
    
    while (
g_isPoint[id] < rangos[g_isRango[id]][nivel_requerido] && g_isRango[id] > 0)
        --
g_isRango[id];
    
    
g_isElegidaid ] = 0;
    
    if (
g_isRango[id] > level)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] subiste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre])
        
client_print(idprint_chat"%s subiste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre]);
    }
    else if (
g_isRango[id] < level)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] bajaste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre])
        
client_print(idprint_chat"%s bajaste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre]);
    }
    
    if(
g_isPoint[id] >= 519995)
    {
        
g_isRangoid ] = 0;
        
g_isPointid ] = 100;
        ++
g_isDivisionid ];
        
client_print(idprint_chat"Has hecho una Division! :3 Ahora Estas en la Division: %d"g_isDivision[id])               
    
}

public 
cmdMenu(id)
{
    new 
gMenu menu_create("\rMenu skins""handlerMenu");
    
menu_additem(gMenu"Knives""1");
    
menu_additem(gMenu"m4a1""2");
    
menu_additem(gMenu"Awp""3") ;
    
menu_additem(gMenu"Deagle""4") ;
    
menu_additem(gMenu"Glock18""5") ;
    
menu_additem(gMenu"Ak47""6") ;
    
menu_additem(gMenu"Usp""7") ;
    
    
menu_display(idgMenu0);
}

public 
handlerMenu(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    switch(
item) {
        case 
0   g_isCatid ] = KNIFES
        
case 1g_isCatid ] = M4A1
        
case 2g_isCatid ] = AWP
        
case 3g_isCatid ] = DEAGLE
        
case 4g_isCatid ] = GLOCK18
        
case 5g_isCatid ] = AK47
        
case 6g_isCatid ] = USP
    
}
    
menu_armas(id)
    return 
PLUGIN_HANDLED;

public 
menu_armas(id)
{
    new 
menu menu_create("Menu Skins""handler_skins");
    static 
Item[2];
    for(new 
0sizeof Modelosi++)
    {
        if(
Modelos[i][CATEGORIA] != g_isCatid ]) continue;
        
        
Item[0] = i;
        
        if(
g_isRango[id] >= Modelos[i][Nivel])
            
        
menu_additem(menuModelos[i][NAMEE], Item);
        else
        
menu_additem(menu"\r[Locked]""");
        
    }
    
menu_display(idmenu)

public 
handler_skins(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return;
    }
    static 
Item[2], AccessCallBack;
    
menu_item_getinfo(menuitemAccessCallBackItemcharsmax(Item), __AccessCallBack)
    
    if (
g_isRango[id] < Modelos[Item[0]][Nivel])
        return;
    
    
g_isElegida[id] = Item[0];
    return;
    
}
public 
ham_ItemDeploy_AllWeapons(wpn)
{
    static 
idid fm_cs_get_weapon_ent_owner(wpn);
    
    if (!
pev_valid(id)) return;
    
    static 
WeaponIDWeaponConstIDWeaponID cs_get_weapon_id(wpn);
    
    
WeaponConstID get_weapon_const_id(WeaponIDid/*, 1*/)
    
    if(!
is_user_alive(id) || WeaponConstID == -1) return;
    
/*if(g_isElegida[id] > -1)
        set_pev(id, pev_viewmodel2, Modelos[get_weapon_const_id(WeaponID, id, 2)][V_MDL]);
    else
    */
    
set_pev(idpev_viewmodel2Modelos[WeaponConstID][V_MDL]);
    

get_weapon_const_id(weaponid/*, iTipo*/)
{
    new 
wpn = -1;
    for(new 
isizeof Modelosi++){
        if(
weapon == Modelos[i][CSW_NAME] && g_isRango[id] >= Modelos[i][Nivel])
            
wpn i;
    }
    
/*if(iTipo == 1){
        for(new i; i < sizeof Modelos; i++){
            if(weapon == Modelos[i][CSW_NAME] && g_isRango[id] >= Modelos[i][Nivel])
                return i;
        } 
    }else if(iTipo == 2){
        for(new i; i < sizeof Modelos; i++){
            if(Modelos[i][CATEGORIA] != g_isCat[ id ]) continue;
                if(g_isRango[id] >= Modelos[i][Nivel] && g_isElegida[id] > -1)
                    return i;
        }
    }
    return PLUGIN_HANDLED;
    */
    
return wpn;
}

public 
BlockSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
    
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s ^x04%s^x01[ ^x04%s ^x01] ^x03%s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* " g_isTipoindex ], rangosg_isRangoindex ] ][ rangos_nombre ], g_isNameindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said   
    
    format
(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= g_isMaxPlayersi++)
    {
        if (!
is_user_connected(i)) continue;
        
        if (
is_user_admin(i) || is_user_alive(index) && is_user_alive(i) || !is_user_alive(index) && !is_user_alive(i))
        { 
       
            get_user_team
(iteamcharsmax(team))            
            changeTeamInfo
(icolor           
            writeMessage
(isaid)
            
changeTeamInfo(iteam)
        }
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}

public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEget_user_msgid"TeamInfo" ), _player)
    
write_byte(player)
    
write_string(team)
    
message_end()
}

public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEget_user_msgid"SayText" ), {000}, player)
    
write_byte(player)
    
write_string(message)
    
message_end()
}
public 
fw_SetModel(entity, const model[]) 

    
    static class[
10] ;
    
pev(entitypev_classname, class, sizeof class - 1) ;
        
    if (
equal(class, "weaponbox")) 
    {
        
set_pev(entitypev_nextthinkget_gametime() + 1.0) ;
        return; 
    } 
}
stock ValidMessage(text[], maxcount
{
    static 
lenicount;
    
len strlen(text);
    
count 0;
    
    if (!
len) return false;
    
    for (
0leni++) 
    {
        if (
text[i] != ' '
        {
            
count++
            if (
count >= maxcount)
                return 
true;
        }
    }
    
    return 
false;

stock tutorMake(id,TutorColor:Colorz,Float:fTime 0.0,const szText[],any:...){
    new 
szMessage[512];
    
vformat(szMessagecharsmax(szMessage), szText5);
    
    if(!
id){
        
message_begin(MSG_ALL,g_isMsgTutor);
        
write_string(szMessage);
        
write_byte(0);
        
write_short(0);
        
write_short(0);
        
write_short(1<<_:Colorz);
        
message_end();
    }
    else if(
is_user_connected(id))
    {
        
message_begin(MSG_ONE_UNRELIABLE,g_isMsgTutor,_,id);
        
write_string(szMessage);
        
write_byte(0);
        
write_short(0);
        
write_short(0);
        
write_short(1<<_:Colorz);
        
message_end();
    }
    
    if(
fTime != 0.0){
        if(!
id){
            for(new 
1<= g_isMaxPlayers; ++i)
                
remove_task(i+TASK_TUTOR);
            
            
            
set_task(fTime,"tutorClose",TASK_TUTOR);
        }
        else
        {
            
remove_task(id+TASK_TUTOR);
            
set_task(fTime,"tutorClose",id+TASK_TUTOR);
        }
    }
}

public 
tutorClose(iTask){
    new 
id iTask TASK_TUTOR;
    
    if(!
id){
        
message_begin(MSG_ALL,g_isMsgTutClose);
        
message_end();
    }
    else if(
is_user_connected(id))
    {
        
message_begin(MSG_ONE_UNRELIABLE,g_isMsgTutClose,_,id);
        
message_end();
    }
}
Type(idiTipo){
    if(!
is_user_connected(id)) 
        return;
    
    if(
iTipo == Cargar){
        
        if(!
adv_vault_get_prepare(iVault_g_isName[id]))        
            
return;
        
        
g_isPoint[id] = adv_vault_get_field(iVaultiCampos[PTS]);
    }
    if(
iTipo == Guardar){
        
        
adv_vault_set_start(iVault);
        
adv_vault_set_field(iVaultiCampos[PTS], g_isPoint[id]);
        
adv_vault_set_end(iVault0g_isName[id]);
    }
}

stock fm_cs_get_weapon_ent_owner(ent)
{
    if (
pev_valid(ent) != 2)
        return -
1;
    
    return 
get_pdata_cbase(ent414);
}
stock precache_player_model(const modelname[]) 

    static 
longname[128];
    
formatex(longnamecharsmax(longname), "models/player/%s/%s.mdl"modelnamemodelname);
    
precache_model(longname);
    
    
    
copy(longname[strlen(longname)-4], charsmax(longname) - (strlen(longname)-4), "T.mdl");
    if (
file_exists(longname)) precache_model(longname);

[+] 2 users say Thank You to ChrstopH for this post
Responder

Carlos Sin conexión
User
#2
Buena aporte me servirá ...
:nomedigas:
Responder

Sky^^ Sin conexión
User
#3
El Tutor es ilegal v:
[Imagen: 76561198095047868.png]

Perfil de amxmodx-es: Skylar
Responder

ChrstopH Ausente
Hypnotize
#4
donde está la regla? Pacman
[Imagen: 76561198283253977.png]

Mapas Frutas 100%
DeathRun Levels 100%
Atrapa al Traidor (Edición) 100%
Battle Royale 40%
Responder

Sky^^ Sin conexión
User
#5
(06-25-2017, 03:26 PM)ChrstopH escribió: donde está la regla? Pacman

Es mi pene Pacman
[Imagen: 76561198095047868.png]

Perfil de amxmodx-es: Skylar
Responder

escobar Sin conexión
User
#6
(06-24-2017, 09:30 PM)ChrstopH escribió: Acá les traigo un pequeño aporte.  :troll:
Autor; io
Plugin: Rangos CS:GO 
Versión: 1,0

Espero que le sirva a alguien o les genere visitas (?)

Hay cosas incompletas pero que va, está fri.
Código PHP:
/* Script generated by Pawn Studio 

    Rangos CS:GO v1.0

*/

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <colorchat>
#include <adv_vault>

new const PLUGIN[][] = {"Rangos + Skins CS:GO""1,0""ChrstopHr" "[R CS:GO]"};

#define m_LastHitGroup 75
#define TASK_SHOWHUD     50000
#define ID_SHOWHUD     (taskid - TASK_SHOWHUD)
#define cs_get_user_team(%1)    get_pdata_int(%1,114)

enum TutorColor TUTOR_RED 1TUTOR_BLUETUTOR_YELLOWTUTOR_GREEN };
enum 
_:ArmasCSW_NAMEWPN_ID[20], V_MDL[70], NAMEE[70], NivelCATEGORIA};
enum KNIFES 1M4A1AWPDEAGLEGLOCK18AK47USP };
enum 
_:rango rangos_nombre[64], nivel_requerido };
enum 
_:ADM_DATA ADMIN_TYPE30 ], ADMIN_FLAGS };
enum Cargar 0Guardar };
enum PTSMAX_FIELDS };

new const 
WEAPONENTNAMES[][] = { """weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
    
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
    
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
    
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
"weapon_ak47""weapon_knife""weapon_p90" }

new const 
rangos[][rango] =  {
    { 
"--"100 },
    {
"Newbie"200},
    {
"Soldado"350},
    { 
"Silver I"688 },
    { 
"Silver II"3888 },
    { 
"Silver III"10388 },
    { 
"Silver IV"20938 },
    { 
"Silver Elite"36288 },
    { 
"Silver Elite Master"44189 },
    { 
"Gold Nova I"57198 },
    { 
"Gold Nova II"72896 },
    { 
"Gold Nova III"91578 },
    { 
"Gold Nova Master"115039 },
    { 
"Master Guardian I"143521 },
    { 
"Master Guardian II"178071 },
    { 
"Master Guardian Elite"218974 },
    { 
"Distinguished Master Guardian"266372 },
    { 
"Legendary Eagle"319588 },
    { 
"Legendary Eagle Master"379214 },
    { 
"Supreme Master First Class"445082 },
    { 
"The Global Elite"516995 },
    { 
"The Global Elite II"517995 },
    {
"Amo Supremo"519995},
    {
""99999999}
}
new const 
Admins[][ADM_DATA] =
{
    { 
"[ adm1 :v ]"ADMIN_RCON },
    { 
"[ adm2 :v ]"ADMIN_LEVEL_A },
    { 
"[ adm3 :v ]"ADMIN_LEVEL_B },
    { 
"[ adm4 :v ]"ADMIN_LEVEL_G },
    { 
"[ adm5 :v ]"ADMIN_LEVEL_H }
};

new const 
CT[][] = { "Go_arctic""Go_gign""Go_gsg9" };
new const 
TT[][] = { "Go_sas""Go_terror""Go_urban" };
new const 
ADMIN_TT[][] = { "adm_go" };
new const 
ADMIN_CT[][] = { "adm_go2" };
new const 
g_TutorPrecache[][] = {  
    
"gfx/career/icon_!.tga"
    
"gfx/career/icon_!-bigger.tga"
    
"gfx/career/icon_i.tga" 
    
"gfx/career/icon_i-bigger.tga"
    
"gfx/career/icon_skulls.tga",
    
"gfx/career/round_corner_ne.tga"
    
"gfx/career/round_corner_nw.tga"
    
"gfx/career/round_corner_se.tga"
    
"gfx/career/round_corner_sw.tga"
    
"resource/TutorScheme.res"
    
"resource/UI/TutorTextWindow.res"
}

new const 
Modelos[][Armas] = 
{
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifebutterfly.mdl""knifebutterfly"3KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifefalchion.mdl""knifefalchion"6KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifehuntsman.mdl""knifehuntsman"9KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifelore.mdl""knifelore"12KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifem9fade.mdl""knifem9fade"15KNIFES},
    { 
CSW_KNIFE"weapon_knife""models/CsGo_Mexico/v_knifem9huntsmanurban.mdl""knifem9huntsmanurban"18KNIFES}, 
    
    
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1chanticosfire.mdl""m4a1chanticosfire"3M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1cyrex.mdl""m4a1cyrex"6M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1goldencoil.mdl""m4a1goldencoil"9M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1guardian2.mdl""m4a1guardian2"12M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1howl.mdl""m4a1howl"15M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1icarus1.mdl""m4a1icarus1"18M4A1},
    { 
CSW_M4A1"weapon_m4a1""models/CsGo_Mexico/v_m4a1masterpiece.mdl""m4a1masterpiece"21M4A1},
    
    
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpboom.mdl""awpboom"4AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpdragonlore.mdl""awpdragonlore"9AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpfireblaze.mdl""awpfireblaze"12AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awpgraffiti.mdl""awpgraffiti"15AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awplightningstrike.mdl""awplightningstrike"18AWP},
    { 
CSW_AWP"weapon_awp""models/CsGo_Mexico/v_awptigertooth.mdl""awptigertooth"20AWP},
    
    
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglealexandria.mdl""deaglealexandria"4DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleblackred.mdl""deagleblackred"9DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleblaze.mdl""deagleblaze"12DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deagleconspiracy.mdl""deagleconspiracy"15DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglefireelemental.mdl""deaglefireelemental"18DEAGLE},
    { 
CSW_DEAGLE"weapon_deagle""models/CsGo_Mexico/v_deaglewildfire.mdl""deaglewildfire"20DEAGLE},
    
    
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18candyapple.mdl""lock18candyapple"4GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18element.mdl""glock18element"9GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18fade.mdl""glock18fade"12GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18fireelemental.mdl""lock18fireelemental"15GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18pink.mdl""glock18pink"18GLOCK18},
    { 
CSW_GLOCK18"weapon_glock18""models/CsGo_Mexico/v_glock18TriStrike.mdl""glock18TriStrike"20GLOCK18},
    
    
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47aquamarine.mdl""ak47aquamarine"3AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47casehardened.mdl""ak47casehardened"6AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47fireserpent.mdl""ak47fireserpent"9AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47fuelinjector.mdl""ak47fuelinjector"12AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47Misty.mdl""ak47Misty"15AK47},
    { 
CSW_AK47"weapon_ak47""models/CsGo_Mexico/v_ak47propaganda.mdl""ak47propaganda"18AK47},
    
    
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspcaiman.mdl""uspcaiman"4USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspcondor.mdl""uspcondor"9USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspfuelinjector.mdl""uspfuelinjector"12USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_uspguardian.mdl""uspguardian"15USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_usporion.mdl""usporion"18USP},
    { 
CSW_USP"weapon_usp""models/CsGo_Mexico/v_usppink.mdl""usppink"21USP}
}
new 
g_isPoint33 ], g_isRango33 ], g_isDivision33 ], g_isElegida33 ];
new 
g_isTipo33 ][ 30 ], g_isName33 ][ 32 ];
new 
g_isMsgTutorg_isMsgTutCloseg_isMaxPlayers;
new 
MsgHudSync;
new const 
horas[] = { 000408121620  };
new 
boolg_isHappytimeg_isCat33 ];
new 
iCampos[MAX_FIELDS], iVault;

const 
TASK_TUTOR 467666646;

public 
plugin_init()
{
    
register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
    
// Add your own code here
    
    
RegisterHam(Ham_Killed"player""Ham_PlayerKilled"1);
    
RegisterHam(Ham_Spawn        "player"    "ham_PlayerSpawn_Post"1);
    for(new 
1sizeof WEAPONENTNAMESi++)
        if(
WEAPONENTNAMES[i][0]) RegisterHam(Ham_Item_DeployWEAPONENTNAMES[i], "ham_ItemDeploy_AllWeapons"1)
    
    
register_forward(FM_SetModel"fw_SetModel"
    
    
register_event("HLTV""round_start""a""1=0""2=0");
    
    
g_isMsgTutor get_user_msgid("TutorText");
    
g_isMsgTutClose get_user_msgid("TutorClose");
    
g_isMaxPlayers get_maxplayers();
    
MsgHudSync CreateHudSyncObj();
    
    
register_concmd("go_puntos""cmd_puntos"ADMIN_RCON"<nombre> <puntos>");
    
    
register_clcmd("say test""cmdMenu");
    
register_clcmd("say""BlockSay");
    
    
iVault adv_vault_open("asad"false);
    
    
iCampos[PTS   adv_vault_register_field(iVault"pts");
    
    
adv_vault_init(iVault);
}

public 
plugin_precache()
{
    static 
i;
    
    for(
0sizeof(TT); ++iprecache_player_model(TT[i]);
    for(
0sizeof(CT); ++iprecache_player_model(CT[i]);
    for(
0sizeof(ADMIN_TT); ++iprecache_player_model(ADMIN_TT[i]);
    for(
0sizeof(ADMIN_CT); ++iprecache_player_model(ADMIN_CT[i]);
    for(
0sizeof g_TutorPrecachei++) engfunc(EngFunc_PrecacheGeneric,g_TutorPrecache[i]);
    for(
0sizeof Modelosi++) precache_model(Modelos[i][V_MDL]);
    
}
public 
cmd_puntos (idpuntoscid)
{
    if (!
cmd_access(idpuntoscid3)) return PLUGIN_HANDLED;
    new 
arg[33], arg2[10];
    
read_argv(1argcharsmax(arg));
    
read_argv(2arg2charsmax(arg2));
    
    new 
Player cmd_target(idarg,CMDTARGET_ONLY_ALIVE);
    
    if (!
Player)
    {
        
client_print(idprint_console"Player no registrado."); return PLUGIN_HANDLED;
    }
    
    
g_isPoint[Player] += str_to_num(arg2) ;
    
chequear_rango(Player);
    
    return 
PLUGIN_HANDLED;

public 
client_putinserverindex ) {
    
    
g_isDivisionindex ] = g_isRangoindex ] = 0
    
g_isPointindex ] = 100;
    
set_task(1.0"ShowHUD"index+TASK_SHOWHUD__"b" );
    
    
get_user_nameindexg_isNameindex ], 31 );
    
g_isTipoindex ] = "^0";
    
    if(
is_user_adminindex ))
    {
        static 
iflagsflags get_user_flagsindex );
        
        for(
sizeof Admins i++ ) 
        {
            if(
flags Admins[i][ADMIN_FLAGS])
            { 
                    
                formatex
(g_isTipo[index], charsmax(g_isTipo), "%s"Admins[i][ADMIN_TYPE]);
                break;
            }
        }
    }
    
Type(indexCargar);
}
public 
client_disconnect(index) { remove_task(index+TASK_SHOWHUD); Type(indexGuardar); }
public 
round_start() {
    
set_task(0.1,"happyhour");
    
    for(new 
1<= g_isMaxPlayers; ++i)
        
client_print(iprint_chat"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
}
public 
happyhour(id)
{
    new 
data[12];
    
get_time("%H"data12);
    new 
Tiempo str_to_num(data);
    
    for(new 
i=0;<= sizeof horas 1;i++)
    {
        if(
Tiempo != horas[i]) continue;
        
g_isHappytime true;
        break;
    }
    if(
g_isHappytime)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] Estas Jugando La hora feliz"PLUGIN[3]);
        
client_print(idprint_chat"Estas en^x04 Happy Hour^x01 disfruta mientas ganas el^x04 Doble^x01 de Puntos");
    }

public 
ShowHUD(const taskid)
{
    new 
id
    id 
ID_SHOWHUD
    
    
if (!is_user_alive(id))
    {
        
id pev(idpev_iuser2)
        if (!
is_user_alive(id)) return;
    }
    
    
set_hudmessage(255550.00.2006.01.10.00.0 
    ShowSyncHudMsg
(idMsgHudSync"//*===== CS:GO Mexico =====*\\^nRango: %s | Puntos: %d/519995^nDivision: %d^nHH: %sctivado^nSig. Rango: %s^n//*=====================*\\",
    
rangos[g_isRango[id]][rangos_nombre], g_isPoint[id], g_isDivision[id], g_isHappytime "A" "Desa"rangos[g_isRango[id]+1][rangos_nombre])

public 
Ham_PlayerKilled(const victim, const attacker, const shouldgib) {
    if (!
is_user_connected(attacker) || (victim == attacker)) return; 
    
    if(
g_isPointattacker ] >= 519995)
        
client_print(attackerprint_chat"%s alcanzaste el maximo de puntos no puedes sumar mas!"PLUGIN[3]);
    else{
        if( 
g_isPointvictim ] >= )
        {
            if(
get_pdata_int(victimm_LastHitGroup5) == HIT_HEAD){
                
g_isPointattacker ] += g_isHappytime 5
                
client_print(attackerprint_chat"%s Ganas %s Puntos por matar de HS."PLUGIN[3], g_isHappytime "7" "5" );
                
                
g_isPointvictim ] -= g_isHappytime 5;
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir de HeadShot.",PLUGIN[3], g_isHappytime "7" "5"  );
            }
            else if (
get_user_weapon(attacker) == CSW_KNIFE){
                
g_isPointattacker ] += g_isHappytime 12 10
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar con knife."PLUGIN[3], g_isHappytime 12 10);
                
                
g_isPointvictim ] -= g_isHappytime 12 10;
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir de knife.",PLUGIN[3], g_isHappytime "10" "12"  );
            }
            else{
                
g_isPointattacker ] += g_isHappytime 3
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar."PLUGIN[3], g_isHappytime 3);
                
                
g_isPointvictim ] -= g_isHappytime 3
                
client_printvictimprint_chat"%s Perdiste %s puntos por morir.",PLUGIN[3], g_isHappytime "6" "3"  );
            }
        }
        else if( 
g_isPointvictim ] == )
        {
            if(
get_pdata_int(victimm_LastHitGroup5) == HIT_HEAD){
                
g_isPointattacker ] += g_isHappytime 5
                
client_print(attackerprint_chat"%s Ganas %s Puntos por matar de HS."PLUGIN[3], g_isHappytime "7" "5" );
                
            }
            else if (
get_user_weapon(attacker) == CSW_KNIFE){
                
g_isPointattacker ] += g_isHappytime 12 10
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar con knife."PLUGIN[3], g_isHappytime 12 10);
            }
            else{
                
g_isPointattacker ] += g_isHappytime 3
                
client_print(attackerprint_chat"%s Ganas %d Puntos por matar."PLUGIN[3], g_isHappytime 3);
            }
        } 
    }
    
    new 
Float:flHealthFloat:flMaxHealth 125.0pev(attackerpev_healthflHealth);
    if( 
flHealth flMaxHealth )
    {
        new 
Float:flNewHealth; new Float:flBonus 10.0;
        
        
flNewHealth floatmin(flHealth flBonusflMaxHealth);
        
set_pev(attackerpev_healthflNewHealth);
        
        
ColorChat(attackerNORMAL"^4[^3CS:GO^4]^1 En Horabuena Recibiste ^4+%.0f ^1de hp"flNewHealth flHealth);
    }
    
    
chequear_rango(attacker);
    
chequear_rango(victim);
}
public 
ham_PlayerSpawn_Post(const id)
{
    if(!
is_user_alive(id)) return;
    
    switch(
cs_get_user_team(id)) {
        case 
CS_TEAM_CT:{
            if(
is_user_admin(id))
                
cs_set_user_model(idADMIN_CT[random(sizeof ADMIN_CT)]);
            else
            
cs_set_user_model(idCT[random(sizeof CT)]);
        }
        case 
CS_TEAM_T: {
            if(
is_user_admin(id))
                
cs_set_user_model(idADMIN_TT[random(sizeof ADMIN_TT)]);
            else
            
cs_set_user_model(idTT[random(sizeof TT)]);
        }
    }
    
    
tutorMake(idTUTOR_GREEN3.0"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
    
client_print(idprint_chat"[%s] Plugin Hecho por Hypnotize.'"PLUGIN[3]);
}
public 
chequear_rango(const id)
{
    static 
levellevel g_isRango[id];
    
    while(
g_isPoint[id] >= rangos[g_isRango[id]][nivel_requerido] && g_isRango[id] < sizeof (rangos)+)
        ++
g_isRango[id];
    
    while (
g_isPoint[id] < rangos[g_isRango[id]][nivel_requerido] && g_isRango[id] > 0)
        --
g_isRango[id];
    
    
g_isElegidaid ] = 0;
    
    if (
g_isRango[id] > level)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] subiste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre])
        
client_print(idprint_chat"%s subiste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre]);
    }
    else if (
g_isRango[id] < level)
    {
        
tutorMake(idTUTOR_GREEN3.0"[%s] bajaste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre])
        
client_print(idprint_chat"%s bajaste al rango %s ."PLUGIN[3], rangos[g_isRango[id]][rangos_nombre]);
    }
    
    if(
g_isPoint[id] >= 519995)
    {
        
g_isRangoid ] = 0;
        
g_isPointid ] = 100;
        ++
g_isDivisionid ];
        
client_print(idprint_chat"Has hecho una Division! :3 Ahora Estas en la Division: %d"g_isDivision[id])               
    
}

public 
cmdMenu(id)
{
    new 
gMenu menu_create("\rMenu skins""handlerMenu");
    
menu_additem(gMenu"Knives""1");
    
menu_additem(gMenu"m4a1""2");
    
menu_additem(gMenu"Awp""3") ;
    
menu_additem(gMenu"Deagle""4") ;
    
menu_additem(gMenu"Glock18""5") ;
    
menu_additem(gMenu"Ak47""6") ;
    
menu_additem(gMenu"Usp""7") ;
    
    
menu_display(idgMenu0);
}

public 
handlerMenu(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    switch(
item) {
        case 
0   g_isCatid ] = KNIFES
        
case 1g_isCatid ] = M4A1
        
case 2g_isCatid ] = AWP
        
case 3g_isCatid ] = DEAGLE
        
case 4g_isCatid ] = GLOCK18
        
case 5g_isCatid ] = AK47
        
case 6g_isCatid ] = USP
    
}
    
menu_armas(id)
    return 
PLUGIN_HANDLED;

public 
menu_armas(id)
{
    new 
menu menu_create("Menu Skins""handler_skins");
    static 
Item[2];
    for(new 
0sizeof Modelosi++)
    {
        if(
Modelos[i][CATEGORIA] != g_isCatid ]) continue;
        
        
Item[0] = i;
        
        if(
g_isRango[id] >= Modelos[i][Nivel])
            
        
menu_additem(menuModelos[i][NAMEE], Item);
        else
        
menu_additem(menu"\r[Locked]""");
        
    }
    
menu_display(idmenu)

public 
handler_skins(idmenuitem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return;
    }
    static 
Item[2], AccessCallBack;
    
menu_item_getinfo(menuitemAccessCallBackItemcharsmax(Item), __AccessCallBack)
    
    if (
g_isRango[id] < Modelos[Item[0]][Nivel])
        return;
    
    
g_isElegida[id] = Item[0];
    return;
    
}
public 
ham_ItemDeploy_AllWeapons(wpn)
{
    static 
idid fm_cs_get_weapon_ent_owner(wpn);
    
    if (!
pev_valid(id)) return;
    
    static 
WeaponIDWeaponConstIDWeaponID cs_get_weapon_id(wpn);
    
    
WeaponConstID get_weapon_const_id(WeaponIDid/*, 1*/)
    
    if(!
is_user_alive(id) || WeaponConstID == -1) return;
    
/*if(g_isElegida[id] > -1)
        set_pev(id, pev_viewmodel2, Modelos[get_weapon_const_id(WeaponID, id, 2)][V_MDL]);
    else
    */
    
set_pev(idpev_viewmodel2Modelos[WeaponConstID][V_MDL]);
    

get_weapon_const_id(weaponid/*, iTipo*/)
{
    new 
wpn = -1;
    for(new 
isizeof Modelosi++){
        if(
weapon == Modelos[i][CSW_NAME] && g_isRango[id] >= Modelos[i][Nivel])
            
wpn i;
    }
    
/*if(iTipo == 1){
        for(new i; i < sizeof Modelos; i++){
            if(weapon == Modelos[i][CSW_NAME] && g_isRango[id] >= Modelos[i][Nivel])
                return i;
        } 
    }else if(iTipo == 2){
        for(new i; i < sizeof Modelos; i++){
            if(Modelos[i][CATEGORIA] != g_isCat[ id ]) continue;
                if(g_isRango[id] >= Modelos[i][Nivel] && g_isElegida[id] > -1)
                    return i;
        }
    }
    return PLUGIN_HANDLED;
    */
    
return wpn;
}

public 
BlockSayindex )
{
    static 
said[191];
    
read_args(saidcharsmax(said));
    
remove_quotes(said);
    
replace_all(saidcharsmax(said), "%"" "); replace_all(saidcharsmax(said), "#"" ");
    
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    
    static 
color[11], prefix[91]
    
get_user_team(indexcolorcharsmax(color))
    
    
formatex(prefixcharsmax(prefix), "%s ^x04%s^x01[ ^x04%s ^x01] ^x03%s"
    
is_user_aliveindex ) ? "^x01" "^x01*MUERTO* " g_isTipoindex ], rangosg_isRangoindex ] ][ rangos_nombre ], g_isNameindex ])
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said   
    
    format
(saidcharsmax(said), "%s^x01 :  %s"prefixsaid)
    
    static 
iteam[11];
    for (
1<= g_isMaxPlayersi++)
    {
        if (!
is_user_connected(i)) continue;
        
        if (
is_user_admin(i) || is_user_alive(index) && is_user_alive(i) || !is_user_alive(index) && !is_user_alive(i))
        { 
       
            get_user_team
(iteamcharsmax(team))            
            changeTeamInfo
(icolor           
            writeMessage
(isaid)
            
changeTeamInfo(iteam)
        }
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}

public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEget_user_msgid"TeamInfo" ), _player)
    
write_byte(player)
    
write_string(team)
    
message_end()
}

public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEget_user_msgid"SayText" ), {000}, player)
    
write_byte(player)
    
write_string(message)
    
message_end()
}
public 
fw_SetModel(entity, const model[]) 

    
    static class[
10] ;
    
pev(entitypev_classname, class, sizeof class - 1) ;
        
    if (
equal(class, "weaponbox")) 
    {
        
set_pev(entitypev_nextthinkget_gametime() + 1.0) ;
        return; 
    } 
}
stock ValidMessage(text[], maxcount
{
    static 
lenicount;
    
len strlen(text);
    
count 0;
    
    if (!
len) return false;
    
    for (
0leni++) 
    {
        if (
text[i] != ' '
        {
            
count++
            if (
count >= maxcount)
                return 
true;
        }
    }
    
    return 
false;

stock tutorMake(id,TutorColor:Colorz,Float:fTime 0.0,const szText[],any:...){
    new 
szMessage[512];
    
vformat(szMessagecharsmax(szMessage), szText5);
    
    if(!
id){
        
message_begin(MSG_ALL,g_isMsgTutor);
        
write_string(szMessage);
        
write_byte(0);
        
write_short(0);
        
write_short(0);
        
write_short(1<<_:Colorz);
        
message_end();
    }
    else if(
is_user_connected(id))
    {
        
message_begin(MSG_ONE_UNRELIABLE,g_isMsgTutor,_,id);
        
write_string(szMessage);
        
write_byte(0);
        
write_short(0);
        
write_short(0);
        
write_short(1<<_:Colorz);
        
message_end();
    }
    
    if(
fTime != 0.0){
        if(!
id){
            for(new 
1<= g_isMaxPlayers; ++i)
                
remove_task(i+TASK_TUTOR);
            
            
            
set_task(fTime,"tutorClose",TASK_TUTOR);
        }
        else
        {
            
remove_task(id+TASK_TUTOR);
            
set_task(fTime,"tutorClose",id+TASK_TUTOR);
        }
    }
}

public 
tutorClose(iTask){
    new 
id iTask TASK_TUTOR;
    
    if(!
id){
        
message_begin(MSG_ALL,g_isMsgTutClose);
        
message_end();
    }
    else if(
is_user_connected(id))
    {
        
message_begin(MSG_ONE_UNRELIABLE,g_isMsgTutClose,_,id);
        
message_end();
    }
}
Type(idiTipo){
    if(!
is_user_connected(id)) 
        return;
    
    if(
iTipo == Cargar){
        
        if(!
adv_vault_get_prepare(iVault_g_isName[id]))        
            
return;
        
        
g_isPoint[id] = adv_vault_get_field(iVaultiCampos[PTS]);
    }
    if(
iTipo == Guardar){
        
        
adv_vault_set_start(iVault);
        
adv_vault_set_field(iVaultiCampos[PTS], g_isPoint[id]);
        
adv_vault_set_end(iVault0g_isName[id]);
    }
}

stock fm_cs_get_weapon_ent_owner(ent)
{
    if (
pev_valid(ent) != 2)
        return -
1;
    
    return 
get_pdata_cbase(ent414);
}
stock precache_player_model(const modelname[]) 

    static 
longname[128];
    
formatex(longnamecharsmax(longname), "models/player/%s/%s.mdl"modelnamemodelname);
    
precache_model(longname);
    
    
    
copy(longname[strlen(longname)-4], charsmax(longname) - (strlen(longname)-4), "T.mdl");
    if (
file_exists(longname)) precache_model(longname);


7uu7 :3 niicee
Responder

ChrstopH Ausente
Hypnotize
#7
thnx.
[Imagen: 76561198283253977.png]

Mapas Frutas 100%
DeathRun Levels 100%
Atrapa al Traidor (Edición) 100%
Battle Royale 40%
Responder





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 .