Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

FAT1M - zdjęcie

FAT1M

Rejestracja: 22.12.2014
Aktualnie: Nieaktywny
Poza forum Ostatnio: 12.03.2015 19:44
-----

Moje tematy

[KOSZ] proszę o modyfikacje klasy Bruce Lee

21.02.2015 14:55

WItam serdecznie,

 

Otóż prosiłbym o modyfikacje poniższej klasy w ten sposób aby mogła się ona tylko raz w rundzie odrodzić. 

 

Z góry dziękuje i daje +

 

 

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta>
#define ZADANIE_WSKRZES 6240
#define TASK_WYSZKOLENIE_SANITARNE 736

new const maxClip[31] = { -1, 13, -1, 10,  1,  7,  1,  30, 30,  1,  30,  20,  25, 30, 35, 25,  12,  20, 
10,  30, 100,  8, 30,  30, 20,  2,  7, 30, 30, -1,  50 };
        
new const nazwa[]   = "Bruce Lee";
new const opis[]    = "Dostaje full magazynek za fraga, regeneruje mu sie utracone hp";
new const bronie    = (1<<CSW_HEGRENADE)|(1<<CSW_P90)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE);
new const zdrowie   = 20;
new const kondycja  = 25;
new const inteligencja = 0;
new const wytrzymalosc = 0;


new bool:ma_klase[33];
    
public plugin_init()
{
	register_plugin(nazwa, "1.0", "FA1M");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	register_event("DeathMsg", "DeathMsg", "ade");
	RegisterHam(Ham_Killed, "player", "Killed", 1);
}

public cod_class_enabled(id)
{
	ma_klase[id] = true;
	umiejetnosc_uzyta[id] = false;
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	give_item(id, "weapon_flashbang");
	set_task(1.0, "WyszkolenieSanitarne", id+TASK_WYSZKOLENIE_SANITARNE); /// w Miejsce X wpisz czas
	ma_klase[id] = true;
	
	return COD_CONTINUE;
}

public cod_class_disabled(id)
	ma_klase[id] = false;


	
	
public DeathMsg()
{
        new killer = read_data(1);
        
        if(!is_user_connected(killer))
                return PLUGIN_CONTINUE;
        
        if(ma_klase[killer])
        {
                new cur_health = pev(killer, pev_health);
                new Float:max_health = 100.0+cod_get_user_health(killer);
                new Float:new_health = cur_health+20.0<max_health? cur_health+20.0: max_health;
                set_pev(killer, pev_health, new_health);
                
                new weapon = get_user_weapon(killer);
                if(maxClip[weapon] != -1)
                        set_user_clip(killer, maxClip[weapon]);
        }
        
        
        return PLUGIN_CONTINUE;
}

stock set_user_clip(id, ammo)
{
        new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
        get_weaponname(weapon, weaponname, 31);
        while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
                if (pev(weaponid, pev_owner) == id) {
                set_pdata_int(weaponid, 51, ammo, 4);
                return weaponid;
        }
        return 0;
}

public WyszkolenieSanitarne(id)
{
id -= TASK_WYSZKOLENIE_SANITARNE;


if(!is_user_connected(id))
return PLUGIN_CONTINUE;


if(ma_klase[id])
{
set_task(1.0, "WyszkolenieSanitarne", id+TASK_WYSZKOLENIE_SANITARNE); /// w miejsce X wpisz czas


if(is_user_alive(id))
{
new cur_health = get_user_health(id);
new max_health = 100+cod_get_user_health(id);
new new_health = cur_health+1<max_health? cur_health+1: max_health; // w miejsce Z wpisz ilosc HP
set_user_health(id, new_health);
}
}
return PLUGIN_CONTINUE;
}  

public Killed(id)
{
    if(ma_klase[id])

        set_task(0.1, "Wskrzes", id+ZADANIE_WSKRZES);
   
}
public Wskrzes(id)

    ExecuteHamB(Ham_CS_RoundRespawn, id-ZADANIE_WSKRZES);

    

    
 

Prośba o modyfikacje pluginu

07.02.2015 18:22

Witam serdecznie, otóż pobrałem plugin który tworzy hasła dla graczy i zapisuje je w users.ini, nie było by z tym kłopotu gdyby on nie zapisywałby ich w postaci ciągłej tzn. jeden użytkownik i od razu drugi  itd itd. Chodzi mi o to aby każdy kolejny użytkownik swoje hasło miał zapisywane w nowej linijce w users.ini, gdyż czasami kumulacja haseł w jednej linijce powoduje crash .

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "Simple Account Maker"
#define VERSION "1.0"
#define AUTHOR "G[o]Q"

#define Keys (1<<0)|(1<<1)
#define Keysheadmenu (1<<0)|(1<<1)|(1<<2)|(1<<4)|(1<<9)
#define Keysadmin (1<<0)|(1<<1)|(1<<2)|(1<<9) // Keys: 1230


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_menucmd(register_menuid("admin"), Keysadmin, "Pressedadmin")
	register_menucmd(register_menuid("headmenu"), Keysheadmenu, "Pressedheadmenu")
	register_menucmd(register_menuid("delete"), Keys, "Presseddelete")
	register_menucmd(register_menuid("edit"), Keys, "Pressededit")
	
	register_concmd("haslo","rejestruj",-1," ");
	register_concmd("usun","usun_one",ADMIN_IMMUNITY," ");
	register_clcmd("say /konto","Showheadmenu")

	set_task(300.0,"pokaz",0,_,_,"b")
	
}
public rejestruj(id,level,cid){
	new haslo[32];
	read_argv(1, haslo, 31);
	
	if (sprawdz(id)) istnieje(id)
	else create(id,haslo)
	
	return PLUGIN_HANDLED
}
public mesmode(id){
	if (!sprawdz(id))
		console_cmd(id,"messagemode haslo")	
	else ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku juz istnieje !!!")

	return PLUGIN_HANDLED;
}
public sprawdz(id){
	new name[32];
	new linijka=0,text[128],chars
	static configdir[64],plik[128]
	new nick[32]
	get_user_name(id,name,31)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	
	
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) return 1
	}
	while(linijka!=0)
	return 0
}
public istnieje(id){
	ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku juz istnieje !!!")
	return PLUGIN_HANDLED
}
public usun(id){
	
	new name[32],text[128],chars ,nick[32]
	new linijka=0
	static configdir[64],plik[128]
	
	get_user_name(id,name,31)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) break 
	}
	while(linijka!=0)
	write_file(plik,"",linijka-1)
	return PLUGIN_CONTINUE
}
public create(id,pass[32]){
	new wpis[128]
	new nick[32];
	static configdir[64],plik[128]
	get_user_name(id,nick,31)
	if (equal(pass,"")) return PLUGIN_HANDLED
	format(wpis,127,"^"%s^" ^"%s^" ^"z^" ^"a^"",nick,pass)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	write_file(plik,wpis,-1)
	
	
	ColorChat(id, GREEN,"[SAM]^x03 HASLO ZOSTALO ZAPISANE")
	ColorChat(id, GREEN,"[SAM]^x01 HASLO:^x04 %s",pass)
	ColorChat(id, GREEN,"[SAM]^x01 Aby wejsc na server wpisz w consoli:^x03 setinfo _pw ^"^x04%s^x03^"",pass)
	
	client_print(id,print_console,"~*~ HASLO ZOSTALO ZAPISANE")
	client_print(id,print_console,"~*~ HASLO :%s",pass)
	client_print(id,print_console,"~*~ Aby wejsc na server wpisz w consoli: setinfo _pw ^"%s^"",pass)
	
	return PLUGIN_CONTINUE
}
public edytuj(id){
	usun(id)
	mesmode(id)
}

public pokaz(){
	ColorChat(0, TEAM_COLOR,"[SAM]^x04 Nie chcesz aby ktos gral na twoim nicku? zaloz konto wpisujac: ^x03 /konto")
}

public Showdelete(id) {
	if (!sprawdz(id)){
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	else show_menu(id, Keys, "\rCzy na pewno chcesz usunac ?^n\w1: \rTAK^n\w2: NIE^n", -1, "delete") 
	return PLUGIN_CONTINUE
}

public Presseddelete(id, key) {
	if (key==0){
		usun(id)
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Rezerwacja zostala usunieta !!!")
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}
public Showedit(id) {
	if (!sprawdz(id)){
		ColorChat(id,TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	else show_menu(id, Keys, "\rCzy na pewno chcesz zmienic haslo?^n\w1: \rTAK^n\w2: NIE^n", -1, "edit") 
	return PLUGIN_CONTINUE
}

public Pressededit(id, key) {
	if (key==0){
		edytuj(id)
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Wpis zostal zaktualizowany !!!")
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}

public Showheadmenu(id) {
	new name[32]
	new menutext[256]
	get_user_name(id,name,31)
	new keyss=(get_user_flags(id)&ADMIN_IMMUNITY)?((1<<0)|(1<<1)|(1<<2)|(1<<4)|(1<<9)):((1<<0)|(1<<1)|(1<<2)|(1<<9))
	format(menutext,255,"\rMenu \y(konto %s)\r:^n\y1: \w Dodaj rezerwacje^n\y2: \w Usun rezerwacje^n\y3: \w Edytuj rezerwacje^n^n%s5: \w Menu Admina^n^n^n^n\y0:\w Wyjscie",name,(get_user_flags(id)& ADMIN_IMMUNITY)?"\y":"\d" ) 
	show_menu(id, keyss,menutext, -1, "headmenu") 
}

public Pressedheadmenu(id, key) {
	
	switch (key) {
		case 0: { // 1
			mesmode(id)
		}
		case 1: { // 2
			Showdelete(id)
		}
		case 2: { // 3
			Showedit(id)
		}
		case 4:{
			Showadmin(id)
		}
	}
}
public usun_all(id){
	
	new text[128],chars ,nick[32],haslo[32],flagi[32],flagi2[32]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31,haslo,31,flagi,31,flagi2,31)
		if (equali(flagi,"z")) write_file(plik,"",linijka-1)
	}
	while(linijka!=0)
	
	return PLUGIN_CONTINUE
}
public sprawdz2(name[]){
	
	
	new linijka=0,text[128],chars
	static configdir[64],plik[128]
	new nick[32]
	
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	
	
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) return 1
	}
	while(linijka!=0)
	return 0

}
public usun_one(id,level,cid){
	new name[32];
	read_argv(1, name, 31);
	
	if (!sprawdz2(name)){
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	usun_1(id,name)
	
	return PLUGIN_HANDLED
}
public mesdel(id){
	console_cmd(id,"messagemode usun")	
	return PLUGIN_HANDLED;
}
public usun_1(id,name[32]){
	new text[128],chars ,nick[32]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equal(name,nick)){
			write_file(plik,"",linijka-1)
			break
		}
	}
	while(linijka!=0)
	ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku zostalo usuniete !!!")
}
public poka_all(id){
	new text[128],chars ,nick[32],haslo[32],flagi[32],flagi2[32],spis[1024]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	format(plik,127,"%s/users.ini",configdir)
	format(spis,1023,"<html><body background=^"http://amxx.pl/uploads/images/amxx.pl-1271592209-U6279.png^">")
	format(spis,1023,"%s <center><table border=^"1^" style=^"margin: auto; border-style: solid; border-color: black; border-width: 1px; border-collapse: collapse^"><tbody><tr>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Nick</td>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Haslo</td>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Flagi</td></tr>",spis)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31,haslo,31,flagi,31,flagi2,31)
		if (equal(flagi,"z")&&linijka!=0){
		
			format(spis,1023,"%s <tr> <td style=^"color: white; text-align: center^">%s</td>",spis,nick)
			format(spis,1023,"%s <td style=^"color: white; text-align: center^">%s</td><td style=^"color: white; text-align: center^">%s</td></tr>",spis,haslo,flagi)
			
		}
		
	}
	while(linijka!=0)
	format(spis,1023,"%s </tbody> </table></center></body><html>",spis)
	show_motd(id,spis,"KONTA GRACZY")
	return PLUGIN_CONTINUE	
}

public Showadmin(id) {
	show_menu(id, Keysadmin, "\rMenu admina:^n\y1: \wUsun wszystkie rezerwacje^n\y2: \wUsun jedna rezerwacje^n\y3: \wPokaz wszystkie rezerwacje^n\y^n^n^n^n0: W\wyjscie^n", -1, "admin") // Display menu
}

public Pressedadmin(id, key) {
	
	switch (key) {
		case 0: { // 1
			usun_all(id)
		}
		case 1: { // 2
			mesdel(id)
		}
		case 2: { // 3
			poka_all(id)
		}
		
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

Bardzo proszę o modyfikacje tego oto pluginu.

 

Dziękuje bardzo

 

FAT1M

Admin może dać tylko perma

22.12.2014 21:57

Witam serdecznie.

 

Otóż jest pewien problem dotyczący tylko i wyłącznie jednego admina. 

 

Może on banować graczy tylko permanentnie, bez wyboru czasu bana.

 

Flagowanie zgadza sie z innymi administratorami, i gdy ja wejde na jego konto ten problem nadal jest widoczny. W czym może tkwić problem? 

 

Pozdrawiam

FAT1M

admin nie może dawać bana dłuższego niż 10h

22.12.2014 14:21

Witajcie serdeczenie. 

 

Mam pewien problem, wszystko do tej pory było bez zarzutów a od dzisiaj zgłoszono mi problem polegający na tym, że zwykły admin nie może dać bana na więcej niż 10h. Ja mając pełne uprawnienia nie mam z tym problemu, a zwykły administrator nie ma takiej opcji. Flagi dodane tak jak było na początku więc nie mam pojęcia czemu to nie działa.

 

proszę o pomoc.

 

Z góry dziękuje

[KOSZ] PROBLEM Z BANAMI DLA ADMINÓW

22.12.2014 14:08

Witam serdecznie. Posiadam COD MOD 501 i mam następujący problem. w moim wykonaniu bany działają, ale gdy robi to admin zwykły to może dać maksymalnie na 10h i nic więcej, flagi sie zgadzają. Zapodam wam amx.cfg. Proszę o pomoc;;;

 

// -----------------------------------------
// Amx Mod X 1.8.2 | HLDS 2013 | Pukawka.pl
// -----------------------------------------
// AMX Mod X Configuration File
echo Executing AMX Mod X Configuration File

// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

// Name of setinfo which should store a password on a client (you should change this)
// Note: Always prefix the field with an underscore (aka: "_")
// (Example: setinfo _pw "password")
//
// Default value: "_pw"
amx_password_field "_pw"

// Mode of logging to a server
// 0 - disable logging, players won't be checked (and access won't be set)
// 1 - normal mode which obey flags set in accounts
// 2 - kick all players not on list
//
// Default value: 1
amx_mode 1

// Show admins activity
// 0 - disabled
// 1 - show without admin name
// 2 - show with name
//
// Default value: 2
amx_show_activity 2

// Frequency in seconds and text of scrolling message
//
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
//
// Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100"
amx_imessage "This server is using AMX Mod X\nVisit http://www.amxmodx.org" "000100255"

// Frequency in seconds of colored messages
//
// Default value: 180
amx_freq_imessage 180

// Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban
// Default values: 0 5 10 15 30 45 60
amx_plmenu_bantimes 0 5 10 15 30 45 60

// Slap damage amounts for the main slap menu (amx_slapmenu)
// Slay is automaticall inserted as the first option
// Default values: 0 1 5
amx_plmenu_slapdmg 0 1 5

amxbans_higher_ban_time_admin "d"

// Set in seconds how fast players can chat (chat-flood protection)
//
// Default value: 0.75
amx_flood_time 0.75

// Amount of slots to reserve.
//
// Default value: 0
amx_reservation 0

// If you set this to 1, you can hide slots on your server.
// If server "full" of public slots and slots hidden, you must manually connect with connect console command
//
// Default value: 0
amx_hideslots 0

// Displaying of time remaining
// a - display white text on bottom
// b - use voice
// c - don't add "remaining" (only in voice)
// d - don't add "hours/minutes/seconds" (only in voice)
// e - show/speak if current time is less than this set in parameter
//
// Default value: "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"
amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"

// Announce "say thetime" and "say timeleft" with voice, set to 0 to disable.
//
// Default value: 1
amx_time_voice 1

// Minimum delay in seconds between two voting sessions
//
// Default value: 10
amx_vote_delay 10

// How long voting session goes on
//
// Default value: 10
amx_vote_time 10

// Display who votes for what option, set to 0 to disable, 1 to enable.
//
// Default value: 1
amx_vote_answers 1

// Some ratios for voting success

// Default value: 0.40
amx_votekick_ratio 0.40

// Default value: 0.40
amx_voteban_ratio 0.40

// Default value: 0.40
amx_votemap_ratio 0.40

// Default value: 0.02
amx_vote_ratio 0.02

// Max. time to which map can be extended
//
// Default value: 90
amx_extendmap_max 90

// Step for each extending
//
// Default value: 15
amx_extendmap_step 15

// If you set this to 0, clients cannot chose their language, instead they use
// whatever language the server is configured to use.
//
// Default value: 1
amx_client_languages 1

// Plugin Debug mode
// 0 - No debugging (garbage line numbers)
// 1 - Plugins with "debug" option in plugins.ini are put into debug mode
// 2 - All plugins are put in debug mode
// Note - debug mode will affect JIT performance
//
// Default value: 1
amx_debug 1

// Plugin MultiLingual Debug
// To debug a language put its 2 letter code between quotes ("en", "de", etc)
// "" means disabled
//
// Default value: ""
amx_mldebug ""

//
// Beginning of Counter-Strike package specific configurations.
//

// Rank mode
// 0 - by nick
// 1 - by authid
// 2 - by ip
//
// Default value: 0
csstats_rank 0

// Max size of the stats file
//
// Default value: 3500
csstats_maxsize 99999999

// Whether or not to rank bots with csstats - set to 1 to rank bots, 0 otherwise.
//
// Default value: 0
csstats_rankbots 0

// Duration of HUD-statistics
//
// Default value: 12.0
amx_statsx_duration 12.0

// HUD-statistics display limit relative round freeze end
// Negative time will clear the HUD-statstics before the round freeze time has ended
//
// Default value: -2.0
amx_statsx_freeze -2.0
///////////////////////////////
//
// Minibans - Powody banw:
//

amx_minibans_reason "Ping"
amx_minibans_reason "Rash"
amx_minibans_reason "Obraza Admina"
amx_minibans_reason "Kultura"
amx_minibans_reason "Czity"
amx_minibans_reason "Niestosowanie sie do Regulaminu"
amx_minibans_reason "Kradziez Monet"


///////////////////////////////
//
// Minibans - Konfiguracja
//

amx_minibans_bantimes 1 5 15 30 60 120 10080 0
amx_minibans_forum "http://GanjaSkill.eu"

Roundsound_ads_time 120
Roundsound_prefix RoundSound
Roundsound_show_type 2
Roundsound_random_music 1

 

 

POZDRAWIAM