Raised This Month: $ Target: $400
 0% 

[REQ] Half-Life 2 start health + armor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bytecode77
Junior Member
Join Date: Nov 2014
Old 12-01-2014 , 12:30   [REQ] Half-Life 2 start health + armor
Reply With Quote #1

Is there a plugin (or maybe EventScript) that changes the start health and armor to 100 health and 100 armor for Half-Life 2?
__________________
bytecode77 is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 12-03-2014 , 10:54   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #2

PHP Code:
public OnPluginStart(){
HookEvent("player_spawn"Evt_SpawnEventHookMode_Pre);
}

public 
Action:Evt_Spawn(Handle:eventString:name[], bool:dontB){
new 
client GetClientOfUserId(GetEventInt(event"userid"));
SetEntProp(clientProp_Send"m_ArmorValue"100);
SetEntityHealth(client100);
return 
Plugin_Continue;

This should work.
thecount is offline
bytecode77
Junior Member
Join Date: Nov 2014
Old 12-03-2014 , 18:10   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #3

It doesn't, even though it's loaded.

Code:
[SM] Listing 29 plugins:
  ...
  02 "start_armor.smx"
  ...
__________________
bytecode77 is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 12-03-2014 , 19:43   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #4

Quote:
Originally Posted by bytecode77 View Post
It doesn't, even though it's loaded.

Code:
[SM] Listing 29 plugins:
  ...
  02 "start_armor.smx"
  ...
Not sure. Looks like it should work. This is just for raw HL2?
thecount is offline
bytecode77
Junior Member
Join Date: Nov 2014
Old 12-03-2014 , 19:45   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #5

for Metamod Source + Sourcemod. And some other plugins as well as EventScripts are installed.
__________________
bytecode77 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-04-2014 , 23:24   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #6

Don't know why in HL2:dm, "m_ArmorValue" is not in netprops.
But it found from datamaps.

So change code, Prop_Send to Prop_Data
Bacardi is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 12-05-2014 , 05:38   Re: [REQ] Half-Life 2 start health + armor
Reply With Quote #7

Code:
public OnPluginStart()
{ 
	HookEvent("player_spawn", OnPlayerSpawn); 
} 

public Action:OnPlayerSpawn(Handle:hEvent, String:sName[], bool:bBroadcast)
{ 
	new client = GetClientOfUserId(GetEventInt(event, "userid")); 
	SetEntProp(client, Prop_Data, "m_ArmorValue", 100, 1 ); 
	SetEntityHealth(client, 100); 
}

Last edited by Drixevel; 12-05-2014 at 05:38.
Drixevel 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 05:19.


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