Raised This Month: $ Target: $400
 0% 

regen help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 06-30-2006 , 04:23   Re: regen help
Reply With Quote #6

Code:
public client_putinserver(id)     {         if(task_exists(id)) {         remove_task(id)     }     set_task(4.0 , "add_armour" , id , _ , _ , "b") } public add_armour(id)     {     if(!is_user_alive(id) && !is_user_connected(id)) {         return PLUGIN_CONTINUE     }     if(id != 0) {         new ap = get_user_armor(id)         if(ap >= 100) {             set_user_armor(id , 100)         }         else if(ap <= 20) {             emit_sound(id,CHAN_VOICE,"ambience/sparks.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)             client_print(id, print_chat, "[AMXX] Your armor can't recharge now")         }else{             ap += 7             if(ap >= 100){                 ap = 100             }             set_user_armor(id , ap);             emit_sound(id,CHAN_VOICE,"misc/recharge.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)             message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)             write_short(1<<10)             write_short(1<<10)             write_short(0x0000)             write_byte(0)             write_byte(175)             write_byte(175)             write_byte(75)             message_end()         }             }     return PLUGIN_CONTINUE }

That should do it, but I think it will keep saying "Your armor can't recharge now" every 4 secs.
__________________
GargStudios.net - Australian SvenCoop/Ent Server with Time Based Rewards
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
 



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 07:58.


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