Raised This Month: $ Target: $400
 0% 

Modify default hp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mandiii
Junior Member
Join Date: Jun 2010
Old 06-10-2010 , 18:30   Modify default hp
Reply With Quote #1

I want to modify the default hp of a individual player, and i want it saved so that when the player come back to the server he still has that hp.
Mandiii is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-10-2010 , 18:38   Re: Modify default hp
Reply With Quote #2

Set the users HP on spawn
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Mandiii
Junior Member
Join Date: Jun 2010
Old 06-10-2010 , 18:42   Re: Modify default hp
Reply With Quote #3

Could you provide an example please.
Mandiii is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-10-2010 , 18:51   Re: Modify default hp
Reply With Quote #4

Code:
#include <amxmodx> #include <hamsandwich> #include <fun> #define START_HEALTH    150 public plugin_init() {     register_plugin( "HP Modifier", "1.0", "Wrecked" )         RegisterHam( Ham_Spawn, "player", "HamSpawnPost", 1 ) } public HamSpawnPost( id ) {     if( is_user_alive( id ) )     {         set_user_health( id, START_HEALTH )     } }

EDIT: Oh, hi there, drekes. =]
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 06-10-2010 at 18:56.
wrecked_ is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-10-2010 , 18:53   Re: Modify default hp
Reply With Quote #5

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

public plugin_init()
    
RegisterHam(Ham_Spawn"player""Fwd_Ham_Spawn_Post"1);
    
public 
Fwd_Ham_Spawn_Post(id)
{
    if(
is_user_alive(id))
        
set_user_health(id/* hp you want*/);

Edit: Damn Wrecked
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
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 14:56.


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