Raised This Month: $ Target: $400
 0% 

+ 10 each time you click


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-16-2009 , 10:18   + 10 each time you click
Reply With Quote #1

I got this code which should work.
PHP Code:
        case 1:
        {
            if ( 
get_user_points id ) >= get_pcvar_num pCvarHPoints ) )
            {
                
HasHealth1id ] = true
                set_user_points 
idget_user_points id ) - get_pcvar_num pCvarHPoints ) )
                
set_user_health idget_user_health id ) + get_pcvar_num pCvarHealth ) )
                
client_print idprint_chat"%s You got %d health more"PREFIXget_pcvar_num pCvarHealth ) )
            }
            else
            {
                
client_print idprint_chat"%s You don't have enough points"PREFIX )
            }
            if ( 
HasHealth1id ] = true )
            {
                
set_user_points idget_user_points id ) - get_pcvar_num pCvarHPoints ) )
                
set_user_health idget_user_health id ) + get_pcvar_num pCvarHealth ) + 10 )
                
HasHealth2id ] = true
            
}
            else
            {
                
client_print idprint_chat"%s Not enough points"PREFIX )
            } 
But is there an easyier way?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-16-2009 , 14:35   Re: + 10 each time you click
Reply With Quote #2

I don't know how you are doing this plugin, but you should check if player has HasHealth1 before the code if he can afford it.
zacky is offline
Send a message via Skype™ to zacky
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-16-2009 , 14:57   Re: + 10 each time you click
Reply With Quote #3

I have done. But when i do this method i'll have to do ALOT of useless code.
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
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 13:58.


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