This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Health Start


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Row
BANNED
Join Date: Jun 2013
Location: Romania
Old 07-16-2013 , 00:32   Health Start
Reply With Quote #1

Health Start


Description : A new plugin maked by me who set you how hp you have when you respawn !
Cvars : amx_cvar sv_health 100 (default 100)
Versrion : 1.0
Autor : Row
Cvars : sv_health ( default : 100 )
SMA :


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

#pragma semicolon 1
 
public plugin_init()
{
     
register_plugin("Start Health""1.3""Row");
     
register_event("ResetHUD","event_spawn","be");
     
register_cvar("sv_health""100");
}
 

public 
event_spawn(id)
{
     if (
get_cvar_num("sv_health") > 0)
     {
          
set_user_health(idget_cvar_num("sv_health"));

     } 



Bugs/Opinion/Sugestion !
Attached Files
File Type: sma Get Plugin or Get Source (healthstart.sma - 536 views - 391 Bytes)

Last edited by Row; 07-16-2013 at 00:59.
Row is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-16-2013 , 00:52   Re: Health Start
Reply With Quote #2

Attach the sma so people can use get plugin link.
__________________
Blizzard_87 is offline
Row
BANNED
Join Date: Jun 2013
Location: Romania
Old 07-16-2013 , 00:59   Re: Health Start
Reply With Quote #3

Quote:
Originally Posted by Blizzard_87 View Post
Attach the sma so people can use get plugin link.
UP
Row is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-16-2013 , 03:17   Re: Health Start
Reply With Quote #4

One suggestion add cvar to give different health points for each team?

And make them pcvar instead. It's a requirement.
__________________

Last edited by Blizzard_87; 07-16-2013 at 03:18.
Blizzard_87 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2013 , 03:26   Re: Health Start
Reply With Quote #5

Poorly coded. Unapproved.

Don't release again something until you know really what you're doing.
__________________
Arkshine is offline
Row
BANNED
Join Date: Jun 2013
Location: Romania
Old 07-16-2013 , 04:43   Re: Health Start
Reply With Quote #6

I now what he do , hi set from cvar the health of players

But i dont have how to explain if i dont now english good *
Row is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2013 , 05:09   Re: Health Start
Reply With Quote #7

No you don't. You are a very beginner. Don't release plugin when you have no knowledge.
__________________
Arkshine is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 07-16-2013 , 07:39   Re: Health Start
Reply With Quote #8

"ResetHUD" event isn't spawn event (In fact, there is no spawn event that can be hooked with "register_event"). This event is called when the Hud is restarted, and it can be called many times in one round.

Use also pcvars and not cvars.

Code is very poor.
__________________
simanovich 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 18:46.


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