It is currently 23 May 2018 15:54






Reply to topic  [ 5 posts ] 
 eroare plugin. 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 26 Nov 2017 16:57
Posts: 107
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
de ce primessc Eroarea asta?.

si decand am bagat pluginu acesta mi-se inchide server-ul din 2 in 2 minute.


Eroarea

| Afiseaza codul
2/17/2017 - 07:54:08: [AMXX] Plugin "zpnm_gp_multi_hud_info.amxx" failed to load: Module/Library "cs_ham_bots_api" required for plugin. Check modules.ini



Pluginu

| Afiseaza codul
/*
To do:

T = needs testing
X = done
- = cancelled

[T] register Ham_Killed instead of using zpnm killed native
[T] CZ bots support
[T] fix possible overflow
[T] remove unnecessary checks
[T] remove zpnm alive/connected native checks and use default ones instead
[T] charsmax instead of constant values
[T] support for the new zpnm modes
[T] display mod as unknown or not at all if it's out of bounds
v1.1.9
[ ] constantly display number of classes or humans/zombies left?
[ ] optimize
[ ] show hud even when no mode running as ZPNM_MODE_NONE?
[ ]
*/

/*================================================================================

*********************************************************
*********** [Zombie Plague Multi HUD Info] **************
*********************************************************

----------------------
-*- Licensing Info -*-
----------------------

Zombie Plague Multi HUD Info
by schmurgel1983(@msn.com)
Copyright (C) 2008-2011 Stefan "schmurgel1983" Focke
Versions 1.1.0 and higher by george.distinct(@gmail.com)
Copyright (C) 2011-2013 D i 5 7 i n c T

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, as a special exception, the author gives permission to
link the code of this program with the Half-Life Game Engine ("HL
Engine") and Modified Game Libraries ("MODs") developed by Valve,
L.L.C ("Valve"). You must obey the GNU General Public License in all
respects for all of the code used other than the HL Engine and MODs
from Valve. If you modify this file, you may extend this exception
to your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from your
version.

No warranties of any kind. Use at your own risk.

-------------------
-*- Description -*-
-------------------

Shows stats like csstats with zombie/human remaining.
Gives every 3 seconds info about the HP from first zombie,
last human, nemesis, survivor, sniper or all of these classes.
Shows currently played game mode.

--------------------
-*- Requirements -*-
--------------------

* Mods: Counter-Strike 1.6 or Condition-Zero
* AMXX: Version 1.8.0 or later
* Module: fakemeta, hamsandwich

-----------------
-*- Changelog -*-
-----------------

* v1.0.0:
- Initial release Privat (30th Aug 2008)
- Initial release Alliedmodders (2nd Feb 2011)

* v1.1.0 (1st Nov 2011 - Private):
- Fully rescripted the plug-in (optimized very much)
- Removed the hamsandwich module and support for CZ bots
- Added support for Zombie Plague Nightmare (version 1.9f or later)

* v1.1.1 (17th Nov 2011 - Private):
- Renamed plug-in from "Zombie Plague Stats" to "Zombie Plague Multi HUD Info"
(Thanks to suNx for the inspiration and idea)
- Fixed human and zombie count error
- Added support for showing the current game mode and different colors
- Added multilingual support
- Optimized the plug-in a bit more and removed useless code

=================================================================================*/

// Modules
#include <amxmodx>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 180
#assert AMX Mod X v1.8.0 or later library required!
#endif

// Plug-in APIs
#include <cs_ham_bots_api>
#include <zombieplaguenightmare>

/*================================================================================
[Global Variables]
=================================================================================*/

// Game vars
new g_iMaxPlayers // max player counter
new g_HudSync, g_HudSync2 // message sync objects
new g_zombie_count // zombie count
new g_human_count // human count
new g_name[33][32] // player name

new g_szLangKeysModes[][] =
{
"ZPNM_MODE_NONE",
"ZPNM_MODE_INFECTION",
"ZPNM_MODE_NEMESIS",
"ZPNM_MODE_SURVIVOR",
"ZPNM_MODE_SWARM",
"ZPNM_MODE_MULTI",
"ZPNM_MODE_PLAGUE",
"ZPNM_MODE_SNIPER",
"ZPNM_MODE_ASSASSIN",
"ZPNM_SURVIVOR_NEMESIS",
"ZPNM_MODE_SURVIVOR_ASSASSIN",
"ZPNM_MODE_SNIPER_NEMESIS",
"ZPNM_MODE_SNIPER_ASSASSIN",
"ZPNM_MODE_SURVSNIP_NEMASS",
"ZPNM_MODE_UNKNOWN"
}
const g_iSizeLangKeysModes = sizeof g_szLangKeysModes - 1;
/*
enum g_hud_color_R[9]
{
0,
0,
255,
0,
255,
0,
255,
0,
175
}

enum g_hud_color_G[9]
{
0,
255,
0,
0,
255,
255,
255,
0,
0
}

enum g_hud_color_B[9]
{
0,
0,
0,
255,
0,
0,
0,
255,
255
}*/

/*================================================================================
[Init]
=================================================================================*/

public plugin_init()
{
register_plugin("[ZPNM] Multi HUD Info", "1.1.9", "schmurgel1983, D i 5 7 i n c T")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_dictionary("zpnm_multi_hud_info.txt")

RegisterHam(Ham_Killed, "player", "fwHamKilledPlayer", 1)
RegisterHamBots(Ham_Killed, "fwHamKilledPlayer", 1)

g_iMaxPlayers = get_maxplayers()

g_HudSync = CreateHudSyncObj()
g_HudSync2 = CreateHudSyncObj()
}

public client_disconnect(iID)
{
if (!is_user_alive(iID) || zp_has_round_started() != -1)
return;

if (zp_get_user_zombie(iID))
{
g_zombie_count--

if (g_zombie_count)
display_enemy_remaining()
}
else
{
g_human_count--

if (g_human_count)
display_enemy_remaining()
}
}

public client_infochanged(iID)
{
if (!is_user_connected(iID))
return;

get_user_info(iID, "name", g_name[iID], 31)
}

/*================================================================================
[Main Forwards]
=================================================================================*/

// Event Round Start
public event_round_start()
{
g_zombie_count = 0
g_human_count = 0
}

public zp_round_started(mode)
{
new temp[1]

if (mode <= g_iSizeLangKeysModes)
temp[0] = mode
else
temp[0] = g_iSizeLangKeysModes;

display_multi_hud_info(temp)

set_task(1.757, "display_multi_hud_info", _, temp, 1, "b")
}

public zp_round_ended()
remove_task()

public zpnm_user_spawn_post(iID)
{
g_human_count++

if (zp_has_round_started() == 1)
display_enemy_remaining()
}

public zp_user_infected_pre(iID)
{
if (zp_get_user_zombie(iID))
return;

g_human_count--
g_zombie_count++

display_enemy_remaining()
}

public zp_user_humanized_pre(iID)
{
if (!zp_get_user_zombie(iID))
return;

g_human_count++
g_zombie_count--

display_enemy_remaining()
}

public fwHamKilledPlayer(const iID)
{
if (zp_get_user_zombie(iID))
{
g_zombie_count--

if (g_zombie_count)
display_enemy_remaining()
}
else
{
g_human_count--

if (zp_has_round_started() == 1 && g_human_count)
display_enemy_remaining()
}
}

/*================================================================================
[Other Functions]
=================================================================================*/

public display_multi_hud_info(mode[1])
{
static message[512], pos, i
pos = 0

pos += formatex(message[pos], charsmax(message) - pos, "%L: %L^n^n", LANG_SERVER, "ZPNM_CURRENT_MODE", LANG_SERVER, g_szLangKeysModes[mode[0]])

for (i = 1; i <= g_iMaxPlayers; i++)
{
if (!is_user_alive(i))
continue;

if (zp_get_user_first_zombie(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_FIRST_ZOMBIE", g_name[i], get_user_health(i))
else if (zp_get_user_last_human(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_LAST_HUMAN", g_name[i], get_user_health(i))
else if (zp_get_user_last_zombie(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_LAST_ZOMBIE", g_name[i], get_user_health(i))
else if (zp_get_user_nemesis(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_NEMESIS", g_name[i], get_user_health(i))
else if (zp_get_user_survivor(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_SURVIVOR", g_name[i], get_user_health(i))
else if (zpnm_get_user_sniper(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_SNIPER", g_name[i], get_user_health(i))
else if (zpnm_get_user_assassin(i))
pos += formatex(message[pos], charsmax(message) - pos, "%L^n", LANG_SERVER, "ZPNM_ASSASSIN", g_name[i], get_user_health(i))
/*
if (is_user_alive(i))
// set_hudmessage(g_hud_color_R[mode[0]], g_hud_color_G[mode[0]], g_hud_color_B[mode[0]], -1.0, 0.0, 0, 0.01, 3.57, 0.01, 0.01, -1)
set_hudmessage(0, 255, 255, -1.0, 0.0, 0, 0.01, 3.57, 0.01, 0.01, -1)
else
// set_hudmessage(g_hud_color_R[mode[0]], g_hud_color_G[mode[0]], g_hud_color_B[mode[0]], -1.0, 0.357, 0, 0.01, 3.57, 0.01, 0.01, -1)
set_hudmessage(0, 255, 255, -1.0, 0.357, 0, 0.01, 3.57, 0.01, 0.01, -1)

ShowSyncHudMsg(i, g_HudSync, "%s", message)*/
}

set_hudmessage(0, 255, 255, -1.0, 0.13157, 0, 0.0, 3.57, 0.0, 0.0, -1)
ShowSyncHudMsg(0, g_HudSync, message)
}

public display_enemy_remaining()
{
static message[128]

set_hudmessage(175, 175, 175, 0.0157, 0.975, 2, 0.02, 3.57, 0.01, 1.57, -1)

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

if (!zp_get_user_zombie(i))
{
formatex(message, charsmax(message), "%L", i, "ZPNM_ZOMBIES_REMAINING", g_zombie_count)
ShowSyncHudMsg(i, g_HudSync2, "%s", message)
}
else
{
formatex(message, charsmax(message), "%L", i, "ZPNM_HUMANS_REMAINING", g_human_count)
ShowSyncHudMsg(i, g_HudSync2, "%s", message)
}
}
}


17 Dec 2017 09:01
Profile multumesc WWW
Online
Membru, skill +2
Membru, skill +2
User avatar

Joined: 21 Jun 2013 12:40
Posts: 920
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Nu ai acel modul.


17 Dec 2017 10:18
Profile multumesc WWW
Membru, skill +1
Membru, skill +1

Joined: 26 Nov 2017 16:57
Posts: 107
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Te rog Frumos poti sa imi dai o mana de ajutor?.

imi explici ce trebuie sa fac si eu o fac.


17 Dec 2017 17:04
Profile multumesc WWW
Jan Darmu'
Jan Darmu'
User avatar

Joined: 25 Aug 2014 21:31
Posts: 5574
Location: Ploiesti
Detinator Steam: Da
CS Status: Sunt de nota 10 da' n-am timp
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost Moderator ajutator
Fost Super Moderator
eXtream Mod
Intermediar
Nume anterior : Christmas,
A k c 3 n 7
Fond eXtream: 0
pui acest plugin pe sv
| Afiseaza codul
/*================================================================================

------------------------------------------
-*- [CS] Ham Hooks for CZ Bots API 1.0 -*-
------------------------------------------

- Fixes RegisterHam player hooks not working for CZ bots

================================================================================*/

#include <amxmodx>
#include <hamsandwich>

#define INVALID_HANDLE -1
#define REGISTERHAM_CALLBACK "__RegisterHamBots"

new g_HamsNotRegistered
new g_CZBotPlayerID
new g_MaxPlayers
new cvar_bot_quota

new Array:g_PluginID
new Array:g_PluginCallback
new Array:g_HamFunctionID
new Array:g_HamFunctionIsPost
new Array:g_HamForwardHandle
new Array:g_HamForwardEnable
new g_BotHooksCount

public plugin_precache()
{
// Initialize dynamic arrays
g_PluginID = ArrayCreate(1, 1)
g_PluginCallback = ArrayCreate(64, 1)
g_HamFunctionID = ArrayCreate(1, 1)
g_HamFunctionIsPost = ArrayCreate(1, 1)
g_HamForwardHandle = ArrayCreate(1, 1)
g_HamForwardEnable = ArrayCreate(1, 1)
}

public plugin_init()
{
register_plugin("[CS] Ham Hooks for Bots API", "1.0", "WiLS")

g_MaxPlayers = get_maxplayers()
cvar_bot_quota = get_cvar_pointer("bot_quota")
}

public plugin_natives()
{
register_library("cs_ham_bots_api")
register_native("RegisterHamBots", "native_register_ham_bots")
register_native("DisableHamForwardBots", "native_disable_ham_forward_bots")
register_native("EnableHamForwardBots", "native_enable_ham_forward_bots")
}

public native_register_ham_bots(plugin_id, num_params)
{
new ham_function_id = get_param(1)

if (!IsHamValid(Ham:ham_function_id))
{
log_error(AMX_ERR_NATIVE, "[HAM] Invalid Function ID (%d).", ham_function_id)
return -1;
}

new plugin_callback[64]
get_string(2, plugin_callback, charsmax(plugin_callback))

if (get_func_id(plugin_callback, plugin_id) < 0)
{
log_error(AMX_ERR_NATIVE, "[HAM] Function %s not found.", plugin_callback)
return -1;
}

new is_post = get_param(3) ? true : false

ArrayPushCell(g_PluginID, plugin_id)
ArrayPushString(g_PluginCallback, plugin_callback)
ArrayPushCell(g_HamFunctionID, ham_function_id)
ArrayPushCell(g_HamFunctionIsPost, is_post)
ArrayPushCell(g_HamForwardHandle, INVALID_HANDLE)
ArrayPushCell(g_HamForwardEnable, true)
g_BotHooksCount++

// Reset flags
g_HamsNotRegistered = true

// Is there a CZ Bot connected?
if (g_CZBotPlayerID)
{
// Use it to register right away
register_ham_czbots(g_CZBotPlayerID)
}

return g_BotHooksCount - 1;
}

public native_disable_ham_forward_bots(plugin_id, num_params)
{
new ham_hook_index = get_param(1)

if (ham_hook_index < 0 || ham_hook_index > g_BotHooksCount - 1)
{
log_error(AMX_ERR_NATIVE, "[HAM] Invalid hook index (%d).", ham_hook_index)
return false;
}

// Hook is already disabled
if (!ArrayGetCell(g_HamForwardEnable, ham_hook_index))
return true;

// Is this forward already registered?
if (ArrayGetCell(g_HamForwardHandle, ham_hook_index) != INVALID_HANDLE)
{
// We have the forward handle, disable right away
new ham_forward_handle = ArrayGetCell(g_HamForwardHandle, ham_hook_index)
DisableHamForward(HamHook:ham_forward_handle)
}

// If we don't have a forward handle, disable it once it's registered
ArraySetCell(g_HamForwardEnable, ham_hook_index, false)
return true;
}

public native_enable_ham_forward_bots(plugin_id, num_params)
{
new ham_hook_index = get_param(1)

if (ham_hook_index < 0 || ham_hook_index > g_BotHooksCount - 1)
{
log_error(AMX_ERR_NATIVE, "[HAM] Invalid hook index (%d).", ham_hook_index)
return false;
}

// Hook is already enabled
if (ArrayGetCell(g_HamForwardEnable, ham_hook_index))
return true;

// Is this forward already registered?
if (ArrayGetCell(g_HamForwardHandle, ham_hook_index) != INVALID_HANDLE)
{
// We have the forward handle, enable right away
new ham_forward_handle = ArrayGetCell(g_HamForwardHandle, ham_hook_index)
EnableHamForward(HamHook:ham_forward_handle)
}

// If we don't have a forward handle, enable it once it's registered
ArraySetCell(g_HamForwardEnable, ham_hook_index, true)
return true;
}

public client_disconnect(id_leaving)
{
// Our CZ Bot used for registering hooks is leaving
if (id_leaving == g_CZBotPlayerID)
{
// Can we find a replacement?
new index = 1
while ((!is_user_connected(index) || !is_user_bot(index) || index == id_leaving) && (index <= g_MaxPlayers))
index++ // keep looping

// Update player ID
if (index <= g_MaxPlayers)
g_CZBotPlayerID = index
else
g_CZBotPlayerID = 0
}
}

public client_putinserver(id)
{
// CZ bots seem to use a different "classtype" for player entities
// (or something like that) which needs to be hooked separately
if (is_user_bot(id) && cvar_bot_quota)
{
// Set a task to let the private data initialize
set_task(0.1, "register_ham_czbots", id)
}
}

// Register Ham Forwards for CZ bots
public register_ham_czbots(id_bot)
{
// Make sure it's a CZ bot and it's still connected
if (!is_user_connected(id_bot) || !get_pcvar_num(cvar_bot_quota))
return;

// Save CZ Bot Player ID in case we need to register any more forwards later
g_CZBotPlayerID = id_bot

// Nothing to hook?
if (!g_HamsNotRegistered)
return;

new index, plugin_id, plugin_filename[64], ham_function_id, plugin_callback[64], is_post, func_id, ham_forward_handle, plugin_is_paused
for (index = 0; index < g_BotHooksCount; index++)
{
// Already registered
if (ArrayGetCell(g_HamForwardHandle, index) != INVALID_HANDLE)
continue;

plugin_id = ArrayGetCell(g_PluginID, index)
ham_function_id = ArrayGetCell(g_HamFunctionID, index)
ArrayGetString(g_PluginCallback, index, plugin_callback, charsmax(plugin_callback))
is_post = ArrayGetCell(g_HamFunctionIsPost, index)
func_id = get_func_id(REGISTERHAM_CALLBACK, plugin_id)
plugin_is_paused = (callfunc_begin_i(func_id, plugin_id) == -2) ? true : false // -2 = Function not executable

if (plugin_is_paused)
{
// Unpause plugin before callfunc
get_plugin(plugin_id, plugin_filename, charsmax(plugin_filename))
unpause("c", plugin_filename, REGISTERHAM_CALLBACK) //unpause("ac", plugin_filename)

if (callfunc_begin_i(func_id, plugin_id) == -2)
{
pause("c", plugin_filename, REGISTERHAM_CALLBACK) //pause("ac", plugin_filename)
log_amx("ERROR: callfunc_begin_i: Function still not executable after unpausing - plugin id %d (%s) - func id %d (%s)", plugin_id, plugin_filename, func_id, REGISTERHAM_CALLBACK)
continue;
}
}

callfunc_push_int(ham_function_id)
callfunc_push_int(id_bot)
callfunc_push_str(plugin_callback)
callfunc_push_int(is_post)
ham_forward_handle = callfunc_end()

if (plugin_is_paused)
{
// Pause plugin again after callfunc
pause("c", plugin_filename, REGISTERHAM_CALLBACK) //pause("ac", plugin_filename)
}

ArraySetCell(g_HamForwardHandle, index, ham_forward_handle)

// Ham forward was disabled
if (!ArrayGetCell(g_HamForwardEnable, index))
{
DisableHamForward(HamHook:ham_forward_handle)
}
else if (ham_function_id == _:Ham_Spawn && is_user_alive(id_bot) && !plugin_is_paused)
{
// If the bot has already spawned, call Ham_Spawn forward manually for him (bugfix)
func_id = get_func_id(plugin_callback, plugin_id)
callfunc_begin_i(func_id, plugin_id)
callfunc_push_int(id_bot)
callfunc_end()
}
}

// Ham forwards for CZ bots succesfully registered
g_HamsNotRegistered = false
}

vei avea nevoie de acest inc ca sa il poti compila
| Afiseaza codul
#if defined _cs_ham_bots_api_included
#endinput
#endif
#define _cs_ham_bots_api_included

#if AMXX_VERSION_NUM >= 175
#pragma reqlib cs_ham_bots_api
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib cs_ham_bots_api
#endif
#else
#pragma library cs_ham_bots_api
#endif

/**
* Hooks the virtual table for CZ Bots entity class.
* An example would be: RegisterHamBots(Ham_TakeDamage, "player_hurt");
* Look at the Ham enum for parameter lists.
*
* @param function The function to hook.
* @param callback The forward to call.
* @param post Whether or not to forward this in post.
* @return Returns a handle to the forward. Use EnableHamForwardBots/DisableHamForwardBots to toggle the forward on or off.
*/
native RegisterHamBots(Ham:function, const Callback[], Post=0);

/**
* Stops a ham forward from triggering for CZ Bots.
* Use the return value from RegisterHamBots as the parameter here!
*
* @param fwd The forward to stop.
*/
native DisableHamForwardBots(fwd);

/**
* Starts a ham forward back up for CZ Bots.
* Use the return value from RegisterHamBots as the parameter here!
*
* @param fwd The forward to re-enable.
*/
native EnableHamForwardBots(fwd);


// This is the callback from the module. Do not modify this!
public HamHook:__RegisterHamBots(Ham:function, EntityId, const Callback[], Post)
return RegisterHamFromEntity(function, EntityId, Callback, Post);

_________________
ImageImage

Lista intermediari
Nu ezita sa ma contactezi la 112 pentru interventii speciale: S.I.A.S
REGULI GENERALE
REGULILE SECTIUNII ANUNTURI


17 Dec 2017 18:17
Profile multumesc
Membru, skill +1
Membru, skill +1

Joined: 26 Nov 2017 16:57
Posts: 107
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
acuma primesc asta

2/17/2017 - 17:25:29: [AMXX] Plugin "zpnm_gp_multi_hud_info.amxx" failed to load: Plugin uses an unknown function (name "zpnm_get_user_assassin") - check your modules.ini.


17 Dec 2017 18:26
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group