Hello, i want to create easiest way to use some of effects.
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_const>
public plugin_init ()
{
register_clcmd( "say /test", "Test" );
}
stock MakeFx(Client,const format[],{_,Float}:...)
{
if(format)
{
switch(format)
{
case "fxLightning":
{
// (sprite index)
// (life in 0.1's)
// (line width in 0.1's)
// (noise amplitude in 0.01's)
// (red)
// (green)
// (blue)
// (brightness)
// (scroll speed in 0.1's)
if(callfunc_begin("fxLightning") )
{
client_print(Client,print_chat,"function called and executed");
}
}
default:
{
//not found
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_HANDLED;
}
public Test(id)
{
MakeFx( id, "fxLightning" );
}
and i get this error:
array must be indexed (variable -"format")
Any ideas?;D
__________________