Raised This Month: $ Target: $400
 0% 

cvar not working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 05-31-2004 , 23:42  
Reply With Quote #2

I think it isn't working because you didn't show the cvar in your code , try this :
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> public plugin_init(){     register_plugin("Big Slap","0.0.1","Shibz")     register_concmd("amx_bslap","cmdSlap",ADMIN_SLAY,"<name or #userid> [power] [times]")     register_cvar("amx_bslaptime",".2") } public amx_bslaptime { //code here         return PLUGIN_HANDLED public cmdSlap(id,level,cid){     if (!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED     new arg[32]     read_argv(1,arg,31)     new player = cmd_target(id,arg,5)     if (!player) return PLUGIN_HANDLED     new spower[32],authid[32],name2[32],authid2[32],name[32],stimes[32]     read_argv(2,spower,31)     read_argv(3,stimes,3)     new damage = str_to_num(spower)     new times = str_to_num(stimes)     new Float:delay = get_cvar_num("amx_bslaptime")     new TaskParams[2]     TaskParams[0] = player     TaskParams[1] = damage     set_task(delay, "slap_player", 0, TaskParams, 2, "a", times)     get_user_authid(id,authid,31)     get_user_name(id,name,31)     get_user_authid(player,authid2,31)     get_user_name(player,name2,31)     log_amx("Cmd: ^"%s<%d><%s><>^" slap with %d damage %d times ^"%s<%d><%s><>^"",         name,get_user_userid(id),authid, damage, times,name2,get_user_userid(player),authid2 )           switch(get_cvar_num("amx_show_activity")) {     case 2: client_print(0,print_chat,"ADMIN %s: slap %s with %d damage %d times",name,name2,damage,times)     case 1: client_print(0,print_chat,"ADMIN: slap %s with %d damage %d times",name2,damage,times)     }                     console_print(id,"[AMXX] Client ^"%s^" slaped with %d damage %d times",name2,damage,times)       return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
 



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 14:36.


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