AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   adding glow to a weapon (https://forums.alliedmods.net/showthread.php?t=13939)

nightscreem 06-03-2005 18:32

adding glow to a weapon
 
is it possible to set glow on a weapon like around a knife i want a red glow in all views
i have to know that it is possible

sh0rtbus 06-04-2005 03:27

OK... lol its possible satisfied :P

nightscreem 06-04-2005 18:17

and with what code can it just be done with
set_rendering or set_user_rendering

n0obie4life 06-04-2005 23:06

Quote:

Originally Posted by sh0rtbus
OK... lol its possible satisfied :P

yeah we sure do if it is or not. you don't have to spam around.

sh0rtbus 06-04-2005 23:15

Arnt you mr. high and mighty i dont see any sort of high tag on you maybe you should stfu and pull that head out of your ass.

nightscreem 06-05-2005 05:26

pls stop with those stupid posts
I need help

nightscreem 06-07-2005 16:34

someone this is not a spam

need help pls need to know if it is possible and
how i can do it

XunTric 06-11-2005 18:06

set_rendering instead of set_user_rendering,
and your weapon, probably light saber, as index instead of id?

Ares0016 11-29-2005 22:17

Can anyone help me plz
ps im a noob at amxx coding but i have used amxx for like 1.5 years
also my cs name is mlm0l0mlmT16


Code:
/*  *  Name: Knife Glow  *  Date: Feb. 21, 2005  *  *  Description: This will make the person's knife glow diffrent colors  *             *         *           *  *  Usage:      *  *  *  Other notes: Credit goes to v3x for the original code  *           Genisis helped alot by shortining/fixing the code  *           Then mlm0l0mlmT16 converted it in to knife glow  *  *  To do:  *   - Nothing  */ #include <amxmodx> #include <cstrike> #include <fun> #define PLUGIN    "Knife Glow" #define AUTHOR    "mlm0l0mlmT16, v3x, genisis" #define VERSION    "1" //                      R    G    B    A new iColorblue[4]   = { 000, 000, 255, 255 } new iColorgreen[4]  = { 000, 255, 000, 255 } new iColorred[4]    = { 255, 000, 000, 255 } new iColorpurple[4] = { 255, 000, 255, 255 } new iColororange[4] = { 255, 125, 000, 255 } new iColoryellow[4] = { 255, 255, 000, 255 } public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("CurWeapon", "check_weapons", "be")     register_cvar("knife_blue", "1")     register_cvar("knife_green", "1")     register_cvar("knife_red", "1")     register_cvar("knife_purple", "1")     register_cvar("knife_orange", "1")     register_cvar("knife_yellow", "1") } public blue_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColorblue[0], iColorblue[1], iColorblue[2],  kRenderNormal, iColorblue[3] )         }     return PLUGIN_CONTINUE } public green_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColorgreen[0], iColorgreen[1], iColorgreen[2],  kRenderNormal, iColorgreen[3] )         }     return PLUGIN_CONTINUE } public red_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColorred[0], iColorred[1], iColorred[2],  kRenderNormal, iColorred[3] )         }     return PLUGIN_CONTINUE } public purple_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColorpurple[0], iColorpurple[1], iColorpurple[2],  kRenderNormal, iColorpurple[3] )         }     return PLUGIN_CONTINUE } public orange_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColororange[0], iColororange[1], iColororange[2],  kRenderNormal, iColororange[3] )         }     return PLUGIN_CONTINUE } public yellow_knifeglow(id) {             {               set_rendering( id, kRenderFxGlowShell, iColoryellow[0], iColoryellow[1], iColoryellow[2],  kRenderNormal, iColoryellow[3] )         }     return PLUGIN_CONTINUE } public check_weapons( id ) {     new clip, ammo     new weapon = get_user_weapon( id, clip, ammo )         if((get_cvar_num("knife_blue") == 1))         if(weapon == CSW_KNIFE)             blue_knifeglow(id)     if((get_cvar_num("knife_green") == 1))         if(weapon == CSW_KNIFE)             green_knifeglow(id)         if((get_cvar_num("knife_red") == 1))         if(weapon == CSW_KNIFE)             red_knifeglow(id)     if((get_cvar_num("knife_purple") == 1))         if(weapon == CSW_KNIFE)             purple_knifeglow(id)       if((get_cvar_num("knife_orange") == 1))         if(weapon == CSW_KNIFE)             orange_knifeglow(id)     if((get_cvar_num("knife_yellow") == 1))         if(weapon == CSW_KNIFE)             yellow_knifeglow(id)     return PLUGIN_CONTINUE }

Peli 11-29-2005 23:28

Hmm curious to why you're using :
Code:
get_cvar_float()
Can't you just use :
Code:
get_cvar_num()
Since you registered it as a number it isn't a float and can't be unless you change it. Well if you're new, get_cvar_num() gets numbers, while get_cvar_float() gets floats, hope that helps.


All times are GMT -4. The time now is 16:36.

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