Raised This Month: $2 Target: $400
 0% 

change a 35hp map to 100 hp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JuanPabloOlivosCordova
Senior Member
Join Date: Aug 2013
Old 06-06-2020 , 22:49   change a 35hp map to 100 hp
Reply With Quote #1

I want to put a map in my gungame, but it makes player have 35 health at start

I need players to have 100 hp

please help, how do I do it

on this map

https://gamebanana.com/maps/200641
__________________

my gungame youtube, game play ect
https://www.youtube.com/channel/UCyE..._as=subscriber
JuanPabloOlivosCordova is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: Catlands
Old 06-07-2020 , 00:02   Re: change a 35hp map to 100 hp
Reply With Quote #2

Code:
#include <amxmodx> #include <hamsandwich> #include <fun> new const map[] = "35hp_2"; new mapname[32]; public plugin_init(){     get_mapname(mapname, charsmax(mapname));         if (equal(mapname, map) != -1){         RegisterHam(Ham_Spawn, "player", "Spawn", 1);     } } public client_disconnected(id){     if (task_exists(id)){         remove_task(id);     } } public Spawn(id){     set_task(1.5, "reset_health", id); } public reset_health(id){     if (is_user_alive(id)){         set_user_health(id, 100);     } }
__________________
Relaxing is offline
Firippu
Senior Member
Join Date: Jan 2007
Location: West Virginia, USA.
Old 06-07-2020 , 02:33   Re: change a 35hp map to 100 hp
Reply With Quote #3

To make things more complicated; here are a few more methods.

This finds the damage-causing entity by classname then removes it.
PHP Code:
new iEntity find_ent_by_class(-1,"game_player_hurt")
if(
is_valid_ent(iEntity)) remove_entity(iEntity
This one finds the same entity from above but this time finds its location & kicks the crap out of it, lowering its damage to zero, rendering it harmless.
PHP Code:
new iEntity=find_ent_in_sphere(-1,Float:{0.0,400.0,384.0},1.0)
if(
is_valid_ent(iEntity)) DispatchKeyValue(iEntity,"dmg","0"
Finally, this scopes out its puny foot soldiers one by one, identifying them by their model, then choking them out.
PHP Code:
new iEntity
for(new iNum=49iNum<=72iNum++) {
    static 
szModel[4]
    static 
szNum[3]
    
num_to_str(iNum,szNum,2)
    
szModel[0]='^0'
    
strcat(szModel,"*",1)
    
strcat(szModel,szNum,3)

    
iEntity=find_ent_by_model(-1,"trigger_multiple",szModel)
    if(
is_valid_ent(iEntity)) remove_entity(iEntity)

__________________
Firippu is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-07-2020 , 07:30   Re: change a 35hp map to 100 hp
Reply With Quote #4

Quote:
To make things more complicated; here are a few more methods.
I'd say to make things properly rather than complicated. The first method should work for most maps and it's the better solution.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

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 17:38.


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