Raised This Month: $ Target: $400
 0% 

[ Define default hp and armor ]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xablau
Member
Join Date: Dec 2014
Old 01-05-2015 , 06:28   [ Define default hp and armor ]
Reply With Quote #1

How to set a default HP/Armor on player when client_putinserver?
Exemple:

Fixed 150 HP.
Fixed 200 Armor.

Last edited by Xablau; 01-05-2015 at 06:28.
Xablau is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-05-2015 , 06:42   Re: [ Define default hp and armor ]
Reply With Quote #2

Just set_user_health(Index, Amount) and set_user_armor(Index, Amount) in spawn forward.

Last edited by zmd94; 01-05-2015 at 06:43.
zmd94 is offline
popeye10
Senior Member
Join Date: May 2014
Location: Navi Mumbai (India)
Old 01-05-2015 , 12:05   Re: [ Define default hp and armor ]
Reply With Quote #3



PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>

#define PLUGIN "hp/armor"
#define VERSION "1.0"
#define AUTHOR "POPEYE"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
RegisterHam(Ham_Spawn"player""Player_Spawn"1);
}

public 
Player_Spawn(id)
{
    if(
is_user_alive(id)) 
    {
         
set_user_health(id150)
         
set_user_armor(id200)
    }

__________________

Last edited by popeye10; 01-05-2015 at 12:07.
popeye10 is offline
Xablau
Member
Join Date: Dec 2014
Old 01-05-2015 , 17:54   Re: [ Define default hp and armor ]
Reply With Quote #4

Tanks

Last edited by Xablau; 01-05-2015 at 17:57. Reason: tanks
Xablau is offline
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 19:29.


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