Hello. I'm editing a plugin that I found somewhere in this forum to change the speed when using the knife. I added a cvar, the plugin is working but when compile I get these warnings:
Warning: Tag mismatch on line 20. [new MAXSPEED = get_pcvar_float(g_MAXSPEED);]
Warning: Tag mismatch on line 24. [set_user_maxspeed(id, MAXSPEED)]
What's wrong with the plugin? Please help me!
Thanks in advance
PHP Code:
#include <amxmodx>
#include <fun>
#define PLUGIN "Faster with knife"
#define VERSION "0.1"
#define AUTHOR "v3x"
new g_MAXSPEED
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("CurWeapon","Event_CurWeapon","b");
g_MAXSPEED = register_cvar("knife_speed", "420.0")
}
public Event_CurWeapon( id )
{
new clip, ammo, weapon = get_user_weapon(id,clip,ammo);
new MAXSPEED = get_pcvar_float(g_MAXSPEED);
if(weapon == CSW_KNIFE)
{
set_user_maxspeed(id, MAXSPEED)
}
}