Raised This Month: $ Target: $400
 0% 

HELP Me Error Compile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sohaib_DZ
Junior Member
Join Date: Jun 2022
Location: ALGERIE
Old 07-12-2022 , 14:32   HELP Me Error Compile
Reply With Quote #1

Hi Guys Pls Help Me i Have Error to compile this plugin


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

C:\Games\Counter-Strike WaRzOnE\cstrike\addons\amxmodx\scripting\incl ude\cssdk_const.inc(812) : error 021: symbol already defined: "TeamName"

1 Error.
Could not locate output file C:\Games\Counter-Strike WaRzOnE\cstrike\addons\amxmodx\scripting\comp iled\zu_best_defender.amx (compile failed).
-------------------------------------------------------------------------------------------------------------

#include <amxmodx>
#include <fun>
#include <engine>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <ze_multijump>
#include <levels>
#include <point_system>
#include <colorchat>
#include <reapi>
#include <biohazard>


// Variables
new Float:g_fDamage[33], g_iBestDefIndex

// Cvars
new cvar_give_multijump, cvar_show_chat_notice, cvar_give_xp, cvar_give_escape_coins, cvar_show_stats

public plugin_init()
{
register_plugin("[ZU] Best Defender", "1.3", "Reheem")

// Hook Chains
RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1)
RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)

// Cvars
cvar_give_multijump = register_cvar("zu_give_multijump", "0")
cvar_show_chat_notice = register_cvar("zu_best_def_chat_notice", "1")
cvar_give_xp = register_cvar("zu_best_def_give_xp", "4")
cvar_give_escape_coins = register_cvar("zu_best_def_give_ec", "10")
cvar_show_stats = register_cvar("zu_show_best_def_stats", "1")

// Commands
register_clcmd("say /dmg", "Cmd_BestDefenderStats")
}

public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
{
if (!is_user_alive(iVictim) || !is_user_alive(iAttacker))
return HC_CONTINUE

g_fDamage[iAttacker] += fDamage
return HC_CONTINUE
}

public ze_roundend()
{
Get_Best_Defender()
}

public Cmd_BestDefenderStats(id)
{
Get_Best_Defender()

switch (get_pcvar_num(cvar_show_stats))
{
case 1:
{
if (id == g_iBestDefIndex)
{
ColorChat(id, GREEN, "^1[^4Zombie UniQue^1] ^3You are now Best Defender ^1[^3%d^1]^1.", floatround(g_fDamage[g_iBestDefIndex]))
}
else
{
ColorChat(id, GREEN, "^1[^4Zombie UniQue^1] ^3Your Damage ^4%d^1, ^3You need ^4%d ^3Damage To be Best Defender^1.", floatround(g_fDamage[id]), floatround(g_fDamage[g_iBestDefIndex] - g_fDamage[id]))
}
}
case 2:
{
if (id == g_iBestDefIndex)
{
set_hudmessage(random(256), random(256), random(256), -1.0, 0.3, 2, 3.0, 5.0)
show_hudmessage(id, "You are now Best Defender [%d]", floatround(g_fDamage[g_iBestDefIndex]))
}
else
{
set_hudmessage(random(256), random(256), random(256), -1.0, 0.3, 2, 3.0, 5.0)
show_hudmessage(id, "Your Damage %d, You need %d Damage To be Best Defender.", floatround(g_fDamage[id]), floatround(g_fDamage[g_iBestDefIndex] - g_fDamage[id]))
}
}
case 3:
{
if (id == g_iBestDefIndex)
{
set_hudmessage(random(256), random(256), random(256), -1.0, 0.3, 2, 3.0, 5.0)
show_hudmessage(id, "You are now Best Defender [%d]", floatround(g_fDamage[g_iBestDefIndex]))
}
else
{
set_hudmessage(random(256), random(256), random(256), -1.0, 0.3, 2, 3.0, 5.0)
show_hudmessage(id, "Your Damage %d, You need %d Damage To be Best Defender.", floatround(g_fDamage[id]), floatround(g_fDamage[g_iBestDefIndex] - g_fDamage[id]))
}
}
}
}

public Fw_PlayerSpawn_Post(id)
{
if (get_pcvar_num(cvar_show_chat_notice) != 0)
{
new szName[32]
get_user_name(g_iBestDefIndex, szName, charsmax(szName))

if (g_iBestDefIndex == 0 || g_fDamage[g_iBestDefIndex] == 0.0)
return

if (get_pcvar_num(cvar_give_multijump) == 0)
{
ColorChat(id, GREEN, "^1[^4Zombie UniQue^1] ^3Best Defender:^4 %s. ^3Damage:^4 %i. ^3Awards: ^4%d Escapes^1, ^4%d Coins!y.", szName, floatround(g_fDamage[g_iBestDefIndex]), get_pcvar_num(cvar_give_xp), get_pcvar_num(cvar_give_escape_coins))
}
else
{
ColorChat(id, GREEN, "^1[^4Zombie UniQue^1] ^3Best Defender:^4 %s. ^3Damage:^4 %i. ^3Awards: ^4%d Escapes^1, ^4%d Coins^1, ^4Multi-Jump!y.", szName, floatround(g_fDamage[g_iBestDefIndex]), get_pcvar_num(cvar_give_xp), get_pcvar_num(cvar_give_escape_coins))
}
}

if (get_pcvar_num(cvar_give_multijump) != 0)
{
if (g_iBestDefIndex == 0 || g_iBestDefIndex != id || g_fDamage[g_iBestDefIndex] == 0.0)
return

ze_give_user_multijump(g_iBestDefIndex)
}

if (get_pcvar_num(cvar_give_xp) != 0 || get_pcvar_num(cvar_give_escape_coins) != 0)
{
if (g_iBestDefIndex == 0 || g_iBestDefIndex != id || g_fDamage[g_iBestDefIndex] == 0.0)
return

set_user_point(g_iBestDefIndex, get_pcvar_num(cvar_give_escape_coins) + get_user_point(g_iBestDefIndex))
set_user_xp(g_iBestDefIndex, get_pcvar_num(cvar_give_xp) + get_user_xp(g_iBestDefIndex))
}
}

public event_gamestart()
{
set_task(5.0, "RestDamage")
}

public RestDamage()
{
for (new i = 1; i <= get_member_game(m_nMaxPlayers); i++)
{
g_fDamage[i] = 0.0
}
}

public Get_Best_Defender()
{
new Float:fTemp = 0.0

for (new i = 1; i <= get_member_game(m_nMaxPlayers); i++)
{
if (!is_user_connected(i))
continue

if (g_fDamage[i] > fTemp)
{
fTemp = g_fDamage[i]
g_iBestDefIndex = i
}
}
}

Last edited by Sohaib_DZ; 07-12-2022 at 14:36.
Sohaib_DZ 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 21:25.


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