AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   JailBreak Glow Menu (https://forums.alliedmods.net/showthread.php?t=107888)

izzle 10-31-2009 16:33

JailBreak Glow Menu
 
1 Attachment(s)
JailBreak Glow Menu

Description:
Just a simple plugin that allows CTs to type /glow and a list of all the alive terrorist will appear, then they can then select a terrorist to have a freeday!

Change Log:
1.0
Initial release
1.1
Says who gave who a freeday
Uses set_user_rendering()

Credits:
Javivi
- Changed to set_user_rendering()

DruGzOG 10-31-2009 16:52

Re: JailBreak Glow Menu
 
nice plugin, but at the same time abusive >.>

dudeno 10-31-2009 19:34

Re: JailBreak Glow Menu
 
I think it would be nice to add a feature like where the CTs can put to a vote about the said person getting free day, Would be a good and bad idea cause some CTs might use it to make sure ppl dont get free days

Starsailor 10-31-2009 20:16

Re: JailBreak Glow Menu
 
set_user_rendering from fun module is faster than fakemeta conversion

DruGzOG 10-31-2009 20:29

Re: JailBreak Glow Menu
 
Quote:

Originally Posted by dudeno (Post 977162)
I think it would be nice to add a feature like where the CTs can put to a vote about the said person getting free day, Would be a good and bad idea cause some CTs might use it to make sure ppl dont get free days

Then it would end up being a chaotic server.

It's best if the CT has a time interval on how many the player can glow on

stevenisecko138 10-31-2009 23:56

Re: JailBreak Glow Menu
 
Quote:

Originally Posted by DruGzOG (Post 977029)
nice plugin, but at the same time abusive >.>

yep what he said maybe there can be a feature that ties with a vote of some kind

wahmeng 11-01-2009 00:09

Re: JailBreak Glow Menu
 
Okay. this is what i found. >> glow doesnt stop when round end

Arkshine 11-01-2009 06:21

Re: JailBreak Glow Menu
 
Use set_user_rendering() from fun and not fm_set_rendering(), it's more efficient.

Javivi 11-01-2009 06:26

Re: JailBreak Glow Menu
 
Try with this
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("JailBreak Glow Menu""1.1""izzle")
    
register_clcmd"say /glow","JBGlowMenu");
    
register_clcmd"say_team /glow","JBGlowMenu");
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
fw_PlayerSpawn_Post(id)
{
    
set_user_rendering(id)    
}

public 
JBGlowMenu(id)
{
    if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))
    { 
        return 
PLUGIN_HANDLED;
    }
    new 
menu menu_create("\rJB Glow Menu:""sub_menu");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"a");
    
    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
sub_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 
tempid str_to_num(data);
    new 
szName[32], szName2[32];
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_user_rendering(tempidkRenderFxGlowShell2551400kRenderNormal20)
    
set_hudmessage(02550)
    
show_hudmessage(0"[JBGM] %s gave a freeday to %s^n and is now glowing!"szNameszName2);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;



@izzle

Remove fakemeta and add fun

And change fm_set_user_rendering to set_user_rendering

To remove the glow, you can use set_user_rendering(id)




Nice plugin.

izzle 11-01-2009 07:32

Re: JailBreak Glow Menu
 
Quote:

Originally Posted by wahmeng (Post 977425)
Okay. this is what i found. >> glow doesnt stop when round end

It stops for me

Quote:

Originally Posted by Javivi (Post 977779)
Try with this
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("JailBreak Glow Menu""1.1""izzle")
    
register_clcmd"say /glow","JBGlowMenu");
    
register_clcmd"say_team /glow","JBGlowMenu");
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
fw_PlayerSpawn_Post(id)
{
    
set_user_rendering(id)    
}

public 
JBGlowMenu(id)
{
    if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))
    { 
        return 
PLUGIN_HANDLED;
    }
    new 
menu menu_create("\rJB Glow Menu:""sub_menu");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"a");
    
    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
sub_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 
tempid str_to_num(data);
    new 
szName[32], szName2[32];
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_user_rendering(tempidkRenderFxGlowShell2551400kRenderNormal20)
    
set_hudmessage(02550)
    
show_hudmessage(0"[JBGM] %s gave a freeday to %s^n and is now glowing!"szNameszName2);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;



@izzle

Remove fakemeta and add fun

And change fm_set_user_rendering to set_user_rendering

To remove the glow, you can use set_user_rendering(id)




Nice plugin.

Thank you


All times are GMT -4. The time now is 23:51.

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