Raised This Month: $ Target: $400
 0% 

problem with a zombie plague level sma mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pianicata4
Junior Member
Join Date: Dec 2018
Old 01-25-2019 , 11:27   problem with a zombie plague level sma mod
Reply With Quote #1

hi all,im having a problem with scripting a ultimate level mod for zombie plague and the problem is,the damage,when i put 9999 for test,the bot damages me with that amount,it works,but when i damage the bots,its just a normal damage and no bonus boost,can someone please fix it somehow,anyone can test it and see what i mean if you put 9999 damage,someone please fix it to work on bots to be damaged too,the damage amount is changeable via the cfg included

ps: i belive its this code here

public TakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
{
if (get_pcvar_num(cvar_statsmode) == 1 || get_pcvar_num(cvar_statsmode) == 3)
{
if (!zp_get_user_zombie(attacker))
{
if (is_user_alive(attacker))
{
SetHamParamFloat(4, damage + PlayerHmDmg[attacker])
}

g_damagedealt[attacker] += floatround(damage)

while (g_damagedealt[attacker] > get_pcvar_num(cvar_dmg_for_xp))
{
PlayerXP[attacker] += get_pcvar_num(cvar_xp_for_dmg)
g_damagedealt[attacker] -= get_pcvar_num(cvar_dmg_for_xp)
}
}
if (zp_get_user_zombie(attacker) && is_user_alive(attacker))
{
SetHamParamFloat(4, damage + PlayerZmDmg[attacker])
}
CheckLevel(attacker)
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}

someone just need to add bot damage taken tag or something
Attached Files
File Type: zip zp_uls_v2.0_resourses.zip (105.5 KB, 46 views)

Last edited by pianicata4; 01-25-2019 at 11:32.
pianicata4 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-25-2019 , 11:51   Re: problem with a zombie plague level sma mod
Reply With Quote #2

Search for cs_ham_bots_api.
__________________








CrazY. is offline
pianicata4
Junior Member
Join Date: Dec 2018
Old 01-25-2019 , 11:54   Re: problem with a zombie plague level sma mod
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Search for cs_ham_bots_api.
ok but can you give me an example copy paste code please?
pianicata4 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-25-2019 , 11:56   Re: problem with a zombie plague level sma mod
Reply With Quote #4

Just take a look at zp50 plugins.
https://forums.alliedmods.net/attach...9&d=1422503317
__________________








CrazY. is offline
pianicata4
Junior Member
Join Date: Dec 2018
Old 01-25-2019 , 11:58   Re: problem with a zombie plague level sma mod
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
yeah ive got it but i dont know where or what line in the code should i put
pianicata4 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-25-2019 , 12:03   Re: problem with a zombie plague level sma mod
Reply With Quote #6

Compile cs_ham_bots_api.sma, put the .amxx in addons/amxmodx/plugins folder and enable it in plugins,ini.
In code, add following.

Code:
#include <cs_ham_bots_api>

Code:
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");



Code:
RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); RegisterHamBots(Ham_TakeDamage, "TakeDamage");
__________________








CrazY. is offline
pianicata4
Junior Member
Join Date: Dec 2018
Old 01-25-2019 , 12:05   Re: problem with a zombie plague level sma mod
Reply With Quote #7

okay thanks i will try that
pianicata4 is offline
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 07:36.


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