Raised This Month: $ Target: $400
 0% 

Help [Plugin]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
happycappy
Junior Member
Join Date: May 2006
Location: NL
Old 07-10-2006 , 15:12   Help [Plugin]
Reply With Quote #1

Its the first time im making a plugin, so don't be to hard on me
Im trying to make a plugin to punish people saying lol, so its the SayLolGetSlap plugin. But because its the first time, i screwed something up so it doesnt work.
I used rolnaaba's script , http://forums.alliedmods.net/showthread.php?t=41148 , but im stuck on something , instead of getting hp in that plugin, i wanted to let someone lose hp, so what did i do? I changed the number of health to -1. But somehow, when im testing it, and i say lol, my hp doesnt goes down, and i cant activate it. The other problem is, the slapping effect, if i use this script there wont be slapped, but just -1 hp, so could someone help me with that? Here's the code:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("Say Lol And Get Slapped", "1.0", "eXec")     register_concmd("say lol", "lol")     register_cvar("slaplol_on", "1") } public func_gethp(id) {     if(get_cvar_num("slaplol_on") == 0)     {         return PLUGIN_HANDLED     }         else     {         set_user_health(id, get_user_health(id) - 1)         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED     }
__________________
7331

Last edited by happycappy; 07-10-2006 at 15:13. Reason: Typo
happycappy is offline
 



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 08:05.


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