[Help] With Anti Block Heli
Posted: 07 Dec 2019, 07:02
Hello guys.I found the anti block plugin viewtopic.php?f=15&t=1929 in this forum but when i want to compile the code:
It doesn't work and appear this error :
Please I need help.I'm not good at plugins or scripting
- #include <zombie_escape>
- new const szEntities[][] =
- {
- "func_train",
- "func_vehicle",
- "func_tracktrain",
- "func_door"
- }
- new g_iPulsating = 0, Float:g_flLastBlock[33]
- // Cvars
- new g_pCvarBlockTime
- public plugin_init()
- {
- register_plugin("No Block", "1.0", "Raheem")
- // Cvars
- g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
- for (new i = 0; i <= charsmax(szEntities); i++)
- {
- RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
- }
- }
- public Fw_Blocked_Post(iEnt, id)
- {
- new Float:flRefTime = get_gametime()
- if (is_user_alive(id) && pev_valid(iEnt))
- {
- if(g_flLastBlock[id] > flRefTime)
- return
- g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
- ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC)
- if (ze_is_user_zombie(id))
- {
- set_entvar(id, var_health, get_entvar(id, var_health) - 2000.0)
- }
- client_print(id, print_center, "Stop BLOCK!!!")
- switch (g_iPulsating)
- {
- case 0:
- {
- Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
- g_iPulsating = 1
- }
- case 1:
- {
- Set_Rendering(id)
- g_iPulsating = 0
- }
- }
- }
- }
Code: Select all
//// anti_block_all.sma
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(18) : error 017: undefined symbol "register_plugin"
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(21) : error 017: undefined symbol "register_cvar"
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(23) : error 017: undefined symbol "charsmax"
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : error 017: undefined symbol "RegisterHam"
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : warning 215: expression has no effect
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : warning 215: expression has no effect
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : warning 215: expression has no effect
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : error 001: expected token: ";", but found ")"
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : error 029: invalid expression, assumed zero
// C:\Users\claud\OneDrive\Desktop\HLDS\cstrike\addons\amxmodx\scripting\anti_block_all.sma(25) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 7 Errors.
// Could not locate output file compiled\anti_block_all.amx (compile failed).
//
// Compilation Time: 0,16 sec
// ----------------------------------------