Raised This Month: $51 Target: $400
 12% 

Admin FF (updated) Version 1.2


Post New Thread Reply   
 
Thread Tools Display Modes
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 07-26-2005 , 14:49  
Reply With Quote #11

Got IT!
Code:
#include <amxmodx> new friendlyfire_cvar[16] public admin_ff(id,level){     if (!(get_user_flags(id)&level)){         console_print(id,"[AMXX] You have no access to that command.")         return PLUGIN_HANDLED     }     if (read_argc() < 2){             new ff_cvar = get_cvar_num("mp_friendlyfire")                     console_print(id,"[AMXX] ^"mp_friendlyfire^" is %s", ff_cvar ? "ON" : "OFF")             return PLUGIN_HANDLED     }     new ff_s[2]     read_argv(1,ff_s,2)     new ff = str_to_num(ff_s)     if(ff == 1) {         server_cmd("mp_friendlyfire 1")         console_print(id,"[AMXX] Friendly fire is now on")         client_print(0, print_chat, "[AMXX] Friendly fire is now on")         set_hudmessage(0,255,0, -1.0, 0.25, 2, 0.02, 7.0, 0.01, 0.1, 2)         show_hudmessage(0,"Friendly fire is ON! Watch your fire! ^n Your teammates are counting on you to actually aim!")     }     else if(ff == 0) {         server_cmd("mp_friendlyfire 0")         console_print(id,"[AMXX] Friendly fire is now off")         client_print(0, print_chat, "[AMXX] Friendly Fire is now OFF!")         set_hudmessage(0,255,0, -1.0, 0.25, 2, 0.02, 7.0, 0.01, 0.1, 2)         show_hudmessage(0,"Friendly fire is OFF. ^n Go ahead, shoot your partner.")     }     return PLUGIN_HANDLED } public HandleSay(id) {     new Speech[192]     read_args(Speech,192)     remove_quotes(Speech)     if (containi(Speech, "ff")!=-1) {         get_cvar_string("mp_friendlyfire",friendlyfire_cvar,16)         set_hudmessage(0,255,0, -1.0, 0.25, 2, 0.02, 7.0, 0.01, 0.1, 2)         if (str_to_num (friendlyfire_cvar) == 1){             show_hudmessage(0,"Friendly fire is on!")             client_print(0,print_chat,"Friendly fire is ON!")      } else {             show_hudmessage(0,"Friendly fire is off.")             client_print(0,print_chat,"Friendly fire is OFF!")    }     }     return PLUGIN_CONTINUE } public plugin_init(){     register_plugin("Admin FF","0.21","JustinHoMi")     register_concmd("amx_ff","admin_ff",ADMIN_CVAR,"< 0/1 >")     register_clcmd("say","HandleSay")     return PLUGIN_CONTINUE }

Thankx for your help TImberlin, i got it figured out tho, i guess what i was sayin was when you type ff i wanted it to say FF is ON right above where he typed it (say). Its Great, this was all i was missing ona ff server. THankx Alot!
__________________
bmann_420 is offline
Demoz123
Member
Join Date: Jul 2008
Location: USA, California, Brea
Old 07-14-2008 , 14:16   Re: Admin FF (updated) Version 1.2
Reply With Quote #12

I might try it TY
__________________
Demoz123 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 09:02.


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