如何把这个代码改成:购买武器后,低于500,+300金币
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "xxx"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Wilian M.")
RegisterHam(Ham_Spawn, "player", "xHam_Spawn", 1)
}
public xHam_Spawn(id)
{
if(is_user_connected(id) && is_user_alive(id))
{
new iMoney = cs_get_user_money(id)
if(iMoney < 500)
cs_set_user_money(id, iMoney + 300)
}
}
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "xxx"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Wilian M.")
RegisterHam(Ham_Spawn, "player", "xHam_Spawn", 1)
}
public xHam_Spawn(id)
{
if(is_user_connected(id) && is_user_alive(id))
{
new iMoney = cs_get_user_money(id)
if(iMoney < 500)
cs_set_user_money(id, iMoney + 300)
}
}