Quote:
Originally Posted by itoxicreal
the plugin dosent work and those things are causing it, so if someone can fix it, it would mean alot
|
Create the natives ex: native zp_cs_get_user_money( id ), native zp_cs_set_user_money( id, amount )
Code:
public plugin_natives()
{
register_native("zp_cs_get_user_money", "_get_money", 1)
register_native("zp_cs_set_user_money", "native_set_money", 1)
register_native("zp_get_user_exp", "native_get_exp", 1)
register_native("zp_set_user_exp", "native_set_exp", 1)
}
public give_money_exp(id) {
if(g_HasMoneynEXP[id]) {
client_print(id, print_chat, "[CSO] Retry again after map changes to get more Money&Exp!");
return PLUGIN_HANDLED;
}
new value = random_num(20000, 100000)
new exp = random_num(200, 1500)
it is not possible to use native from register
zp_cs_set_user_money(id, zp_cs_get_user_money(id) + Values[value]);
zp_set_user_exp(id, zp_get_user_exp(id) + Exps[exp]);
client_print(id, print_chat, "[CSO] You have just received %d $ and exp, try again after map change!", Values[value], Exps[exp]);
g_HasMoneynEXP[id] = true;
return PLUGIN_HANDLED;
}
Show "_get_money" function
Edit: if the plugin already has these native or include then no one can help you without see the full code
__________________