I wan't Fog in my ZS(Zombie Survival) server. But my plugins doesn't work...
CODE:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#define PLUGIN "Fog"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"
new went
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache()
{
went = create_entity("env_fog")
if(went)
{
entity_set_string(went, EV_SZ_classname, "env_fog")
DispatchKeyValue(went,"density","0.001")
DispatchKeyValue(went,"rendercolor","116 137 147")
}
}
ERROR:
Quote:
L 10/28/2007 - 17:49:41: Info (map "de_dust2") (logfile "error_102807.log")
L 10/28/2007 - 17:49:41: [ENGINE] Invalid entity 15
L 10/28/2007 - 17:49:41: [AMXX] Displaying debug trace (plugin "ws_fog.amxx")
L 10/28/2007 - 17:49:41: [AMXX] Run time error 10: native error (native "entity_set_string")
L 10/28/2007 - 17:49:41: [AMXX] [0] ws_fog.sma::plugin_precache (line 21)
|
I also try'd my old script:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#define PLUGIN "Fog"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"
new went
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache()
{
went = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_fog"))
DispatchKeyValue(went,"density","0.001")
DispatchKeyValue(went,"rendercolor","116 137 147")
}
ERROR:
Quote:
L 10/28/2007 - 17:58:00: Info (map "de_dust2") (logfile "error_102807.log")
L 10/28/2007 - 17:58:00: [ENGINE] Invalid entity 15
L 10/28/2007 - 17:58:00: [AMXX] Displaying debug trace (plugin "fog.amxx")
L 10/28/2007 - 17:58:00: [AMXX] Run time error 10: native error (native "DispatchKeyValue")
L 10/28/2007 - 17:58:00: [AMXX] [0] fog.sma::plugin_precache (line 19)
|
I reinstalled AMXX... - nothing... It worked a month ago! I don't know why it isn't working... the Error doesn't help me... I hope someone can.
Thanks.
Sorry for my english.
EDIT: But it works on my second server... even if i copied it's ADDONS... maybe it's cstrike problem...