Raised This Month: $ Target: $400
 0% 

Ugh


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FlashB@nG
New Member
Join Date: May 2006
Old 05-06-2006 , 23:17   Ugh
Reply With Quote #1

Alright, The code works but not on admins with immunity and it shows in counsle "fun_godmode not found" or something like that.. here is code.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> public plugin_init() {     register_plugin("FunMod","0.1","FkashBanG")     register_concmd("fun_help","fun_help", ADMIN_KICK, " : FunMod Help")     register_concmd("fun_glow","glow", ADMIN_KICK, " <player name> : Makes client glow!")       register_concmd("fun_godmode","godmode", ADMIN_KICK, " <player name> : Makes user not die!") } public glow(id,level,cid) {     new arg[24]         read_argv(1,arg,23)     new player = cmd_target(id, arg, 1)     if(!cmd_access(id,level,cid,2))     {         return PLUGIN_HANDLED     }     set_user_rendering(player,kRenderFxGlowShell,144,255,142,kRenderFxNone,0)     client_print(0,print_center,"[FunMod] Client %s is glowing!",player)     return PLUGIN_CONTINUE } public godmode(id,level,cid) {     new arg[24]         read_argv(1,arg,23)     new player = cmd_target(id, arg, 1)     if(!cmd_access(id,level,cid,2))     {         return PLUGIN_HANDLED     }     if(get_user_godmode(player) == 1) {         client_print(player, print_center, "[FunMod] Godmode is already enabled!")     }     else     {         set_user_godmode(player, 1)         client_print(player, print_center, "[FunMod] You have godmode enabled!",player)     }     return PLUGIN_CONTINUE } public connect(id) {     new arg[24]     read_argv(1,arg,23)     new player = cmd_target(id, arg, 1)     if(is_user_connecting(player)) {         client_print(0, print_center, "Beware! %s is joining the server!", player)     }     return PLUGIN_CONTINUE } public fun_help(id,level,cid) {     if(!cmd_access(id,level,cid,2)) {         return PLUGIN_HANDLED     }     client_print(id,print_console,"Commands:")     client_print(id,print_console,"fun_glow")     client_print(id,print_console,"fun_godmode")     client_print(id,print_console,"fun_help")     return PLUGIN_HANDLED }
FlashB@nG is offline
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 05-07-2006 , 00:05  
Reply With Quote #2

Code:
new player = cmd_target(id, arg, 1)
Just to clear things up, that "1" is what flags you want, and according to the funcwiki:

Flags:
1 - obey immunity
2 - allow yourself
4 - must be alive
8 - can't be bot

That might explain why it doesnt work on admins with immunity.

And with:
Code:
public godmode(id,level,cid) {     new arg[24]           read_argv(1,arg,23)     new player = cmd_target(id, arg, 1)     if(!cmd_access(id,level,cid,2))     {         return PLUGIN_HANDLED     }     if(get_user_godmode(player) == 1) {         client_print(player, print_center, "[FunMod] Godmode is already enabled!")     }     else     {         set_user_godmode(player, 1)         client_print(player, print_center, "[FunMod] You have godmode enabled!",player)     }     return PLUGIN_CONTINUE }

If you change the very last return PLUGIN_CONTINUE to PLUGIN_HANDLED, I believe it should get rid of the "fun_godmode not found" in the console.
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
FlashB@nG
New Member
Join Date: May 2006
Old 05-07-2006 , 00:20  
Reply With Quote #3

LOL
Just realized that
sorry thanks!!
FlashB@nG 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 05:08.


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