Cześć mam problem z natywami, problem polega na tym że nie działają jak trzeba, jeżeli sobie w innym pluginie dodam natywm expa np. Wlac do klanu 200 expa to wpłaca wirtualny exp ale nie jest to ten sam exp, nie zabiera mi z expa i dodaje do klanu tego expa.
Natywy
public plugin_natives() { // Player natives // register_native("set_user_zloto", "native_set_user_zloto", 1); register_native("get_user_zloto", "native_get_user_zloto", 1); register_native("max_get_user_zloto", "native_max_get_user_zloto", 1); } ---------------------------- public native_set_user_zloto(id, ile) { player_xp[id]=ile; } public native_get_user_zloto(id) { return player_xp[id]; } public native_max_get_user_zloto(id) { return player_xp_all[id]; }
public addexp(id, level, cid){ if(!cmd_access(id, level, cid, 3)){ return PLUGIN_HANDLED; } new arg1[33]; new arg2[10]; read_argv(1,arg1,32); read_argv(2,arg2,9); new player = cmd_target(id, arg1, 0); remove_quotes(arg2); new exp = str_to_num(arg2); if(exp != 0 && exp < 0 ){ OdejmijExp(player,exp); } else if(exp != 0 && exp > 0 ){ DajExp(player,exp); } return PLUGIN_HANDLED; }
Ma ktoś jakiś pomysł?
Za pomoc wynagradzam +++
Użytkownik Pawlik4Ver edytował ten post 21.02.2016 11:02