Witam, mam maly problem. Korzystajac z tego: http://amxx.pl/topic...as-i-perki-vip/ dodalem koszt w monetach za klase. Wszystko dziala, ale po ponownym wejsciu na serwer nie zapisuje kupionych klas, tzn. trzeba jeszcze raz placic. Jak zrobic zapis, by klasa zostala przyznana na zawsze ? Probowalem z nvault, ale cos mi nie wychodzi.
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <codmod> #include <hamsandwich> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "Komandos"; new const opis[] = "Natychmiastowe zabicie z noza(PPM)"; new const bronie = 1<<CSW_DEAGLE; new const zdrowie = 40; new const kondycja = 60; new const inteligencja = 5; new const wytrzymalosc = 0; native cod_get_user_coins(id); native cod_set_user_coins(id, wartosc); #define KOSZT 10 //Ile ma kosztowac klasa ? public plugin_init() { register_plugin(nazwa, "1.0", "QTM_Peyote"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id) { if(cod_get_user_coins(id) < KOSZT) { client_print(id, print_chat, "Klasa kosztuje %d monet ! Nie masz na nia kasy...", KOSZT); return COD_STOP; } ma_klase[id] = true; cod_set_user_coins(id, cod_get_user_coins(id)-KOSZT); return COD_CONTINUE; } public cod_class_disabled(id) ma_klase[id] = false; public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; }