Raised This Month: $ Target: $400
 0% 

Help needed for my plugin!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
chRm
Senior Member
Join Date: Sep 2005
Location: Cyprus
Old 11-09-2005 , 07:54   Help needed for my plugin!
Reply With Quote #1

I made a small plugin just to start learning small but I come against some problems with it, how can i check if pa_lol is set to 0 and then stop the message from appearing whenever i say lol ??

Here's the code:

Code:
/* Plugin generated by AMXX-Studio */ /* My first plugin ever!!! The commands are say lol - shows lol message pa_lol 1|0 - 1 acivates lol message, 0 disables pa_killswitch 1|0 - 1 activates kill, 0 disbles it */ #include <amxmodx> public plugin_init()     {     register_plugin("killer_lol_plug", "0.1 beta", "Panais")     register_clcmd ( "say lol", "saylol", 0,"displays lol function" )     register_cvar ( "pa_lol", "1")     register_cvar ("pa_killswitch", "1")     register_concmd("pa_kill","do_kill",ADMIN_LEVEL_C," Kills people ") } public saylol(id) {     if (get_cvar_num("pa_lol")==1)//to display message     set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)     show_hudmessage(id, "I said lol :):):)")     return PLUGIN_HANDLED } public do_kill(id) { //kill function         if (get_cvar_num("pa_killswitch")==0) {         return PLUGIN_HANDLED     }         if (!(get_user_flags(id)&ADMIN_KICK)) {         console_print(id,"You have no access")         return PLUGIN_HANDLED     }     if (read_argc() == 0) { //verifies user 1         console_print(id,"You must specify a user first.")         return PLUGIN_HANDLED     }     new user[32], uid //verifies user 2     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"Invalid userid, please try again.")         return PLUGIN_HANDLED     }     user_kill (uid)     return PLUGIN_HANDLED }
__________________
This signature is going to self destruct in: <countdown coming soon>




Previously known as Panais
chRm is offline
Send a message via MSN to chRm
 



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


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