Raised This Month: $51 Target: $400
 12% 

[L4D]How do u modify the max HP/Ammo, or Is it a plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-05-2010 , 19:55   [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #1

Hey peoples im new to this forum and i wanted to find out how to modify the ammo and health on ur l4d server like this guy did to his. Heres screen shots on what i mean :

Heres the Health amount:


And heres the ammo amount (not exact but very close), this one is for the automatic rifle/pistols:


Can any one tell me if theres a way to do this??? or a type of plugin?

And also when your low on hp, you know how it takes a while to heal ur self and someone, this server takes 1 sec to heal!!!
fronjohn is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-06-2010 , 18:29   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #2

Code:
new ClientHealth = RoundFloat((GetEntProp(client,Prop_Send,"m_iHealth")

ClientHealth = ClientHealth + 9001

    SetEntProp(client,Prop_Send,"m_iHealth",ClientHealth);
    SetEntProp(client,Prop_Send,"m_iMaxHealth",ClientHealth);  
I found this code from a thread that AtomicStryker posted about the health for survivors is there any actual plug in for this?
fronjohn is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-08-2010 , 14:00   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #3

Anybody?
fronjohn is offline
ku5h
Member
Join Date: Feb 2009
Old 04-09-2010 , 11:38   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #4

set health https://forums.alliedmods.net/showthread.php?t=73994

infinite ammo - sm_cvar sv_infinite_ammo 1

1 sec heal time - sm_cvar
first_aid_kit_use_duration 1
__________________
ku5h is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 04-09-2010 , 12:31   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #5

You can wrap it.
FaTony is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-09-2010 , 15:33   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #6

thanks soo much man!, nvm read the post below this one

Last edited by fronjohn; 04-09-2010 at 23:52.
fronjohn is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-09-2010 , 23:51   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #7

wait a min it keeps telling me "[SD] No clients were found" aww man so close it only works in single player
fronjohn is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-10-2010 , 23:02   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #8

Help? how do u fix the No clients were found problem plz?
fronjohn is offline
fronjohn
Junior Member
Join Date: Apr 2010
Old 04-17-2010 , 15:02   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #9

im sorry for reposting again but how do u fix the no clients were found problem i get after i put in the code in the consel
fronjohn is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 04-17-2010 , 16:18   Re: [L4D]How do u modify the max HP/Ammo, or Is it a plugin?
Reply With Quote #10

you only posted a tiny bit of code, so your probably only checking client 0 which is the server.

you need to check for all clients and make sure they are valid.. something like:
Code:
for(client = 1; client <= MaxClients; client++) {
    if(IsClientInGame(client) && !IsFakeClient(client)) {
        if (GetClientTeam(client) != 2) continue;
        ....
    }
}
the clientteam check makes sure its only survivors.. dont want to boost infected health that way do ya? there are cvars to change their health.

now you might want to include bots so remove the isfakeclient check (i just copied/pasted from another source)..
dirka_dirka 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 07:14.


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