I want plugin 'to do something' when admin with specific flag press "buy" button. I was trying to do it in several ways, but I don't understand the read_arg part correctly, so it didn't work. All I was able to do is to copy the read_arg part from another plugin and register a new command. This way it worked.
PHP Code:
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_setgrav", "cmdGravset", ADMIN_BAN)
}
public cmdGravset(id,level,cid)
{
if ( !cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
if (read_argc() == 2) {
new argument[10]
read_argv(1,argument,9)
if (equal(argument, "on"))
{