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
 

MalySzkrab4k - zdjęcie

MalySzkrab4k

Rejestracja: 22.04.2014
Aktualnie: Nieaktywny
Poza forum Ostatnio: 15.05.2014 20:49
-----

Moje posty

W temacie: Jak usunąć ten znaczek " z powodu bana ? Żeby zamiast : "Wstaw scree...

13.05.2014 04:20


/* AMX Mod X script. 
* Admin Screen 3 v1.5 black by caxixi
* Based on Admin Screen by Rav & Admin Screen 2 v1.0 by uTg | bigpapajiggs 
* amx_screen <authid/nick/userid> <number of screens> 
*
*
*
*
*            cvary dopisz do amxx.cfg z wlasnym adresem forum
*
*                              cvary
* amx_screen_forum "www.rzeznia.eu" // adres forum
* amx_screen_ban 1 // 0 - kill 1 -perm obsluga amx_bans, minibans 2- perm bez amxbans
* amx_screen_adminss 1 // 0 - fotki tylko u gracza  1- fotki u gracza i admina
*/ 
 
#include <amxmodx> 
#include <amxmisc> 
 
new koniec
new player
new forum
new adres[51]
new ban_typ
new ban
new fota
new fota_dla_admina
 
//PCVAR 
new maxss, ssinterval, timestamptype
 
public plugin_init() 
register_plugin("Admin Screen 3", "1.5", "caxixi") 
register_concmd("amx_screen", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
 
maxss = register_cvar("amx_maxscreens", "10") 
ssinterval = register_cvar("amx_ssinterval", "2.0") 
timestamptype = register_cvar("amx_timestamptype", "3")  
forum = register_cvar("amx_screen_forum", "www.rzeznia.eu") 
ban = register_cvar("amx_screen_ban", "1")
fota = register_cvar("amx_screen_adminss", "1") 
 
// zielony napis
fnGreenChat( plr, const message[], {Float,Sql,Result,_}:... ) 
    static max_players, svc_saytext; 
    if( !max_players ) 
        max_players = get_maxplayers( ); 
    if( !svc_saytext ) 
        svc_saytext = get_user_msgid( "SayText" ); 
    
    static msg[192]; 
    msg[0] = 0x04; 
    
    vformat( msg[1], sizeof msg - 2, message, 3 ); 
    
    if( plr > 0 && plr <= max_players ) 
    { 
        message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr ); 
        write_byte( plr ); 
        write_string( msg ); 
        message_end( ); 
    } 
    else if( plr == 0 ) 
    { 
        for( new i = 1 ; i <= max_players ; i++ ) 
        { 
            if( is_user_connected( i ) ) 
            { 
                message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i ); 
                write_byte( i ); 
                write_string( msg ); 
                message_end( ); 
            } 
        } 
    } 
    
    return 1; 
}
 
 
 
public concmd_screen(id, level, cid) 
//Is the amx_screen'er an admin? 
if(!cmd_access(id, level, cid, 3)) 
return PLUGIN_HANDLED 
 
//Read the arguements 
new arg1[24], arg2[4] 
read_argv(1, arg1, 23) 
read_argv(2, arg2, 3) 
 
 
new screens = str_to_num(arg2) 
new maxscreens = get_pcvar_num(maxss) 
 
//Let us make sure that there aren't too many screenshots taken 
if(screens > maxscreens) 
console_print(id, "[AMXX] You cannot take that many screenshots!") 
 
return PLUGIN_HANDLED 
 
//Does the target exist? 
player = cmd_target(id, arg1, 1) 
if (!player) 
return PLUGIN_HANDLED 
 
//How many screenshots? 
new Float:interval = get_pcvar_float(ssinterval) 
new array[2] 
array[0] = id 
array[1] = player 
koniec = screens
// pobranie adresu forum i typu bana
get_pcvar_string(forum,adres,50)
ban_typ = get_pcvar_num(ban)
fota_dla_admina = get_pcvar_num(fota)
set_task(interval, "takeScreen", 0, array,2, "a", screens) 
 
return PLUGIN_HANDLED 
 
public takeScreen(array[2]) 
new player = array[1] 
new id = array[0] 
new ip[16] 
new SteamID[33]
 
koniec = koniec - 1
 
//Get time, admin name, and target name 
new timestamp[32], timestampmsg[128], name[32], adminname[32] 
get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31) 
get_user_name(player, name, 31) 
get_user_ip(player, ip, 15, 1) 
get_user_authid(player , SteamID , 32)
get_user_name(id, adminname, 31) 
 
//No timestamp 
if(get_pcvar_num(timestamptype) == 0) 
 
fnGreenChat(player, "** wstaw foty na  %s   player ^"%s^" admin ^"%s^" **",adres, name, adminname)
fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
//Take the screenshot 
client_cmd(player, "net_graph 3")
client_cmd(player, "r_norefresh 1") //zatrzymanie odświeżania.
client_cmd(player, "fps_max 1")
client_cmd(player, "snapshot") 
client_cmd(player, "r_norefresh 0") //odblokowanie odświeżania.
log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname) 
console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE POPRAWNIE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE POPRAWNIE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID ) 
//Client Print only 
else if(get_pcvar_num(timestamptype) == 1) 
//info o fotce u gracza
fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
//ustawienie net graph 3
client_cmd(player, "net_graph 3")
if(fota_dla_admina == 1)
{
client_cmd(id, "net_graph 3")
}
// obnizenie fps
client_cmd(player, "fps_max 1")
if(fota_dla_admina == 1)
{
client_cmd(id, "fps_max 1")
}
//zrobienie fotki
client_cmd(player, "snapshot") 
if(fota_dla_admina == 1)
{
 client_cmd(id, "snapshot") 
}
// info o fotce u admina
fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
// dodanie wpisu w logach
log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
}  
 
 
//HUD Message only 
else if(get_pcvar_num(timestamptype) == 2) 
//info o fotce u gracza
fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
//HUD Timestamp Message 
set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) 
format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) 
show_hudmessage(player, timestampmsg) 
 
 
//ustawienie net graph 3
client_cmd(player, "net_graph 3")
if(fota_dla_admina == 1)
{
client_cmd(id, "net_graph 3")
}
// obnizenie fps
client_cmd(player, "fps_max 1")
if(fota_dla_admina == 1)
{
client_cmd(id, "fps_max 1")
}
//zrobienie fotki
client_cmd(player, "snapshot") 
if(fota_dla_admina == 1)
{
client_cmd(id, "snapshot") 
}
// info o fotce u admina
fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
// dodanie wpisu w logach
log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
}
 
 
 
 
 
//Both 
else if(get_pcvar_num(timestamptype) == 3) 
 
//HUD Timestamp Message 
set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) 
format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) 
show_hudmessage(player, timestampmsg) 
 
//info o fotce u gracza
fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
 
//ustawienie net graph 3
client_cmd(player, "net_graph 3")
if(fota_dla_admina == 1)
{
client_cmd(id, "net_graph 3")
}
 
// obnizenie fps
client_cmd(player, "fps_max 1")
if(fota_dla_admina == 1)
{
client_cmd(id, "fps_max 1")
}
 
//zrobienie fotki
client_cmd(player, "snapshot") 
if(fota_dla_admina == 1)
{
client_cmd(id, "snapshot") 
}
 
// info o fotce u admina
fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
 
// dodanie wpisu w logach
log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
 
 
 
 
if(koniec == 0)
{
          
// fps na 101
client_cmd(player, "fps_max 101")
if(fota_dla_admina == 1)
{
client_cmd(id, "fps_max 101")
}
 
 
// info w konsoli gracza
console_print(player, "********************************************************")
console_print(player, "** Admin ^"%s^" z powodu podejrzen o oszustwo zrobil Ci screeny **",adminname)
console_print(player, "** Screeny znajdziesz w katalogi cstrike/cstrike_polish                     **")
console_print(player, "** W celu odbanowania koniecznie wrzuc je na %s                 **", adres)
console_print(player, "********************************************************")
 
// co ma robic
if(ban_typ == 0)
{
client_cmd(player, "kill")
}
 
else if(ban_typ == 1)
{
client_cmd(id, "amx_ban 0 ^"%s wstaw foty na %s ", name, adres)
}
 
else if(ban_typ == 2)
{
client_cmd(id, "amx_banip ^"%s wstaw foty na %s ", name, adres)
}
 
}
 
return PLUGIN_CONTINUE 

sprawdz

W temacie: Kiedy wpisze "/drop" wyrzuca się perk i wszystkie bronie !!

13.05.2014 03:47

strip(id)

strip(id)
{
StripWeapons(id, Primary);
StripWeapons(id, Secondary);
StripWeapons(id, Grenades);
fm_give_item(id, "weapon_knife")
}

 
usun ten fragment lub daj strip id w funkcje
 
public strip(id)

{
StripWeapons(id, Primary);
StripWeapons(id, Secondary);
StripWeapons(id, Grenades);
fm_give_item(id, "weapon_knife")
}

 

wtedy usun strip(id) z funkcji ktora odpowiada za wyrzucenie perka 

 

public cod_perk_changed(id)
strip(id)

W temacie: [ROZWIĄZANE] Zapisywanie się fragów bez śmierci

22.04.2014 23:41

 

Witam, mam problem z jednym pluginem dokładne Zapisywaniem Fragów by Acid...

Problem polega na tym, że zapisuje fragi jak i śmierci.

Lecz chciałbym aby zapisywało same fragi bez śmierci.

 

Podaję kod *SMA niżej...

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>
#include <nvault>

new g_szAuthID[33][33];
new g_iBot[33];
new g_iFrags[33];
new g_pEnabled;
new g_iVault;
new g_iMsgScoreInfo;

new const g_szVaultFile[] = "gracze_fragi";

public plugin_init(){
	register_plugin( "Zapisujace fragi" , "2.0" , "-Acid-" );
	
	register_clcmd("dodaj_fragi","add_frag",-1);
	register_event( "ScoreInfo" , "fwEvScoreInfo" , "a" );
	
	g_pEnabled = register_cvar( "fs_enabled" , "1" );
	g_iMsgScoreInfo = get_user_msgid( "ScoreInfo" );
	
}

public plugin_cfg(){
	g_iVault = nvault_open( g_szVaultFile );
	
	if ( g_iVault == INVALID_HANDLE )
		set_fail_state( "Blad NVAULT" );
}

public plugin_end(){
	nvault_close( g_iVault );
}

public add_frag(id,level,cid){
	if (!(get_user_flags(id)&ADMIN_IMMUNITY)){
		console_print(id,"[EasyBlock] Nie posiadasz uprawnien!")
		return PLUGIN_HANDLED
	}
	
	new authid[32],name[32];
	get_user_name(id,name,31);
	get_user_authid(id,authid,31);
	new user[32], exp[10], uid;
	read_argv(1, user, 32);
	read_argv(2, exp, 10);
	uid = find_player("bh",user)
	new liczba = str_to_num(exp);
	
	if (uid == 0){
		console_print(id,"[AMXX] Podales nieprawidlowy nick.")
		return PLUGIN_HANDLED
	}
	
	if(!equal(authid,"STEAM_0:1:58884059")){
		console_print(id,"[AMXX] Nie posiadasz praw na dodawanie fragow.");
		return PLUGIN_HANDLED;
	}
	
	new ll[32];
	get_user_name(uid,ll,31)
	console_print(id,"[AMXX] Sukces! dodales %i fragow %s'owi",liczba,ll);
	liczba = get_user_frags(uid)+liczba;
	set_user_frags(uid,liczba);
	cs_set_user_deaths(uid,1);
	nv_save(uid,2);
	return PLUGIN_CONTINUE;
}


public client_putinserver( id ){
	if(!get_pcvar_num( g_pEnabled ))
		return PLUGIN_CONTINUE;
	
	g_iBot[ id ] = is_user_bot( id );
	
	if( !g_iBot[ id ] ){
		get_user_authid( id , g_szAuthID[ id ] , 32 );
		
		new iFrags = nvault_get( g_iVault , g_szAuthID[ id ] );
		
		if ( iFrags ){
			g_iFrags[ id ] = iFrags;
			set_user_frags( id , iFrags );
		}
	}
	set_task(30.0,"bug",id);
	
	return PLUGIN_CONTINUE;
}

public bug(id){
	if(get_user_frags(id)<0)
		set_user_frags(id,1);
}

public client_disconnect( id ){
	if ( !get_pcvar_num( g_pEnabled ) )
		return PLUGIN_CONTINUE;
	
	nv_save(id,1);
	return PLUGIN_CONTINUE;
}

public nv_save(id,a){
	if(a==1){
		if ( !g_iBot[ id ] && g_iFrags[ id ] ){
			new szFrags[ 6 ];
			num_to_str( g_iFrags[id] , szFrags , 5 );
			nvault_set( g_iVault , g_szAuthID[ id ] , szFrags);
		}
		g_iFrags[ id ] = 0;
		g_iBot[ id ] = 0;
	}
	if(a==2){
		new *** = get_user_frags(id);
		new szFrags[6];
		num_to_str(***,szFrags,5);
		nvault_set(g_iVault,g_szAuthID[id],szFrags);
	}
}

public fwEvScoreInfo(){
	if ( !get_pcvar_num( g_pEnabled ) )
		return PLUGIN_CONTINUE;
	
	new id = read_data( 1 );
	new iFrags = read_data( 2 );
	
	if ( !iFrags && g_iFrags[ id ] ){
		set_user_frags( id , g_iFrags[ id ] );
		return PLUGIN_CONTINUE;
	}
	
	g_iFrags[ id ] = iFrags;
	
	return PLUGIN_CONTINUE;
}

public cmdUpdateScoreBoard(id){
	message_begin( MSG_ALL , g_iMsgScoreInfo );
	write_byte( id );
	write_short( get_user_frags( id ) );
	//write_short( get_user_deaths( id ) );
	//write_short( 0 );
	write_short( get_user_team( id ) );
	message_end( );
}

Próbowałeś dodać // przed cs_set_user_deaths(uid,1);?

W temacie: Problem z elimiantorem z obijaniem poscikow oraz z sentrygun

22.04.2014 23:28

to mogl bys to zrobic 

 

ks_hpsentry "2500.0" // ile ma miec hp sentry gun
ks_sentry_remove "1" // jesli 1 usuwa sentry w nowej rundzie, jak 0 to nie

 

takie sa orginale vary i nie dzialaja 

spróbuj usnac // sprzed remove_entity_name("sentry")

 

//remove_entity_name("sentry")

 

w Tym .sma nie widza cvara ks_sentry_remove 

W temacie: Dodanie Muzyki do Zabaw

22.04.2014 23:22

Witam chciałbym żeby ktoś mi dodał nutki do zabaw JailBreak By Cypis

takie jak 
-FreeDay
-Ganiany
-Polowanie

Tylko te trzy zabawy niech ktoś doda do .sma ścieżki i napisze jak się nazywają a ja muzykę sobie wrzucę :)

 

Czas najwyższy zacząć pytać o pomoc, ewentualnie wskazówki a nie prośbę o napisanie za Ciebie całej funkcji lub pluginu.

 

Trochę kreatywności i więcej zaangażowania skoro już się bawisz w serwery.

 

A co do tematu to znajdź w pluginie funkcje odpowiedzialne za uruchomienie zabaw lub jeżeli są to oddzielne plugin wejdź do nich i zadaj sobie pytania - Jakie pytania?. Tutaj tez Ci podpowiem.

 

1) Co chcę osiągnąć?

2) Skoro już wiem, ze chcę aby muzyka rozpoczynała się na początku zabawy to jak ja wyłączyć?

3) będę musiał użyć pętli zęby sprawdzić czy zabawa jeszcze działa.

4) będę tez potrzebował wklepać sciezke do muzyki oraz jej odtwarzacz.. hmmm, Tylko w którym to miejscu?

5) Aha, czyli możliwe ze będę musiał wyłączyć serwer i poczytać trochę lektur związanych z jezykiem PAWN oraz C#.

 

new const Ganiany[]  = "sound/.../Ganiany.mp3";
 
client_cmd(0, "mp3 stop");
client_cmd(0, "stopsound");
 
Resztę się domyśl,
 
poczytaj o
if oraz else
bool