下面是引用 apple321s 于 2011-06-17 20:39 发表的 :
小弟还是不明白,能以下当例子吗?
要我帮您写插件也不是这样用骗的=w=
-----------------------------------------------------------
原本的
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
public plugin_init()
{
register_plugin("name", "1.0", "bill")
RegisterHam(Ham_Spawn, "player", "fwd_PlayerSpawn", 1)
}
public fwd_PlayerSpawn(id)
{
cs_set_user_money(id, 16000, 1)
}
--------------------------------------------------------
后来的
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
new XXX
public plugin_init()
{
register_plugin("name", "1.0", "bill")
XXX = register_cvar("F|_|C|<", "16000")
RegisterHam(Ham_Spawn, "player", "fwd_PlayerSpawn", 1)
}
public fwd_PlayerSpawn(id)
{
cs_set_user_money(id,get_pcvar_num(XXX), 1)
}
----------------------------------------------------
之后输入指令
F|_|C|< 99999
就有99999元可以用了