Raised This Month: $ Target: $400
 0% 

HELP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 15:18   HELP
Reply With Quote #1

[en]
Hello guys, i want help.
i want to add 250 hp for T how to add?
"sorry, my english is very bad."

[tr]
Her el başlangıcında T'ye 250 hp nasıl verebilirim?
Aşağıdaki koda nasıl ekleyebilirim?

#include < amxmodx >
#include < cstrike >
#include < fun >
#include < hamsandwich >

public plugin_init( )
{
register_plugin( "DeathrunMod", "v1.2", "makar" )

RegisterHam( Ham_Spawn, "player", "Spawn", true );

}

public Spawn( id )
{
if( is_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_T)
{
strip_user_weapons( id )
give_item( id, "weapon_knife" )
give_item( id, "item_kevlar" )
give_item( id, "weapon_hegrenade" )
give_item( id, "weapon_smokegrenade" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
}
}
M E R T is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 01-21-2019 , 15:48   Re: HELP
Reply With Quote #2

Why do you use give_item too often? Just use rg_set_user_bpammo (ReAPI) / cs_set_user_bpammo (cstrike).
Regarding the topic, you can use one of these:
PHP Code:
set_user_health(id250);
fm_set_user_health(id250);
set_pev(idpev_health250.0);
set_entvar(idvar_health250.0); 
__________________

Last edited by eat1k; 01-21-2019 at 15:49.
eat1k is offline
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 15:57   Re: HELP
Reply With Quote #3

Hello i don't know edit. do you edit my code? thanks
M E R T is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 01-21-2019 , 16:16   Re: HELP
Reply With Quote #4

Quote:
Originally Posted by M E R T View Post
Hello i don't know edit. do you edit my code? thanks
When, you know, POST IN THE RIGHT SECTION!
__________________
My English is A0
E1_531G is offline
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 16:20   Re: HELP
Reply With Quote #5

hello please help me do you edit my code? thanks
M E R T is offline
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 16:36   Re: HELP
Reply With Quote #6

hello not working.

public Spawn( id )
{
if( is_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_T)
{
strip_user_weapons( id )
set_user_health(id, 250)
give_item( id, "weapon_knife" )
give_item( id, "item_kevlar" )
give_item( id, "weapon_hegrenade" )
give_item( id, "weapon_smokegrenade" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
}
}
M E R T is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 01-21-2019 , 17:10   Re: HELP
Reply With Quote #7

Well, you try, it's good.

So, you have #include fun and set_user_health(id, 250). It must work.
If it doesn't work, this means that another plugin changes player health.
Put this plugin on the last line in plugins.ini.
__________________
My English is A0
E1_531G is offline
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 17:23   Re: HELP
Reply With Quote #8

Hello please edit my code...
this code is not working because my server is crash
how to fix?

#include < amxmodx >
#include < cstrike >
#include < fun >
#include < hamsandwich >

public plugin_init( )
{
register_plugin( "DeathrunMod", "v1.2", "makar" )

RegisterHam( Ham_Spawn, "player", "Spawn", true );

}

public Spawn( id )
{
if( is_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_T)
{
strip_user_weapons( id )
set_user_health(id, 250)

give_item( id, "weapon_knife" )
give_item( id, "item_kevlar" )
give_item( id, "weapon_hegrenade" )
give_item( id, "weapon_smokegrenade" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_glock18" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
give_item( id, "weapon_mp5navy" )
}
}
M E R T is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2019 , 17:57   Re: HELP
Reply With Quote #9

The server can't crash because of that code. Why are you giving the same weapon multiple times? Why is your thread named HELP?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
M E R T
Junior Member
Join Date: Jan 2019
Old 01-21-2019 , 18:00   Re: HELP
Reply With Quote #10

Ocix do you understand me??
i don't know edit.. This code i am find ....
i tell your help me.. how to fix? okay????
M E R T 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:32.


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