For 1: typing spawn in console makes you spawn? Since when?
For 2: It's your usage of ns_set_res. Try this instead:
Code:
#include <amxmodx>
#include <amxmisc>
#include <ns>
public plugin_init()
{
register_plugin("Give Resources", "1.0", "XunTric")
register_concmd("amx_res", "cmdres", ADMIN_KICK, "<name> <resources to give>")
}
public cmdres(id,level,cid)
{
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg1[32], arg2[32]
read_argv(1,arg1,31)
read_argv(2,arg2,31)
new player = cmd_target(id,arg1,2)
if(!player)
return PLUGIN_HANDLED
ns_set_res(player,ns_get_res(player) + str_to_num(arg2))
client_print(player, print_chat, "The admin gave you %i resources",str_to_num(arg2))
return PLUGIN_HANDLED
}
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS