AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Can someone remove the say command...and make it work (https://forums.alliedmods.net/showthread.php?t=269610)

PinHeaDi 08-09-2015 16:43

Can someone remove the say command...and make it work
 
Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>

public plugin_precache()
{
  precache_model("models/sky.mdl")
}
 
public plugin_init()
{
  register_plugin("Apokalyptic sky","1.0","")
  register_clcmd("say /sky","dark_sky")
}
 
public dark_sky(id)
{
        new g_SkyEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
        if (pev_valid(g_SkyEnt))
        {
                set_pev(g_SkyEnt, pev_solid, SOLID_NOT)
                new Float:origin[3]
                pev(id, pev_origin, origin)
                entity_set_origin(g_SkyEnt,origin)
                entity_set_float(g_SkyEnt,EV_FL_animtime,2.0)
                entity_set_float(g_SkyEnt,EV_FL_framerate,1.0)
                entity_set_int(g_SkyEnt,EV_INT_sequence,0)
                entity_set_model(g_SkyEnt,"models/sky.mdl")
                dllfunc(DLLFunc_Spawn, g_SkyEnt)
        }
}


Kosidone 08-10-2015 05:01

Re: Can someone remove the say command...and make it work
 
try .

Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>

public plugin_precache()
{
  precache_model("models/sky.mdl")
}
 
public plugin_init()
{
  register_plugin("Apokalyptic sky","1.0","")
//  register_clcmd("say /sky","dark_sky")
}
 
public dark_sky(id)
{
        new g_SkyEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
        if (pev_valid(g_SkyEnt))
        {
                set_pev(g_SkyEnt, pev_solid, SOLID_NOT)
                new Float:origin[3]
                pev(id, pev_origin, origin)
                entity_set_origin(g_SkyEnt,origin)
                entity_set_float(g_SkyEnt,EV_FL_animtime,2.0)
                entity_set_float(g_SkyEnt,EV_FL_framerate,1.0)
                entity_set_int(g_SkyEnt,EV_INT_sequence,0)
                entity_set_model(g_SkyEnt,"models/sky.mdl")
                dllfunc(DLLFunc_Spawn, g_SkyEnt)
        }
}


PinHeaDi 08-10-2015 05:33

Re: Can someone remove the say command...and make it work
 
Code:

//// sky.sma
//
// C:\Users\SSadistic\Desktop\Zombie_Escape_2.5f\Zombie_Escape_2.5f\addons\amxmodx\scripting\sky.sma(1) : error 010: invalid function or declaration
// C:\Users\SSadistic\Desktop\Zombie_Escape_2.5f\Zombie_Escape_2.5f\addons\amxmodx\scripting\include\engine.inc(253) : error 017: undefined symbol "kRenderFxNone"
//
// 2 Errors.
// Could not locate output file compiled\sky.amx (compile failed).
//
// Compilation Time: 0,59 sec


4ever16 08-11-2015 03:12

Re: Can someone remove the say command...and make it work
 
Remove say /sky or replace it with something like say /writewhatyouwanthere

PinHeaDi 08-11-2015 11:55

Re: Can someone remove the say command...and make it work
 
Quote:

Originally Posted by 4ever16 (Post 2331889)
Remove say /sky or replace it with something like say /writewhatyouwanthere

Same error

ironskillz1 08-11-2015 13:21

Re: Can someone remove the say command...and make it work
 
Quote:

Originally Posted by PinHeaDi (Post 2332018)
Same error

It seems like your compiler is broken. Maybe an include that is bad or something else.
My compiler compile this just fine.

You can also try this "online compiler"
it compiles the sma without any errors.
https://spider.limetech.org/


All times are GMT -4. The time now is 19:14.

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