AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem with a zombie plague level sma mod (https://forums.alliedmods.net/showthread.php?t=313864)

pianicata4 01-25-2019 11:27

problem with a zombie plague level sma mod
 
1 Attachment(s)
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

CrazY. 01-25-2019 11:51

Re: problem with a zombie plague level sma mod
 
Search for cs_ham_bots_api.

pianicata4 01-25-2019 11:54

Re: problem with a zombie plague level sma mod
 
Quote:

Originally Posted by CrazY. (Post 2636577)
Search for cs_ham_bots_api.

ok but can you give me an example copy paste code please?

CrazY. 01-25-2019 11:56

Re: problem with a zombie plague level sma mod
 
Just take a look at zp50 plugins.
https://forums.alliedmods.net/attach...9&d=1422503317

pianicata4 01-25-2019 11:58

Re: problem with a zombie plague level sma mod
 
Quote:

Originally Posted by CrazY. (Post 2636580)

yeah ive got it but i dont know where or what line in the code should i put

CrazY. 01-25-2019 12:03

Re: problem with a zombie plague level sma mod
 
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");

:arrow:

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

pianicata4 01-25-2019 12:05

Re: problem with a zombie plague level sma mod
 
okay thanks i will try that


All times are GMT -4. The time now is 07:36.

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