AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can create 2 plugins into 1 (https://forums.alliedmods.net/showthread.php?t=133606)

vaineika 07-27-2010 04:49

Can create 2 plugins into 1
 
VIP:
PHP Code:

// na prodazu

#define VERSION    "3.6f Skype: iwannafcukyou"

#include <amxmodx> 
#include <amxmisc>  
#include <cstrike> 
#include <fun>
#include <engine>
#include <fakemeta>  
#include <xs>
#include <vault>
#include <hamsandwich>
 
#define DAMAGE_RECIEVED
#define VIP_LEVEL ADMIN_LEVEL_H 
#define keys_vip_menu (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9)

#define CharsMax(%1) sizeof %1 - 1

new name[32]

new 
teamchang_mode[33]
new 
teamchang_active[33]
 
new 
armor_mode[33
new 
armor_active[33]
  
new 
grenades_mode[33]  
new 
grenades_active[33]
 
new 
ammo_mode[33
new 
ammo_active[33]
 
new 
money_mode[33]
new 
money_active[33]

new 
vampir_mode[33]
new 
vampir_active[33]

new 
sniper_mode[33]
new 
sniper_active[33]

new 
knife_mode[33]
new 
knife_active[33]

new 
roundendfix

public plugin_init()
{

    
register_plugin("VIP Scriptas by Haris"VERSION"Skype ID: iwannafcukyou")
    
register_cvar("amx_vip_virsija"VERSIONFCVAR_SPONLY|FCVAR_SERVER)
    
set_cvar_string("amx_vip_versija"VERSION)
    
RegisterHam(Ham_Spawn"player""reset"1)

    
register_event("DeathMsg""death_event""a")
    
register_logevent("event_round_end"2"0=World triggered""1=Round_End")
    
register_event("CurWeapon""check_knife""be""1=1")
    
register_event("CurWeapon""check_sniper""be""1=1")
    
register_event("CurWeapon""check_grenades""be""1=1")
    
register_cvar("amx_vip_script""1")

    
register_cvar("amx_vip_img""http://fragas.net/nrm.jpg")

    
register_cvar("amx_vip_armor""1")
    
register_cvar("amx_vip_grenades""1")
    
register_cvar("amx_vip_ammo""1")
    
register_cvar("amx_vip_money""0")
    
register_cvar("amx_vip_money_num""1000")
    
register_cvar("amx_vip_vampir""1")
    
register_cvar("amx_vip_vampir_hp""10")
    
register_cvar("amx_vip_sniper""0")
    
register_cvar("amx_vip_knife""0")
    
register_cvar("amx_vip_knife_hp""350")
    
register_cvar("amx_vip_changeteam""1")
    
register_cvar("amx_vip_join""1" )
    
register_clcmd("say /vipmenu","show_vip_menu")
    
register_clcmd("say vipmenu","show_vip_menu")
    
register_clcmd("say_team vipmenu","show_vip_menu")
    
register_clcmd("vipmenu","show_vip_menu")
    
register_dictionary("vipscript.txt")
    
register_forward(FM_Touch,         "fwd_touch")

    
register_menucmd(-31,(1<<4),"via_me" )                                    
    
register_menucmd(-31,(1<<5),"via_me" )                                    
    
register_menucmd(register_menuid("BuyRifle",1),(1<<4),"via_me" )          
    
register_menucmd(register_menuid("BuyRifle",1),(1<<5),"via_me" )          
    
register_clcmd("awp","menu_awp"
    
register_clcmd("magnum","menu_awp")
    
register_clcmd("g3sg1","menu_awp")
    
register_clcmd("sg550","menu_awp")

    
register_clcmd("say /vips""viplist" )
    
register_clcmd("say /vipai""viplist" )

    
register_clcmd("say /visagaliai""viplist")
    
register_clcmd("say /ct""TEAMCT"
    
register_clcmd("say_team /ct""TEAMCT"
    
register_clcmd("say /t""TEAMT"
    
register_clcmd("say_team /t""TEAMT"
    
register_clcmd("say /spec""SPEC"
    
register_clcmd("say_team /spec""SPEC"

}

public 
show_vip_menu(idlevelcid)
{
            
set_task(0.1"show_vip_menusku"id)
}

public 
show_vip_menusku(id)
{

    if(
get_user_flags(id) & VIP_LEVEL)
    {
               
         
        if(
get_cvar_num("amx_vip_script") == 1)
        {
        
client_cmd(id"spk mp3/vipmenu.wav")

        new 
menu menu_create("\yVIP Menu :""Main_Menu")

        if(
armor_mode[id] == && get_cvar_num("amx_vip_armor") == 1)
        {
                
menu_additem(menu"SG550 + Deagle every round""1"0)
                }
                else if(
armor_mode[id] == 1)
                {
                
menu_additem(menu"\dSG550 + Deagle every round \y*""1"0)
                }
                else if(
get_cvar_num("amx_vip_armor") == 0)
                {
                }
                
        if(
grenades_mode[id] == && get_cvar_num("amx_vip_grenades") == 1)
                {    
                
menu_additem(menu"Machine Gun + Deagle every round""2"0)
                }
                else if(
grenades_mode[id] == 1)
                {
                
menu_additem(menu"\dMachine Gun + Deagle every round \y*""2"0)
                }
                else if(
get_cvar_num("amx_vip_grenades") == 0)
                {
        }
        
        if(
ammo_mode[id] == && get_cvar_num("amx_vip_ammo") == 1)
                {
                
menu_additem(menu"Armor + Frost granade""3"0)
                }
                else if(
ammo_mode[id] == 1)
                {
                
menu_additem(menu"\dArmor + Frost granade \y*""3"0)
                }
                else if(
get_cvar_num("amx_vip_ammo") == 0)
                {
        }
    
        if(
money_mode[id] == && get_cvar_num("amx_vip_money") == 1)
                {
                
menu_additem(menu"KURIAMA""4"0)
                }
                else if(
money_mode[id] == 1)
                {
                
menu_additem(menu"\dKURIAMA \y*""4"0)
                }
                else if(
get_cvar_num("amx_vip_money") == 0)
                {
        }
        
        if(
vampir_mode[id] == && get_cvar_num("amx_vip_vampir") == 1)
                {
                
menu_additem(menu"KURIAMA""5"0)
                }
                else if(
vampir_mode[id] == 1)
                { 
                
menu_additem(menu"\dKURIAMA\y*""5"0)
                }
                else if(
get_cvar_num("amx_vip_vampir") == 0)
                {
        }
            
        if(
sniper_mode[id] == && get_cvar_num("amx_vip_sniper") == 1)
                {
                
menu_additem(menu"KURIAMA""6"0)
                }
                else if(
sniper_mode[id] == 1)
                {
                
menu_additem(menu"\dKURIAMA \y*""6"0)
                }
                else if(
get_cvar_num("amx_vip_sniper") == 0)
                {
        }
            
        if(
knife_mode[id] == && get_cvar_num("amx_vip_ammo") == 1)
                {
                
menu_additem(menu"KURIAMA""7"0)
                }
                else if(
knife_mode[id] == 1)
                {
                
menu_additem(menu"\dKURIAMA \y*""7"0)
                }
                else if(
get_cvar_num("amx_vip_ammo") == 0)
                {
        }

        if(
teamchang_mode[id] == && get_cvar_num("amx_vip_changeteam") == 1)
                {
                
menu_additem(menu"KURIAMA""8"0)   
                }
                else if(
teamchang_mode[id] == 1)
                {
                
menu_additem(menu"\dKURIAMA \y*""8"0)   
                }
                else if(
get_cvar_num("amx_vip_changeteam") == 0)
                {
        }


        
menu_additem(menu"Iseiti""0"0)
        
menu_setprop(menuMPROP_PERPAGE0); 
        
menu_display(idmenu0)

        }
        }
        else if(
get_user_flags(id) != VIP_LEVEL)
        {
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NOT_VIP")
        
client_cmd(id"spk mp3/no.wav")
        }
    return 
PLUGIN_HANDLED

}


public 
Main_Menu(idmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)

    new 
key str_to_num(data)
    switch(
key)
    {
         case 
1:
        {
            if(
armor_mode[id] == && get_cvar_num("amx_vip_armor") == 1)
            {
                
armor_mode[id] = 1
                grenades_mode
[id] = 0
                ammo_mode
[id] = 0
                money_mode
[id] = 0
                vampir_mode
[id] = 0
                sniper_mode
[id] = 0
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0
                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_SARVU_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
armor_mode[id] == 1)
            {
            }
        }
        case 
2:
        {
            if(
grenades_mode[id] == && get_cvar_num("amx_vip_grenades") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 1
                ammo_mode
[id] = 0
                money_mode
[id] = 0
                vampir_mode
[id] = 0
                sniper_mode
[id] = 0
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0

                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_PAPIL_GRANATOS_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }

            if(
grenades_mode[id] == 1)
            {
            }
        }
        case 
3:
        {
            if(
ammo_mode[id] == && get_cvar_num("amx_vip_ammo") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 0
                ammo_mode
[id] = 1
                money_mode
[id] = 0
                vampir_mode
[id] = 0
                sniper_mode
[id] = 0
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0

                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_NEM_KULKOS")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
ammo_mode[id] == 1)
            {
            }
        }
        case 
4:
        {
            if(
money_mode[id] == && get_cvar_num("amx_vip_money") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 0
                ammo_mode
[id] = 0
                money_mode
[id] = 1
                vampir_mode
[id] = 0
                sniper_mode
[id] = 0
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0

                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_PINIGU_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
money_mode[id] == 1)
            {
            }
        }
        case 
5:
        {
            if(
vampir_mode[id] == && get_cvar_num("amx_vip_vampir") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 0
                ammo_mode
[id] = 0
                money_mode
[id] = 0
                vampir_mode
[id] = 1
                sniper_mode
[id] = 0
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0

                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_VAMPIR_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
vampir_mode[id] == 1)
            {
            }
        }
        case 
6:
        {
            if(
sniper_mode[id] == && get_cvar_num("amx_vip_sniper") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 0
                ammo_mode
[id] = 0
                money_mode
[id] = 0
                vampir_mode
[id] = 0
                sniper_mode
[id] = 1
                knife_mode
[id] = 0
                teamchang_mode
[id] = 0
                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_SNAIPER_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
sniper_mode[id] == 1)
            {
            }
        }
        case 
7:
        {
            if(
knife_mode[id] == && get_cvar_num("amx_vip_knife") == 1)
            {
                
armor_mode[id] = 0
                grenades_mode
[id] = 0
                ammo_mode
[id] = 0
                money_mode
[id] = 0
                vampir_mode
[id] = 0
                sniper_mode
[id] = 0
                knife_mode
[id] = 1
                teamchang_mode
[id] = 0
                client_print
(idprint_chat"%L"LANG_PLAYER"VIP_PEILIO_FUNKCIJA")
                
client_cmd(id"spk mp3/ok.wav")
            }
            if(
knife_mode[id] == 1)
            {
            }
        }
        case 
8:
        {
            if(
teamchang_mode[id] == && get_cvar_num("amx_vip_changeteam") == 1)
                  {
            
armor_mode[id] = 0
            grenades_mode
[id] = 0
            ammo_mode
[id] = 0
            money_mode
[id] = 0
            vampir_mode
[id] = 0
            sniper_mode
[id] = 0
            knife_mode
[id] = 0
            teamchang_mode
[id] = 1
            client_print
(idprint_chat"%L"LANG_PLAYER"VIP_KOMANDOS_KEIT_FUNKCIJA")
            
client_cmd(id"spk mp3/ok.wav")
                  }
            if(
teamchang_mode[id] == 1)
            {
            }
        }

   }                               
    return 
PLUGIN_HANDLED
}  


public 
TEAMCTid )         

    if(
get_cvar_num("amx_vip_script") != && roundendfix==1)
    {
        if(
get_user_flags(id) & VIP_LEVEL)
        {
            if(
teamchang_active[id] == 1)
        {    
            new 
CsTeams:team cs_get_user_team(id);
            if(
team == CS_TEAM_CT
            { 
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NEGALIMA_PERKELT")
                
client_cmd(id"spk VIP/no.wav")
            } else { 
                new 
name[32
                
get_user_name(id,name,31
                if(
is_user_alive(id)) user_kill(id
                
cs_set_user_team idCS_TEAM_CTCS_CT_URBAN
                
client_cmd(id"spk VIP/ok.wav")
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_PERKELTAS_CT")
            }
        }
            if(
teamchang_active[id] == 0)
            {    
                
client_cmd(id"spk VIP/no.wav")
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_FUNKCIJA_NEIJUNGTA")
            }
        }
        else if(
get_user_flags(id) != VIP_LEVEL)
        {
            
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NOT_VIP")
            
client_cmd(id"spk VIP/no.wav")
        }
}
        else if(
get_cvar_num("amx_vip_script") != 1)
        {
            
client_print(idprint_chat"%L"LANG_PLAYER"VIP_MENU_OFF")
            
client_cmd(id"spk VIP/no.wav")
        }
    return 
get_cvar_num("amx_vip_viscmds") ? PLUGIN_CONTINUE PLUGIN_HANDLED    
}

public 
TEAMTid 

    if(
get_cvar_num("amx_vip_script") != && roundendfix==1)
    {
        if(
get_user_flags(id) & VIP_LEVEL)
        {

            if(
teamchang_active[id] == 1)
            {
            new 
CsTeams:team cs_get_user_team(id);
            if(
team == CS_TEAM_T
            { 
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NEGALIMA_PERKELT")
                
client_cmd(id"spk VIP/no.wav")
            }
            else 
            { 
                new 
name[32
                
get_user_name(id,name,31
                if(
is_user_alive(id)) user_kill(id
                
cs_set_user_team idCS_TEAM_TCS_T_TERROR)
                
client_cmd(id"spk VIP/ok.wav")
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_PERKELTAS_T")
            } 
            }
            if(
teamchang_active[id] == 0)
            {    
                
client_cmd(id"spk VIP/no.wav")
                
client_print(idprint_chat"%L"LANG_PLAYER"VIP_FUNKCIJA_NEIJUNGTA")
            }
        }
        else if(
get_user_flags(id) != VIP_LEVEL)
        {
            
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NOT_VIP")
            
client_cmd(id"spk VIP/no.wav")
        }
    }
    else if(
get_cvar_num("amx_vip_script") != 1)
    {
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_MENU_OFF")
        
client_cmd(id"spk VIP/no.wav")
    }
    return 
get_cvar_num("amx_vip_viscmds") ? PLUGIN_CONTINUE PLUGIN_HANDLED   
}

public 
SPECid 

    if(
get_cvar_num("amx_vip_script") != && roundendfix==1)
    {
        if(
get_user_flags(id) & VIP_LEVEL)
        {

        if(
teamchang_active[id] == 1)
        {
        new 
CsTeams:team cs_get_user_team(id);
        if(
team == CS_TEAM_SPECTATOR
        { 
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NEGALIMA_PERKELT")

        
client_cmd(id"spk VIP/no.wav")
        }
        else 
        { 
        new 
name[32
        
get_user_name(id,name,31
        if(
is_user_alive(id)) user_kill(id
        
cs_set_user_team idCS_TEAM_SPECTATOR
        
client_cmd(id"spk VIP/ok.wav")
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_PERKELTAS_SPEC")
        } 
        }
        if(
teamchang_active[id] == 0)
        {    
        
client_cmd(id"spk VIP/no.wav")
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_FUNKCIJA_NEIJUNGTA")
        }
        }
        else if(
get_user_flags(id) != VIP_LEVEL)
        {
            
client_print(idprint_chat"%L"LANG_PLAYER"VIP_NOT_VIP")
            
client_cmd(id"spk VIP/no.wav")
        } 
    }
    else if(
get_cvar_num("amx_vip_script") != 1)
    {
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_MENU_OFF")
        
client_cmd(id"spk VIP/no.wav")
    }
    return 
get_cvar_num("amx_vip_viscmds") ? PLUGIN_CONTINUE PLUGIN_HANDLED   
}
public 
noriuvipmotd(id
{
    
show_motd(id,"noriuvip.txt","Nori VIP ?")
    return 
PLUGIN_CONTINUE   
}



public 
viplist(id
{
    
set_task(1.0"viplist2"id)
    return 
PLUGIN_CONTINUE   
}

public 
viplist2(id)
{
    static 
sPlayers[32], iNumiPlayer;
    static 
sName[32], sBuffer[1024];
   
    static 
iLen;
    
iLen formatex(sBuffersizeof sBuffer 1"<body bgcolor=#000000><font color=#7b68ee><pre>");
    
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen,"<body bgcolor=^"black^" bgProperties=fixed><font color=#FFFFFF><pre>");
   
    new 
webimg[33]
    
get_players(sPlayersiNum"ch");
    
get_cvar_string("amx_vip_img",webimg,32)

    
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen"<center><img src=^" %^"></img></center><br>"webimg);
     
    for(new 
0iNum x++)
    {   
    
iPlayer sPlayers[x];
         
    if(
get_user_flags(iPlayer) & VIP_LEVEL)
    {
    
get_user_name(iPlayersNamesizeof sName 1);
    
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen"<center>%s</center><br>"sName);
    }
    }
    
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen"<center><h5><font color=^"blue^"><B>Jeigu irgi nori tapti VIP'u rasyk /noriuvip</B>^n</font></h5></center>");

    
show_motd(idsBuffer"Vip's Online");
    return 
0;
}



public 
event_round_end()
{
    
roundendfix=0
    set_task
(1.0"event_round_end_fix"0)
}

public 
event_round_end_fix()
{
    
roundendfix=1
}

public 
VIP(TaskID)
{    
    new 
id TaskID 6910
    
    
if(get_user_flags(id) & VIP_LEVEL)
    {
        
message_begin(MSG_ALLget_user_msgid("ScoreAttrib"))
        
write_byte(id)
        
write_byte(4)
        
message_end()
    }
    
    return 
PLUGIN_HANDLED
}


public 
reset(idlevelcid)
{
    if(
get_cvar_num("amx_vip_script") != && roundendfix==1)
    {

        if(
get_user_flags(id) & VIP_LEVEL)
        {

            
set_task(0.1"VIP"id 6910)

            
armor_active[id] = 0
            grenades_active
[id] = 0
            ammo_active
[id] = 0
            money_active
[id] = 0
            vampir_active
[id] = 0
            sniper_active
[id] = 0
            knife_active
[id] = 0
            teamchang_active
[id] = 0
          
            
if(armor_mode[id] == 1)
            {
                
armor_active[id] = 1
                set_task
(1.0"vpar"id)
            }
            if(
grenades_mode[id] == 1)
            {
                
grenades_active[id] = 1
                set_task
(1.0"vpg"id)
            }
            if(
ammo_mode[id] == 1)
            {
                
ammo_active[id] = 1
                set_task
(1.0"vpa"id)
            }
            if(
money_mode[id] == 1)
            {
                
money_active[id] = 1
                set_task
(1.0"vpm"id)
            }
            if(
vampir_mode[id] == 1)
            {
                
vampir_active[id] = 1
            
}
            if(
sniper_mode[id] == 1)
            {
                
sniper_active[id] = 1
                set_task
(1.0"awpmessage"id)
            }
            if(
knife_mode[id] == 1)
            {
                
knife_active[id] = 1
                set_task
(1.0"knifemonit"id)
            }
            if(
teamchang_mode[id] == 1)
            {
                
teamchang_active[id] = 1
                set_task
(1.0"teamchangmessage"id)
            }
        }
    }
}

public 
teamchangmessage(id)
{
client_print(idprint_chat"%L"LANG_PLAYER"VIP_TEAMCHANG")
}

public 
awpmessage(id)
{
client_print(idprint_chat"%L"LANG_PLAYER"VIP_AWP_MSG")
}

public 
knifemonit(id)
{
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, id)
        
write_short(1<<10)
        
write_short(1<<10)
        
write_short(0x0000)
        
write_byte(0)
        
write_byte(0)
        
write_byte(200)
        
write_byte(75)
        
message_end()


        
cs_set_user_armor(id100CS_ARMOR_VESTHELM)
        
set_user_health(idget_user_health(id)+get_cvar_num("amx_vip_knife_hp"))
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_KNIFE_HP"get_cvar_num("amx_vip_knife_hp"))
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_KNIFE")
}

public 
vpar(id)
{
    if(
armor_active[id] == 1)
    {
        
cs_set_user_bpammo(idCSW_DEAGLE90)
        
give_item(id,"weapon_deagle"
        
give_item(id,"weapon_sg550")
        
cs_set_user_bpammo(idCSW_SG55090
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_KOMPLEKTAS")
    }
}

public 
vpg(id)
{
    if(
grenades_active[id] == 1)
    {
        
give_item(id,"weapon_deagle")
        
give_item(id,"weapon_m249")
        
cs_set_user_bpammo(idCSW_M249200
        
cs_set_user_bpammo(idCSW_DEAGLE90
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_GRANATU_KOMPLEKTAS")
    }
}

public 
vpa(id)
{
    if(
ammo_active[id] == 1)
    {
        
give_item(id,"weapon_flashbang")
        
give_item(id,"weapon_flashbang")
        
give_item(id,"weapon_hegrenade")
        
give_item(id,"weapon_smokegrenade")
        
give_item(id,"item_assaultsuit")
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_KULKOS")
    }
}

public 
vpm(id)
{
    if(
money_active[id] == 1)
    {    
        
cs_set_user_money(idcs_get_user_money(id) + get_cvar_num("amx_vip_money_num"))
        
client_print(idprint_chat"%L"LANG_PLAYER"VIP_MONEY"get_cvar_num("amx_vip_money_num"))
    }
}

public 
death_event(id)
{

    if(
get_user_flags(id) & VIP_LEVEL)
    {
    new 
killer read_data(1)
    if(
vampir_active[killer] == 1)
    {
    
set_user_health(killerget_user_health(killer)+get_cvar_num("amx_vip_vampir_hp"))
    
client_print(killerprint_chat"%L"LANG_PLAYER"VIP_VAMPIRE"get_cvar_num("amx_vip_vampir_hp"))
  
    
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
    
show_hudmessage(killer"%L"LANG_PLAYER"VIP_VAMPIRE"get_cvar_num("amx_vip_vampir_hp"))

    
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, killer)
    
write_short(1<<10)
    
write_short(1<<10
    
write_short(0x0000)
    
write_byte(0)
    
write_byte(0)
    
write_byte(200)
    
write_byte(75)
    
message_end()
    }
    }
}

    

public 
check_knife(id)
{
    if(
knife_active[id] == 1)
    {
           if(
get_user_weapon(id) != CSW_KNIFE && get_user_weapon(id) != CSW_C4)
           {
                   
engclient_cmd(id"weapon_knife"
                   }
                   else if(
get_user_weapon(id) != CSW_KNIFE && get_user_weapon(id) == CSW_C4)
                   {
                   }
      }

}


public 
check_grenades(id)
{
    if(
knife_active[id] == 1)
    {
        
cs_set_user_bpammo(idCSW_HEGRENADE0)
        
cs_set_user_bpammo(idCSW_SMOKEGRENADE0)
        
cs_set_user_bpammo(idCSW_FLASHBANG0)
    }
    else if(
knife_active[id] == 0)
    {
    }
}


public 
give_knife(id)
{
      if(
cs_get_user_team(id) == CS_TEAM_CT
      {
                
cs_set_user_defuse(id)
            
give_item(id,"weapon_knife")
      }
      if(
cs_get_user_team(id) == CS_TEAM_T)
      {    
                
give_item(id,"weapon_knife")
      }
}

public 
check_sniper(id)
{
    if(
get_cvar_num("amx_vip_script") == 1)
    {
        if(
get_cvar_num("amx_vip_sniper") == 1)
        {
            if(
sniper_active[id] == 1)
            {
            }
            else if(
sniper_active[id] == 0)
            {
                
set_task(0.5"drop_sniper"id)
            }
        }    
        else if(
get_cvar_num("amx_vip_sniper") != 1)
        {
    }
    }      
    else if(
get_cvar_num("amx_vip_sniper") != 1)
    {
    }
}

public 
drop_sniper(id)
{
    if(
get_user_weapon(id) == CSW_SG550)
    {
    
engclient_cmd(id,"drop""weapon_sg550")
    
client_print(idprint_chat"%L"LANG_PLAYER"VIP_DROP_SG500")
    }
    if(
get_user_weapon(id) == CSW_AWP)
    {
    
engclient_cmd(id,"drop""weapon_awp")
    
client_print(idprint_chat"%L"LANG_PLAYER"VIP_DROP_AWP")
    }
    if(
get_user_weapon(id) == CSW_G3SG1)
    {
    
engclient_cmd(id,"drop""weapon_g3sg1")
    
client_print(idprint_chat"%L"LANG_PLAYER"VIP_DROP_G3SG1")
    }
}


public 
client_connect(id)
{
        if(
get_user_flags(id) & VIP_LEVEL)
        {
            
armor_mode[id] = 0
            grenades_mode
[id] = 0
            ammo_mode
[id] = 0
            money_mode
[id] = 0
            vampir_mode
[id] = 0
            sniper_mode
[id] = 0
            knife_mode
[id] = 0
            teamchang_mode
[id] = 0
            
}
}

public 
client_disconnect(id
{
    
remove_task(id)
    if(
get_user_flags(id) & VIP_LEVEL)
    {
    
armor_mode[id] = 0
    grenades_mode
[id] = 0
    ammo_mode
[id] = 0
    money_mode
[id] = 0
    vampir_mode
[id] = 0
    sniper_mode
[id] = 0
    knife_mode
[id] = 0
    teamchang_mode
[id] = 0
    
}
}

public 
join_print(id, {Float,Sql,Result,_}:...)
{
    new 
finalmsg[192]
    
formatex(finalmsg191"%L"LANG_PLAYER"VIP_JOINED"name[id])

    
message_begin(MSG_ALLget_user_msgid("SayText"))
    
write_byte(id)
    
write_string(finalmsg)
    
message_end()
}

public 
client_putinserver(id)

        if(
get_user_flags(id) & VIP_LEVEL)
        {
            if(
get_cvar_num("amx_vip_join") == 1)
            {
                new 
name[32]
                
get_user_name(idname31)
                
client_print(0print_chat"%L"LANG_PLAYER"VIP_JOINED"name)
            }

            
armor_mode[id] = 0
            grenades_mode
[id] = 0
            ammo_mode
[id] = 0
            money_mode
[id] = 0
            vampir_mode
[id] = 0
            sniper_mode
[id] = 0
            knife_mode
[id] = 0
            teamchang_mode
[id] = 0
        
}
}


public 
plugin_precache() 
{
    
precache_sound("mp3/no.wav")    
    
precache_sound("mp3/ok.wav")
    
precache_sound("mp3/vipmenu.wav")
}

public 
via_me(id,key)
{
    new 
team get_user_team(id)

    if ((
team==&& key==5) || (team==&& key==4))
        
menu_awp(idkey)
    if ((
team==&& key==4) || (team==&& key==5))
        
menu_awp(idkey)

    return 
PLUGIN_CONTINUE
}

public 
menu_awp(id,key)
{
    if(
get_cvar_num("amx_vip_script") == 1)
    {
        if(
get_cvar_num("amx_vip_sniper") == 1)
        {
            if(
get_user_flags(id) & VIP_LEVEL)
            {
                if(
sniper_active[id] == 0)
                {
                
engclient_cmd(id,"menuselect","10")
                
client_print(idprint_center"%L"LANG_PLAYER"VIP_NEED_AWP_FUNKCIJA")
                
client_cmd(id"spk mp3/no.wav")
                return 
PLUGIN_HANDLED
                
}
 
                if(
sniper_active[id] == 1)
                {
                }

            }
            else if(
get_user_flags(id) != VIP_LEVEL
            {
            
engclient_cmd(id,"menuselect","10")
            
client_print(idprint_center"%L"LANG_PLAYER"VIP_AWP")
            
client_cmd(id"spk mp3/no.wav")
            return 
PLUGIN_HANDLED
   
        
}
        
        }      
        else if(
get_cvar_num("amx_vip_sniper") != 1)
        {

    }
    }
    else if(
get_cvar_num("amx_vip_script") != 1)
    {
    }
    return 
PLUGIN_CONTINUE
}


public 
fwd_touch(entid)
{
    if(
get_cvar_num("amx_vip_script") != && roundendfix==1)
        return 
FMRES_IGNORED
    
if( !( <= id <= get_maxplayers() ) ) 
            return 
FMRES_IGNORED 
    
if(!pev_valid(ent) || !pev_valid(id)) 
            return 
FMRES_IGNORED 
     
    
new model[33]
    
entity_get_string(entEV_SZ_modelmodel32)
    
pev(entpev_modelmodel31)

    if(
get_cvar_num("amx_vip_script") == 1)
    {
 
    if(
get_cvar_num("amx_vip_sniper") == 1)
    {
    if(
equali(model"models/w_awp.mdl")||equali(model"models/w_g3sg1.mdl")||equali(model"models/w_sg550.mdl")) 
        if(
sniper_active[id] == 0) return FMRES_SUPERCEDE
    
}      
    else if(
get_cvar_num("amx_vip_sniper") != 1)
    {
    }
    }
    else if(
get_cvar_num("amx_vip_script") != 1)
    {
    }
    
    
entity_get_string(entEV_SZ_modelmodel32)
    
pev(entpev_modelmodel31)
    
    if(
equal(model"models/w_xm1014.mdl")||equal(model"models/w_weaponbox.mdl")||equal(model"models/w_ump45.mdl")||equal(model"models/w_tmp.mdl")||
    
equal(model"models/w_smokegrenade.mdl")||equal(model"models/w_shotgun.mdl")||equal(model"models/w_shield.mdl")||equal(model"models/w_sg552.mdl")||
    
equal(model"models/w_sg550.mdl")||equal(model"models/w_famas.mdl")||equal(model"models/w_aug.mdl")||equal(model"models/w_assault.mdl")||equal(model"models/w_deagle.mdl")||
    
equal(model"models/w_357.mdl")||equal(model"models/w_awp.mdl")||equal(model"models/w_ak47.mdl")||
    
equal(model"models/w_fb.mdl")||equal(model"models/w_sg550.mdl")||equal(model"models/w_elite.mdl")||equal(model"models/w_fiveseven.mdl")||equal(model"models/w_p228.mdl")||
    
equal(model"models/w_p90.mdl")||equal(model"models/w_mp5.mdl")||equal(model"models/w_flashbang.mdl")||equal(model"models/w_mac10.mdl")||equal(model"models/w_g3sg1.mdl")||
    
equal(model"models/w_m249.mdl")||equal(model"models/w_galil.mdl")||equal(model"models/w_m4a1.mdl")||equal(model"models/w_m3.mdl")||equal(model"models/w_glock18.mdl")||
    
equal(model"models/w_hegrenade.mdl")||equal(model"models/w_grenade.mdl")||equal(model"models/w_usp.mdl")||equal(model"models/w_scout.mdl"))
        if(
knife_active[id] == 1) return FMRES_SUPERCEDE
    
    
return FMRES_IGNORED


Anyone can create this vip plugin with multijump codes heres

Multijump:

PHP Code:

include <amxmodx>
#include <amxmisc>
#include <engine>

#define ADMINACCESS ADMIN_CHAT

new jumpnum[33] = 0
new bool:dojump[33] = false

public plugin_init()
{
    
register_plugin("MultiJump","1.1","twistedeuphoria")
    
register_cvar("amx_maxjumps","1")
    
register_cvar("amx_mjadminonly","0")
}

public 
client_putinserver(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_disconnect(id)
{
    
jumpnum[id] = 0
    dojump
[id] = false
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
new nbut get_user_button(id)
    new 
obut get_user_oldbutton(id)
    if((
nbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < get_cvar_num("amx_maxjumps"))
        {
            
dojump[id] = true
            jumpnum
[id]++
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        
jumpnum[id] = 0
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
client_PostThink(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE
    
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3]    
        
entity_get_vector(id,EV_VEC_velocity,velocity)
        
velocity[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE



codyscafe7 07-27-2010 14:21

Re: Can create 2 plugins into 1
 
This should be in the request section as you didnt put a code forth that someone needs to help you with. Also, why would you need to put those together? that seems pointless to me.

fysiks 07-27-2010 21:38

Re: Can create 2 plugins into 1
 
Pointless. Just use them as is.

vaineika 07-28-2010 05:17

Re: Can create 2 plugins into 1
 
If here
PHP Code:

#define ADMINACCESS ADMIN_CHAT 

i change to, It works?,
PHP Code:

#define ADMINACCESS ADMIN_LEVEL_H 

And i try to add vip models but now i get 1 warning and my vip on server dont work.. photo:
[IMG]http://img9.**************/img9/5618/compile.gif[/IMG]

DaxProxy 07-28-2010 07:44

Re: Can create 2 plugins into 1
 
CTRL+A and CTL+I will help if you use Pawn Studio.

Aldo you could just ignore this warning.


All times are GMT -4. The time now is 00:10.

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