Hey all. Im trying to make a thing to troll a player. Lets say somebody types in "troll_slow" and then has to type in the name of the player. Now, ive done that, but im having problems. When i type in the name it just does the same (Sends In Console "Usage : troll_slow <name> - Slows The Player")
Heres the code
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
public plugin_init()
{
register_plugin("Troll Test Plugin", "v1.0", "MaSTeR64");
register_concmd("troll_slow", "TROLL_SLOW", ADMIN_IMMUNITY, "<name> - Slows The Player");
}
public TROLL_SLOW(id, level, cid)
{
if(!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED;
new target[32]
read_argv(1, target, 31)
new player = cmd_target(id, target, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF)
if (!player)
return PLUGIN_HANDLED;
set_user_maxspeed(player, 100.0);
return PLUGIN_HANDLED;
}