Raised This Month: $ Target: $400
 0% 

healing plugin help? **SOLVED**


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-15-2005 , 22:19  
Reply With Quote #4

Code:
public whatever_function_this_is_in(id) { // ... all of the other code from my plugin     //     // Medic     //     if(equali(arg1,"/heal") == 1) {         if(is_user_alive(id) == 0) {             client_print(id,print_chat,"* [MCMD] You must be alive to use this command^n");             return PLUGIN_HANDLED;         }         if(isMedic(id) == 0) { // if player is not a Medic             client_print(id,print_chat,"* [MCMD] Only Medics can heal other players^n");             return PLUGIN_HANDLED;         }         new player, body, Float:dist = get_user_aiming(id,player,body,9999);         if(player <= 0) { // no entity or is world entity             client_print(id,print_chat,"* [MCMD] Player is invalid or non-existant^n");             return PLUGIN_HANDLED;         }         // if player isn't connected (what happened here?) or player is dead         if(!is_user_connected(player) || !is_user_alive(player)) {             client_print(id,print_chat,"* [MCMD] Player is invalid or non-existant^n");             return PLUGIN_HANDLED;         }         // not close enough         if(dist > CUFFDIST) {             client_print(id,print_chat,"* [MCMD] You are not close enough to the player^n");             return PLUGIN_HANDLED;         }         if(get_user_health(player) >= 100) { // player at max health             //client_print(id,print_chat,"* [MCMD] This user is already Fully Healed^n");             return PLUGIN_HANDLED;         }         new playername[256];         get_user_name(player,playername,255);         client_print(id,print_chat,"* [MCMD] %s is now healed^n",playername);         client_print(player,print_chat,"* [MCMD] You have been healed^n");         set_task(1.0,"medicheal",player); // delayed heal         return PLUGIN_HANDLED;     } } //////////////////////////////////////////////////////////////////// // Medic Heal ////////////////////////////////////////////////////////////////// public medicheal(id) {         set_user_health(id,100)       return 1; }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 09:55.


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