AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ] Half-Life 2 start health + armor (https://forums.alliedmods.net/showthread.php?t=252377)

bytecode77 12-01-2014 12:30

[REQ] Half-Life 2 start health + armor
 
Is there a plugin (or maybe EventScript) that changes the start health and armor to 100 health and 100 armor for Half-Life 2?

thecount 12-03-2014 10:54

Re: [REQ] Half-Life 2 start health + armor
 
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.

bytecode77 12-03-2014 18:10

Re: [REQ] Half-Life 2 start health + armor
 
It doesn't, even though it's loaded.

Code:

[SM] Listing 29 plugins:
  ...
  02 "start_armor.smx"
  ...


thecount 12-03-2014 19:43

Re: [REQ] Half-Life 2 start health + armor
 
Quote:

Originally Posted by bytecode77 (Post 2230906)
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?

bytecode77 12-03-2014 19:45

Re: [REQ] Half-Life 2 start health + armor
 
for Metamod Source + Sourcemod. And some other plugins as well as EventScripts are installed.

Bacardi 12-04-2014 23:24

Re: [REQ] Half-Life 2 start health + armor
 
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

Drixevel 12-05-2014 05:38

Re: [REQ] Half-Life 2 start health + armor
 
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);
}



All times are GMT -4. The time now is 05:19.

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