Raised This Month: $ Target: $400
 0% 

Solved Pls add it as Menu via /glow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-05-2018 , 13:39   Pls add it as Menu via /glow
Reply With Quote #1

Hello, can anyone edit the plugin that u dont need to use the chat commands which are active... that u need to use only

/glow

-->> MENU

Glow Red
Glow Blue
Glow Green
Glow OFF

It would be friendly.

Code:
#include <amxmodx>
#include <fun>

#define user_vip(%1) (get_user_flags(%1) & ADMIN_RESERVATION)

public plugin_init()
{
    register_plugin("Glow", "1.0", "RuRuRu612754")
    register_clcmd("say /glow_blue", "glow_blue")
    register_clcmd("say /glow_green", "glow_green")
    register_clcmd("say /glow_red", "glow_red")
    register_clcmd("say /glow_off", "glow_off")
}

public glow_blue(id)
{
    if(user_vip(id))
    {
        set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 51)
    }
}

public glow_green(id)
{
    if(user_vip(id))
    {
        set_user_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 51)
    }
}

public glow_red(id)
{
    if(user_vip(id))
    {
        set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 51)
    }
}

public glow_off(id)
{
    if(user_vip(id))
    {
        set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 255)
    }
}

Last edited by Godofwar; 05-05-2018 at 15:28.
Godofwar is offline
spooky HL15
Member
Join Date: Oct 2015
Old 05-05-2018 , 15:06   Re: Pls add it as Menu via /glow
Reply With Quote #2

try this one
PHP Code:
#include <amxmodx>
#include <fun>

#define user_vip(%1) (get_user_flags(%1) & ADMIN_RESERVATION)

public plugin_init()
{
    
register_plugin("Glow menu""1.0""spooky")
    
register_clcmd("say /glow","glow_menu")
}
public 
glow_menu(id){
    if(
user_vip(id))
    {
    new 
menu menu_create("Glow menu:""menu_handler")
    
menu_additem(menu"Get blue glow""1")
    
menu_additem(menu"Get green glow""2")
    
menu_additem(menu"Get red glow^n""3")
    
menu_additem(menu"off glow""4")
        
    
menu_setprop(menuMPROP_EXITNAME"Exit")
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idmenu0)
    }
    
}
public 
menu_handler(idmenuitem
{
    new 
data[6], iName[64]
    new 
accescallback
    menu_item_getinfo
(menuitemaccesdata5iName63callback)
    
    new 
key str_to_num(data)
    switch(
key
    {
            case 
1set_user_rendering(idkRenderFxGlowShell00255kRenderNormal51)
            case 
2set_user_rendering(idkRenderFxGlowShell02550kRenderNormal51)
            case 
3set_user_rendering(idkRenderFxGlowShell25500kRenderNormal51)
            case 
4set_user_rendering(idkRenderFxGlowShell000kRenderNormal255)

        }
    return 
PLUGIN_HANDLED;

__________________
GK™
Website
spooky HL15 is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-05-2018 , 15:28   Re: Pls add it as Menu via /glow
Reply With Quote #3

Thank You. Works -. Thx
Godofwar 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 13:27.


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