Raised This Month: $ Target: $400
 0% 

Help to: payment for a function.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 03-30-2005 , 15:05   Help to: payment for a function.
Reply With Quote #1

First I will past the script:

Code:
#include <amxmodx> #include <cstrike> #include <fun> public plugin_init() {     register_plugin("Auto Healing","1.0","stigma")     register_clcmd("say /heal","autoHeal",0,"Gives a client +3HP for 15 seconds")     register_event("DeathMsg","annouce","a","0") } public autoHeal(id) {         new health = get_user_health( id )         if(health >= 50) {                 set_hudmessage(40,100,50, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 6)         show_hudmessage(id,"Your health have to be below 50!")         }                     if(health < 40) {         new sHealth = get_user_health( id ) + 5         new fHealth = 50 - health - 5                 set_hudmessage(40,100,50, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 3)         show_hudmessage(id,"Current health: %i^nHealth needed before 50: %i",sHealth,fHealth)             set_user_health(id, health+5)                 set_task(1.0,"autoHeal",id)                 return PLUGIN_HANDLED             }         if((health < 50) & (health >= 40)) {                 set_user_health(id, health+1)                 new slHealth = get_user_health( id )         new fHealth = 50 - health - 1                 set_hudmessage(40,100,50, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 4)         show_hudmessage(id,"Current health: %i^nHealth needed before 50: %i",slHealth,fHealth)                         set_task(1.0,"autoHeal",id)                 return PLUGIN_HANDLED     }         return PLUGIN_HANDLED     } public annouce() {         set_hudmessage(40,100,50, 0.20, 0.30, 2, 0.05, 5.0, 0.01, 0.1, 5)     show_hudmessage(0,"Use /heal to get auto healed until you have 50 hp^nIt would cost you 3000$")     }

This works fine, but as soon I put:
Code:
cs_get_user_money( id )
into the script, it returns 'bad load'. Anyone who can help me with this problem?

What I want to do is: When a client write /heal - it should cost him 3000$ and I have tryed to make that. But when I do that, it returns bad load...

And also the last function 'annouce'. I want the message to appear every 15 minutes, with a task, but I don't know how I can do that, or actualy, I do know this: I tryed
Code:
set_task(900.0,"annouce",id,_,_,"b",_)
because I was told that the underscore was like a 'skipper' so it would skip the paraments.
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
 



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:50.


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