Raised This Month: $ Target: $400
 0% 

Need Help whit mod!! Plzz Help!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 02-13-2007 , 12:17   Re: Need Help whit mod!! Plzz Help!!
Reply With Quote #1

You could do like this:

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("HLTV","give_hp","a")     register_cvar("sv_maxhp","125",ADMIN_KICK)     register_cvar("sv_maxap","125",ADMIN_KICK)         return PLUGIN_CONTINUE } public give_hp(id) {         new players[32],numPlayers,playerid     get_players(players,numPlayers,"ah")         for (new i; i < numPlayers ;i++) {                 playerid = players[i]                     if (get_user_health(playerid) <= 100) {                             set_user_health(playerid,get_cvar_num("sv_maxhp"))             set_user_armor(playerid,get_cvar_num("sv_maxap"))                         }     } }

This would set the max hp/ap to the ammout you've set in the cvar. (Default 125) - The event would be triggered every round start.
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
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 00:42.


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