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

Please help me[AmxModX]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RazzyxDkilL
Junior Member
Join Date: Mar 2014
Old 03-08-2014 , 07:13   Please help me[AmxModX]
Reply With Quote #1

Hi.I am a scriper begginer.I got a problem with a VipMenu For HNS plugin.So please Help me and tell me what's wrong.And please make it call Only 1 Time per Round.Thanks!
http://www.fileshare.ro/e30327428 Link For sma.
Or Here's the Code:
P.S: It's in romanian.

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <colorchat>

#define PLUGIN "MeniuVipHns"
#define VERSION "1.0"
#define AUTHOR "LordTrick"

new const DGLW4[ ] = "weapon_deagle"
new const SMKW4[ ] = "weapon_smokegrenade"
new const FLSH4[ ] = "weapon_flashbang"
new const HESH4[ ] = "weapon_hegrenade"
new const AWPW4[ ] = "weapon_awp"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say_team /vipmenula", "vip_menu")
}

public vip_menu(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
new menu = menu_create("\w[VIP]Alege Ce Vrei!", "vip_menu_t")
menu_additem(menu, "Viata 200", "1", ADMIN_LEVEL_H)
menu_additem(menu, "Deagle 1 Glont", "2", ADMIN_LEVEL_H)
menu_additem(menu, "Smoke+Flash+He", "3", ADMIN_LEVEL_H)
menu_additem(menu, "GodMode 5 Secunde", "4", ADMIN_LEVEL_H)
menu_additem(menu, "Viteza 400 5 Secunde", "5", ADMIN_LEVEL_H)
}
else if(cs_get_user_team(id) == CS_TEAM_CT)
{
new menu = menu_create("\w[VIP]Alege Ce Vrei!", "vip_menu_ct")
menu_additem(menu, "Deagle 2 Gloante", "1", ADMIN_LEVEL_H)
menu_additem(menu, "AWP 1 Glont", "2", ADMIN_LEVEL_H)
menu_additem(menu, "Smoke+Flash+He", "3", ADMIN_LEVEL_H)
menu_additem(menu, "GodMode 10 Secunde", "4", ADMIN_LEVEL_H)
menu_additem(menu, "Gravitatie 10 Secunde", "5", ADMIN_LEVEL_H)
}
}

public vip_menu_t(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
set_user_health(id, 200)
ColorChat(id, RED, "^x01 Vip-ul ^x03 %s ^x01 A cumparat viata!",szAuthName)
}
}
else ColorChat(id, RED, "^x01 Trebuie sa fi ^x03 Vip ^x01 Ca sa folosesti aceasta comanda!")
}
case 2:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
give_item(id,DGLW4);
new gL_DGLW4 = find_ent_by_owner(-1,DGLW4,id);
cs_set_weapon_ammo(gL_DGLW4, 1);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!")
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 3:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
give_item(id,SMKW4);
give_item(id,FLSH4);
give_item(id,HESH4);
new gL_SMKW4 = find_ent_by_owner(-1,SMKW4,id);
new gL_FLSH4 = find_ent_by_owner(-1,FLSH4,id);
new gL_HESH4 = find_ent_by_owner(-1,HESH4,id);
cs_set_weapon_ammo(gL_SMKW4, 1);
cs_set_weapon_ammo(gL_FLSH4, 1);
cs_set_weapon_ammo(gL_HESH4, 1);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 4:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
set_user_godmode(id, 1)
set_task(5.0, "opreste_godmode", 1);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 5:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
set_user_maxspeed(id, 400.0)
set_task(5.0, "opreste_viteza", 1);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat viteza!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
}
menu destroy(menu);
return PLUGIN_HANDLED;
}

public vip_menu_ct(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
give_item(id,DGLW4);
new gL_DGLW4 = find_ent_by_owner(-1,DGLW4,id);
cs_set_weapon_ammo(gL_DGLW4, 2);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 2:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
give_item(id,AWPW4);
new gL_AWPW4 = find_ent_by_owner(-1,AWPW4,id);
cs_set_weapon_ammo(gL_AWPW4, 1);
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 AWP!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 3:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
give_item(id,SMKW4);
give_item(id,FLSH4);
give_item(id,HESH4);
new gL_SMKW4 = find_ent_by_owner(-1,SMKW4,id);
new gL_FLSH4 = find_ent_by_owner(-1,FLSH4,id);
new gL_HESH4 = find_ent_by_owner(-1,HESH4,id);
cs_set_weapon_ammo(gL_SMKW4, 1)
cs_set_weapon_ammo(gL_FLSH4, 2)
cs_set_weapon_ammo(gL_HESH4, 1)
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
case 4:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
set_user_godmode(id, 1)
set_task(10.0, "opreste_godmode", 1)
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 GodMode!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x01 Ca sa poti folosi meniul!")
}
case 5:
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szAuthName[33]
get_user_name(id,szAuthName,32)
set_user_gravity(id,0.
set_task(10.0, "opreste_gravitatia", 1)
ColorChat(0, RED, "^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
}
else ColorChat(id, RED, "^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}

public opreste_godmode(id)
{
set_user_godmode(id, 0)
ColorChat(id, RED, "^x01 Gata Cu GodMod-ul!Revii la cea normala!")
}

public opreste_viteza(id)
{
set_user_maxspeed(id, 1.0)
ColorChat(id, RED, "^x01 Gata Cu Viteza!Revii la cea normala!")
}

public opreste_gravitatia(id)
{
set_user_gravity(id, 1.0)
ColorChat(id, RED, "^x01 Gata Cu Gravitatia!Revii la cea normala!")
}

Last edited by RazzyxDkilL; 03-08-2014 at 11:36.
RazzyxDkilL is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-08-2014 , 07:21   Re: Please help me[AmxModX]
Reply With Quote #2

Post the code in [PHP] or [CODE] tags.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
RazzyxDkilL
Junior Member
Join Date: Mar 2014
Old 03-08-2014 , 08:09   Re: Please help me[AmxModX]
Reply With Quote #3

How do i post it in [PHP] or [CODE]?
RazzyxDkilL is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-08-2014 , 15:32   Re: Please help me[AmxModX]
Reply With Quote #4

Errors removed, try and remove the warnings, it's easy just some spacing

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <colorchat>

#define PLUGIN "MeniuVipHns"
#define VERSION "1.0"
#define AUTHOR "LordTrick"

new const DGLW4[ ] = "weapon_deagle"
new const SMKW4[ ] = "weapon_smokegrenade"
new const FLSH4[ ] = "weapon_flashbang"
new const HESH4[ ] = "weapon_hegrenade"
new const AWPW4[ ] = "weapon_awp"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say_team /vipmenula""vip_menu")
}

public 
vip_menu(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        new 
menu menu_create("\w[VIP]Alege Ce Vrei!""vip_menu_t")
        
menu_additem(menu"Viata 200""1"ADMIN_LEVEL_H)
        
menu_additem(menu"Deagle 1 Glont""2"ADMIN_LEVEL_H)
        
menu_additem(menu"Smoke+Flash+He""3"ADMIN_LEVEL_H)
        
menu_additem(menu"GodMode 5 Secunde""4"ADMIN_LEVEL_H)
        
menu_additem(menu"Viteza 400 5 Secunde""5"ADMIN_LEVEL_H)
    }
    else if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        new 
menu menu_create("\w[VIP]Alege Ce Vrei!""vip_menu_ct")
        
menu_additem(menu"Deagle 2 Gloante""1"ADMIN_LEVEL_H)
        
menu_additem(menu"AWP 1 Glont""2"ADMIN_LEVEL_H)
        
menu_additem(menu"Smoke+Flash+He""3"ADMIN_LEVEL_H)
        
menu_additem(menu"GodMode 10 Secunde""4"ADMIN_LEVEL_H)
        
menu_additem(menu"Gravitatie 10 Secunde""5"ADMIN_LEVEL_H)
    }
}

public 
vip_menu_t(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
         
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
         new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_health(id200)
                
ColorChat(idRED"^x01 Vip-ul ^x03 %s ^x01 A cumparat viata!",szAuthName)        
            }
            else 
ColorChat(idRED"^x01 Trebuie sa fi ^x03 Vip ^x01 Ca sa folosesti aceasta comanda!")
        }
    case 
2:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
give_item(id,DGLW4);
            new 
gL_DGLW4 find_ent_by_owner(-1,DGLW4,id);
            
cs_set_weapon_ammo(gL_DGLW41);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!")
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
3:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
give_item(id,SMKW4);
            
give_item(id,FLSH4);
            
give_item(id,HESH4);
            new 
gL_SMKW4 find_ent_by_owner(-1,SMKW4,id);
            new 
gL_FLSH4 find_ent_by_owner(-1,FLSH4,id);
            new 
gL_HESH4 find_ent_by_owner(-1,HESH4,id);
            
cs_set_weapon_ammo(gL_SMKW41);
            
cs_set_weapon_ammo(gL_FLSH41);
            
cs_set_weapon_ammo(gL_HESH41);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
4:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
set_user_godmode(id1)
            
set_task(5.0"opreste_godmode"1);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
5:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
set_user_maxspeed(id400.0)
            
set_task(5.0"opreste_viteza"1);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat viteza!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    }
    
menu_destroy(menu);
         return 
PLUGIN_HANDLED;
}

public 
vip_menu_ct(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,DGLW4);
                new 
gL_DGLW4 find_ent_by_owner(-1,DGLW4,id);
                
cs_set_weapon_ammo(gL_DGLW42);
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!",szAuthName)
            }    
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
2:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,AWPW4);
                new 
gL_AWPW4 find_ent_by_owner(-1,AWPW4,id);
                
cs_set_weapon_ammo(gL_AWPW41);
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 AWP!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
3:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,SMKW4);
                
give_item(id,FLSH4);
                
give_item(id,HESH4);
                new 
gL_SMKW4 find_ent_by_owner(-1,SMKW4,id);
                new 
gL_FLSH4 find_ent_by_owner(-1,FLSH4,id);
                new 
gL_HESH4 find_ent_by_owner(-1,HESH4,id);
                
cs_set_weapon_ammo(gL_SMKW41)
                
cs_set_weapon_ammo(gL_FLSH42)
                
cs_set_weapon_ammo(gL_HESH41)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
4:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_godmode(id1)
                
set_task(10.0"opreste_godmode"1)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 GodMode!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x01 Ca sa poti folosi meniul!")
        }
        case 
5:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_gravity(id,0.8)
                
set_task(10.0"opreste_gravitatia"1)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
opreste_godmode(id)
{
    
set_user_godmode(id0)
    
ColorChat(idRED"^x04 Gata Cu GodMod-ul!Revii la cea normala!")
}

public 
opreste_viteza(id)
{
    
set_user_maxspeed(id1.0)
    
ColorChat(idRED"^x04 Gata Cu Viteza!Revii la cea normala!")
}

public 
opreste_gravitatia(id)
{
    
set_user_gravity(id1.0)
    
ColorChat(idRED"^x04 Gata Cu Gravitatia!Revii la cea normala!")

__________________
Like my clean plugins and work?
Baws is offline
RazzyxDkilL
Junior Member
Join Date: Mar 2014
Old 03-09-2014 , 01:22   Re: Please help me[AmxModX]
Reply With Quote #5

Thanks, baws...It doesn't give me any error...but when i say the command doesn't give me the menu...

Last edited by RazzyxDkilL; 03-09-2014 at 01:31.
RazzyxDkilL is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-09-2014 , 12:51   Re: Please help me[AmxModX]
Reply With Quote #6

What about this: ( Fixed some stuff )
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <colorchat>

#define PLUGIN "MeniuVipHns"
#define VERSION "1.0"
#define AUTHOR "LordTrick"

new const DGLW4[ ] = "weapon_deagle"
new const SMKW4[ ] = "weapon_smokegrenade"
new const FLSH4[ ] = "weapon_flashbang"
new const HESH4[ ] = "weapon_hegrenade"
new const AWPW4[ ] = "weapon_awp"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /vipmenula""vip_menu")
    
register_clcmd("say_team /vipmenula""vip_menu")
}

public 
vip_menu(id)
{
    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED;
    
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        new 
menu1 menu_create("\w[VIP]Alege Ce Vrei!""vip_menu_t")
        
menu_additem(menu1"Viata 200""1"ADMIN_LEVEL_H)
        
menu_additem(menu1"Deagle 1 Glont""2"ADMIN_LEVEL_H)
        
menu_additem(menu1"Smoke+Flash+He""3"ADMIN_LEVEL_H)
        
menu_additem(menu1"GodMode 5 Secunde""4"ADMIN_LEVEL_H)
        
menu_additem(menu1"Viteza 400 5 Secunde""5"ADMIN_LEVEL_H)
    
        
menu_setprop(menu1MPROP_EXITNAME"Exit");

        
menu_display(idmenu1);
    }
    else if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        new 
menu2 menu_create("\w[VIP]Alege Ce Vrei!""vip_menu_ct")
        
menu_additem(menu2"Deagle 2 Gloante""1"ADMIN_LEVEL_H)
        
menu_additem(menu2"AWP 1 Glont""2"ADMIN_LEVEL_H)
        
menu_additem(menu2"Smoke+Flash+He""3"ADMIN_LEVEL_H)
        
menu_additem(menu2"GodMode 10 Secunde""4"ADMIN_LEVEL_H)
        
menu_additem(menu2"Gravitatie 10 Secunde""5"ADMIN_LEVEL_H)
    
        
menu_setprop(menu2MPROP_EXITNAME"Exit");

        
menu_display(idmenu2);
    }
}

public 
vip_menu_t(idmenu1item)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu1);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
         
menu_item_getinfo(menu1itemaccessdata,charsmax(data), szName,charsmax(szName), callback);
         new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_health(id200)
                
ColorChat(idRED"^x01 Vip-ul ^x03 %s ^x01 A cumparat viata!",szAuthName)        
            }
            else 
ColorChat(idRED"^x01 Trebuie sa fi ^x03 Vip ^x01 Ca sa folosesti aceasta comanda!")
        }
    case 
2:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
give_item(id,DGLW4);
            new 
gL_DGLW4 find_ent_by_owner(-1,DGLW4,id);
            
cs_set_weapon_ammo(gL_DGLW41);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!")
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
3:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
give_item(id,SMKW4);
            
give_item(id,FLSH4);
            
give_item(id,HESH4);
            new 
gL_SMKW4 find_ent_by_owner(-1,SMKW4,id);
            new 
gL_FLSH4 find_ent_by_owner(-1,FLSH4,id);
            new 
gL_HESH4 find_ent_by_owner(-1,HESH4,id);
            
cs_set_weapon_ammo(gL_SMKW41);
            
cs_set_weapon_ammo(gL_FLSH41);
            
cs_set_weapon_ammo(gL_HESH41);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
4:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
set_user_godmode(id1)
            
set_task(5.0"opreste_godmode"1);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    case 
5:
    {
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new 
szAuthName[33]
            
get_user_name(id,szAuthName,32)
            
set_user_maxspeed(id400.0)
            
set_task(5.0"opreste_viteza"1);
            
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat viteza!",szAuthName)
        }
        else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
    }
    }
    
menu_destroy(menu1);
         return 
PLUGIN_HANDLED;
}

public 
vip_menu_ct(idmenu2item)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu2);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menu2itemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,DGLW4);
                new 
gL_DGLW4 find_ent_by_owner(-1,DGLW4,id);
                
cs_set_weapon_ammo(gL_DGLW42);
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 Deagle!",szAuthName)
            }    
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
2:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,AWPW4);
                new 
gL_AWPW4 find_ent_by_owner(-1,AWPW4,id);
                
cs_set_weapon_ammo(gL_AWPW41);
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat un ^x04 AWP!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
3:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
give_item(id,SMKW4);
                
give_item(id,FLSH4);
                
give_item(id,HESH4);
                new 
gL_SMKW4 find_ent_by_owner(-1,SMKW4,id);
                new 
gL_FLSH4 find_ent_by_owner(-1,FLSH4,id);
                new 
gL_HESH4 find_ent_by_owner(-1,HESH4,id);
                
cs_set_weapon_ammo(gL_SMKW41)
                
cs_set_weapon_ammo(gL_FLSH42)
                
cs_set_weapon_ammo(gL_HESH41)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat pachetul de grenazi!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
        case 
4:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_godmode(id1)
                
set_task(10.0"opreste_godmode"1)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 GodMode!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x01 Ca sa poti folosi meniul!")
        }
        case 
5:
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
            {
                new 
szAuthName[33]
                
get_user_name(id,szAuthName,32)
                
set_user_gravity(id,0.8)
                
set_task(10.0"opreste_gravitatia"1)
                
ColorChat(0RED"^x01 VIP-ul ^x03 %s ^x01 A cumparat ^x04 Gravitatie!",szAuthName)
            }
            else 
ColorChat(idRED"^x04 Trebuie sa fi ^x03 VIP ^x04 Ca sa poti folosi meniul!")
        }
    }
    
menu_destroy(menu2);
    return 
PLUGIN_HANDLED;
}

public 
opreste_godmode(id)
{
    
set_user_godmode(id0)
    
ColorChat(idRED"^x04 Gata Cu GodMod-ul!Revii la cea normala!")
}

public 
opreste_viteza(id)
{
    
set_user_maxspeed(id1.0)
    
ColorChat(idRED"^x04 Gata Cu Viteza!Revii la cea normala!")
}

public 
opreste_gravitatia(id)
{
    
set_user_gravity(id1.0)
    
ColorChat(idRED"^x04 Gata Cu Gravitatia!Revii la cea normala!")

__________________
Like my clean plugins and work?
Baws is offline
RazzyxDkilL
Junior Member
Join Date: Mar 2014
Old 03-10-2014 , 09:09   Re: Please help me[AmxModX]
Reply With Quote #7

Thank's Baw!It works Now!
RazzyxDkilL is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-10-2014 , 17:10   Re: Please help me[AmxModX]
Reply With Quote #8

No problem <3
__________________
Like my clean plugins and work?
Baws is offline
Reply



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 05:54.


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