Raised This Month: $ Target: $400
 0% 

Question about Code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-03-2004 , 20:17   Question about Code
Reply With Quote #1

Well Here's my plugin

Code:
#include <amxmodx> #include <fun> #include <cstrike> new bool:hasloaned[32] public plugin_init() { register_plugin("Loaner","1.0","Dizzy") register_cvar("sv_money","1") register_cvar("sv_health","1") register_clcmd("say /loanmoney","money") register_clcmd("say /loanhealth","health") register_event("ResetHUD","client_connect","b") } public client_connect(id) {     hasloaned[id] = false } public client_disconnect(id) {     hasloaned[id] = false } public money(id) { if (get_cvar_num("sv_money")==0) return PLUGIN_HANDLED if (hasloaned[id] = true) return PLUGIN_HANDLED cs_set_user_money(id, cs_get_user_money(id) + 500) hasloaned[id] = true return PLUGIN_HANDLED } public health(id) { if (get_cvar_num("sv_health")==0) return PLUGIN_HANDLED if (hasloaned[id] = true) return PLUGIN_HANDLED set_user_health(id, get_user_health(id) + 10) hasloaned[id] = true return PLUGIN_HANDLED }


Now It loans money once a round now I want it to take what the loaned the next round so u loan 10 health the next round it takes 10 How do I do that?

Help?
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Burnzy
Veteran Member
Join Date: Apr 2004
Old 08-03-2004 , 20:19  
Reply With Quote #2

can u please keep all ur stuff in 1 thread u make? uve made like 5 threads about this plugin....
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-03-2004 , 20:25  
Reply With Quote #3

Sorry I told devicenull to delete them but hey can we keep the rest of my questions here? Can you answer it?
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-03-2004 , 21:03  
Reply With Quote #4

hmm im not really sure how, im sure devicenull or sum1 knows... i'll let u know if i come up with anything
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-03-2004 , 21:05  
Reply With Quote #5

k
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-03-2004 , 21:12  
Reply With Quote #6

One letter posts are generally frowned upon.
And dont post if you have nothing helpful to say :/
Code:
#include <amxmodx> #include <fun> #include <cstrike> new bool:hasloaned[32] public plugin_init() { register_plugin("Loaner","1.0","Dizzy") register_cvar("sv_money","1") register_cvar("sv_health","1") register_clcmd("say /loanmoney","money") register_clcmd("say /loanhealth","health") register_event("ResetHUD","roundchange","b") } public client_connect(id) {     hasloaned[id] = false } public client_disconnect(id) {     hasloaned[id] = false } public roundchange(id) {     if (hasloaned[id])         set_user_health(id,get_user_health(id)-10) } public money(id) { if (get_cvar_num("sv_money")==0) return PLUGIN_HANDLED if (hasloaned[id]) return PLUGIN_HANDLED cs_set_user_money(id, cs_get_user_money(id) + 500) hasloaned[id] = true return PLUGIN_HANDLED } public health(id) { if (get_cvar_num("sv_health")==0) return PLUGIN_HANDLED if (hasloaned[id]) return PLUGIN_HANDLED set_user_health(id, get_user_health(id) + 10) hasloaned[id] = true return PLUGIN_HANDLED }
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-03-2004 , 22:53  
Reply With Quote #7

Ok sorry but Device null my plugin does not work now Here's what I got

I want it to do the loan thing but every round if they loaned the previous round I want them to get what they took away So they loan 500 dollars they get 500 tooken away next round

or 10 health the ned round they get 10 health taken away but for now it's not even working
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 08-03-2004 , 23:13  
Reply With Quote #8

What exactly isnt working?
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-04-2004 , 00:07  
Reply With Quote #9

The entire thing,

It won't loan money or health and it's like it wasn't even there...
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
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 14:33.


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