![]() |
|
Ostatnio dostępny? - Printable Version +- CSHOT.PL - Pluginy amxx , plugins amxx , server game counter strike , serwery gier , forum (https://cshot.pl) +-- Forum: Counter-Strike (https://cshot.pl/forumdisplay.php?fid=54) +--- Forum: Counter-Strike 1.6 (https://cshot.pl/forumdisplay.php?fid=55) +---- Forum: PLUGINY (https://cshot.pl/forumdisplay.php?fid=62) +---- Thread: Ostatnio dostępny? (/showthread.php?tid=2530) |
Ostatnio dostępny? - Poster - 09-18-2025 [TITLE] Ostatnio dostępny? [URL] https://amxx.pl/topic/6733-ostatnio-dostępny/ **Opis:** Plugin poprzez wpisanie komendy wyświetla kiedy ostatnio jakiś gracz grał na serwerze. Czas jest pokazywany w formacie: lata, miesiące, dni, godziny, minuty, sekundy **Instalacja:** **Plik players_seen. amxx** wrzucamy do cstrike/addons/amxmodx/plugins **Edytujemy plugins.ini** i dopisujemy na końcu: players_seen.amxx **Plik players_seen.sma** wrzucamy do cstrike/addons/amxmodx/scripting **Plik fdata.inc** wrzucamy do cstrike/addons/amxmodx/scripting/include Restartujemy serwer lub zmienamy mapę. **Komendy:** say /seen x say_team /seen x gdzie w miejsce x wpisujemy nick gracza. **Screen:** **Plik fdata.inc :** /*File Data Store System */ /*Type : Include*/ /* */ /* This file is provided as is (no warranties). */ /* */ stock fdata_exists(File[], Key[], Data[]) { new Buffer[256], Currkey[128], Currvalue[64]; new Line = 0, Len, Currline = -1; if(file_exists(File)) { while((Line = read_file(File, Line++, Buffer, sizeof Buffer - 1, Len))) { if((Buffer[0] != '/' && Buffer[1] != '/') && Buffer[0] != ';') { strtok(Buffer, Currkey, sizeof Currkey - 1, Currvalue, sizeof Currvalue - 1, ';', 0); if(equali(Currkey, Key)) { copy(Data, 128, Currvalue); Currline = Line - 1; break; } else if(equal(Currkey,"") || !Currkey[0]) Currline = Line - 1; } } } else { static Num; Num += 1; server_print("Warning: Error #%d - File %s was not founded!", Num, File); } return Currline; } stock fdata_set(File[], Key[], Data[]) { new Buffer[256], Blank[128]; new Line = fdata_exists(File, Key, Blank); formatex(Buffer, sizeof Buffer - 1,"%s;%s", Key, Data); write_file(File, Buffer, Line); return Line; } stock fdata_get(File[], Key[], Data[]) { new Line = fdata_exists(File, Key, Data); return Line; } stock fdata_remove(File[], Key[]) { new Data[128]; new Line = fdata_exists(File, Key, Data); write_file(File,"", Line); return Line; } Załączone pliki * [url=https://amxx.pl/index.php?app=core&module=attach§ion=attach&attach_id=1424 "Pobierz załącznik"] [/url] [url=https://amxx.pl/index.php?app=core&module=attach§ion=attach&attach_id=1424 "Pobierz załącznik"]**players_seen.amxx**[/url] **6,78 KB** 111 Ilość pobrań * [url=https://amxx.pl/index.php?app=core&module=attach§ion=attach&attach_id=1425 "Pobierz załącznik"] [/url] [url=https://amxx.pl/index.php?app=core&module=attach§ion=attach&attach_id=1425 "Pobierz załącznik"]**players_seen.sma**[/url] **4,13 KB** 297 Ilość pobrań [ **players_seen.amxx**](/kompilator/plugin/1425"Pobierz plik AMXX") Załączniki: players_seen.sma |