Raised This Month: $ Target: $400
 0% 

Help me With Plugin scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 01-21-2005 , 08:51   Help me With Plugin scripting
Reply With Quote #1

I ported the admin glow plugin from f117bomb and I'm having the problem where I can't make it so when they switch weapons the glow stays on..... I looked at other glowing plugins like EKS one but it has the same result.

Here is the .sma
Code:
/* AMX Mod script. * * (c) Copyright 2002-2003, f117bomb * This file is provided as is (no warranties). */   #include <amxmodx> #include <amxmisc> #include <fun> /* * Usage: amx_glow <authid, nick, @team or #userid> <red> <green> <blue> <alpha> * Examples: * amx_glow @CT 100 100 100 20 * amx_glow @TERRORIST 255 0 0 30 * amx_glow #213 255 255 255 0 * amx_glow Tom 0 0 0 255 - removes glowing * */ public admin_glow(id,level,cid) {    if (!cmd_access(id,level,cid,6))       return PLUGIN_HANDLED    new arg[32], sred[8], sgreen[8], sblue[8], salpha[8], name2[32]    get_user_name(id,name2,31)    read_argv(1,arg,31)    read_argv(2,sred,7)    read_argv(3,sgreen,7)        read_argv(4,sblue,7)        read_argv(5,salpha,7)        new ired = str_to_num(sred)    new igreen = str_to_num(sgreen)    new iblue = str_to_num(sblue)    new ialpha = str_to_num(salpha)        if (arg[0]=='@'){       new players[32], inum       get_players(players,inum,"ae",arg[1])       if (inum==0){          console_print(id,"No clients in such team")          return PLUGIN_HANDLED       }       for(new a=0;a<inum;++a)          set_user_rendering(players[a],kRenderFxGlowShell,             ired,igreen,iblue,kRenderTransAlpha,ialpha)       switch(get_cvar_num("amx_show_activity")) {     case 2: client_print(0,print_chat,"ADMIN %s: set glowing on all %s",name2,arg[1])     case 1: client_print(0,print_chat,"ADMIN: set glowing on all %s",arg[1])       }       console_print(id,"All clients have set glowing")    }    else {       new player = cmd_target(id,arg,7)       if (!player) return PLUGIN_HANDLED       set_user_rendering(player,kRenderFxGlowShell,          ired,igreen,iblue,kRenderTransAlpha,ialpha)       new name[32]       get_user_name(player,name,31)       switch(get_cvar_num("amx_show_activity")) {     case 2: client_print(0,print_chat,"ADMIN %s: set glowing on %s",name2,name)     case 1: client_print(0,print_chat,"ADMIN: set glowing on %s",name)       }       console_print(id,"Client ^"%s^" has set glowing",name)    }    return PLUGIN_HANDLED   } public plugin_init() {      register_plugin("Admin Glow","0.9.3","f117bomb")      register_concmd("amx_glow","admin_glow",ADMIN_LEVEL_A,"<authid, nick, @team or #userid> <red> <green> <blue> <alpha>")      return PLUGIN_CONTINUE   }
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
Votorx
Senior Member
Join Date: Jun 2004
Old 01-21-2005 , 12:01  
Reply With Quote #2

Make an event for when a player changes their weapon and if they had glow on before they switched weapons turn glow on again, if not then leave it as it was. Use the search if you don't know how or which event to use, there's alot.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
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 19:25.


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