AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   team color glow (https://forums.alliedmods.net/showthread.php?t=127850)

FlyingHorse 05-25-2010 14:51

team color glow
 
Hey.. How do i set team color glow of the one who dropped it? (Red for t and blue for cts) ..
PHP Code:

public menu5(id)
{
    new 
menu menu_create("\yChoose victim""submenu5");
    new 
name[33]
    
get_user_name(idname32)
     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_CT)
        {

            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
ColorChat(0RED"%s^x04 %s^x01 wants a^x04 Gun Toss^x01."szPREFIXname)
    
ColorChat(0RED"%s^x04 %s^x01 wants a^x04 Gun Toss^x01."szPREFIXname)
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu5(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);
    
strip_user_weapons(tempid);
    
strip_user_weapons(id)
    
set_user_health(tempid100);
    
set_user_health(id100)
    
give_itemid"weapon_knife" );
    
cs_set_weapon_ammo(give_item(id"weapon_deagle"), 0)
    
cs_set_user_bpammo(idCSW_DEAGLE0)
    
give_itemtempid"weapon_knife" );
    
cs_set_weapon_ammo(give_item(tempid"weapon_deagle"), 0)
    
cs_set_user_bpammo(tempidCSW_DEAGLE0)

    new 
szName[32], szName2[32]
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
ColorChat(0RED"%s^x04 %s^x01 selected^x04 %s^x01."szPREFIXszNameszName2);

    if( 
is_user_alive(tempid) )
    {
        
set_user_health(tempid100);
        
set_task(0.5"fw_model"id)
        
set_task(0.5"fw_model"tempid)
        
set_task(0.1"beacon"id)
        
set_task(0.1"beacon"tempid)
        
menu_destroy(menu);
        
lr_started true
    
}
    return 
PLUGIN_HANDLED;



And heres the glow function that i'd like to work with the menu5 function ..

PHP Code:

public fw_modelentModel[] )
{
    if( !
pev_valident) )
    {
        return 
FMRES_IGNORED
    
}
    if (
equal(Model"models/w_deagle.mdl"))
    
fm_set_renderingentkRenderFxGlowShell2550)
    return 
FMRES_IGNORED
}
fm_set_renderingentfx kRenderFxNonergbmode=kRenderNormalamount 16 )
{
    static 
Float:RenderColor
    
RenderColor] = float)
    
RenderColor] = float)
    
RenderColor] = float)
    
set_peventpev_renderfxfx )
    
set_peventpev_rendercolorRenderColor )
    
set_peventpev_rendermodemode )
    
set_peventpev_renderamtfloatamount ) )



#8 SickneSS 05-25-2010 14:52

Re: team color glow
 
http://forums.alliedmods.net/showthread.php?p=92358

FlyingHorse 05-25-2010 15:42

Re: team color glow
 
i dont want another plugin.. If i did i would have told u that.. i only want team color glow in my last request gun toss plugin..

wrecked_ 05-25-2010 15:44

Re: team color glow
 
Code:
register_clcmd( "drop", "CmdDrop" ) public CmdDrop( id ) {     // drop command has been issued }

FlyingHorse 05-26-2010 08:23

Re: team color glow
 
Wrecked that doesnt help me to set glow xD ... I just want a code to set glow on the deagle when dropped

#8 SickneSS 05-26-2010 08:31

Re: team color glow
 
I Think you need to use event current weapon

FlyingHorse 05-26-2010 11:04

Re: team color glow
 
I've tried everything.. Sorry, but i don't need tips, I need the code for this.. I have no idea on how to do it

wrecked_ 05-26-2010 15:31

Re: team color glow
 
Quote:

Originally Posted by FlyingHorse (Post 1191603)
Wrecked that doesnt help me to set glow xD ... I just want a code to set glow on the deagle when dropped

...

Code:
public CmdDrop( id ) {     new iWep = get_user_weapon( id )     // rendering shit on iWep }

If you wanted someone else to do this for you, it should've been posted in Suggestions & Requests; too late now, though.

drekes 05-27-2010 23:10

Re: team color glow
 
i tried with this, but it doesn't work:
PHP Code:

public cmd_drop(id)
{
    new 
wpn get_user_weapon(id)

    if(
wpn == CSW_DEAGLE && deagleglow)
    {
        if(
get_user_team(id) == 1)
            
trail(wpnbeacon_sprite50525500255)

        else
            
trail(wpnbeacon_sprite50500255255)
    }
    return 
PLUGIN_CONTINUE


When i use Fw_SetModel, it works, but it trails all the time and i don't know how to find the owner to check the team.

Exolent[jNr] 05-27-2010 23:27

Re: team color glow
 
Quote:

Originally Posted by drekes (Post 1193126)
i don't know how to find the owner to check the team.

pev_owner
get_user_team


All times are GMT -4. The time now is 05:20.

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