Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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
 

Zdjęcie
Modyfikacja

Przerobic amx_ss

Modyfikacja

  • Zamknięty Temat jest zamknięty
7 odpowiedzi w tym temacie

#1 Sefiron

    Zaawansowany

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:95
  • Lokalizacja:Polska
Offline

Napisano 10.09.2009 07:14

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new player
new ip[32]
new finish;

new maxscreens  //max nr of ss to a player
new screeninterval  //interval between 2 ss
new design  //visual stuff
new site  //the site/forum where a user can post ther pics to be unbanned

public plugin_init() 
{ 
	register_plugin("Ultimate SS", "1.2", "Hack")
	
	register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
	register_clcmd("say /ip", "show_ip")
	
	maxscreens = register_cvar("amx_ss_max", "5")
	screeninterval = register_cvar("amx_ss_interval", "1.0")
	design = register_cvar("amx_ss_design", "3")
	site = register_cvar("amx_ss_site","www.Cs-tyskie.pl")
}

public concmd_screen(id, level, cid)
{
	if(!cmd_access(id, level, cid, 3))   //if the one who requests an ss isnt admin exit
	{
		return PLUGIN_HANDLED
	}
	
	new arg1[24], arg2[4]
	read_argv(1, arg1, 23)
	read_argv(2, arg2, 3)
	
	new screens = str_to_num(arg2)
	new maxss = get_pcvar_num(maxscreens)
	
	if(screens > maxss)   //too many ss?
	{
		console_print(id, "[SS]Prea multe poze!")
		
		return PLUGIN_HANDLED
	}
	
	player = cmd_target(id, arg1, 1) 
	if (!player)   //the player has exited the sv or he didnt existed
	{
		return PLUGIN_HANDLED
	}
	finish = screens
	
	new Float:interval = get_pcvar_float(screeninterval)	//a set_task for each "amx_ss nickname nr_of_ss"
	new array[2]
	array[0] = id //save usefull data in a vector so it can be reused
	array[1] = player
	set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)
        
	return PLUGIN_HANDLED
}
 
public ss_propriuzis(array[2])
{
	//take data and set them accordingly
	new player = array[1]
	new id = array[0]
	
	//save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
	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_name(id, adminname, 31)
	get_user_ip(player, ip, 31)
	        
	//Clasic Design
	if(get_pcvar_num(design) == 0)
	{
		client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by adminl ^"%s^" **", name, adminname)
		client_cmd(player, "snapshot") //ss
	}
	//Doar Playerului
	else if(get_pcvar_num(design) == 1)
	{
		client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
		client_cmd(player, "snapshot") //ss
	}
	//HUD Message doar Playerului
	else if(get_pcvar_num(design) == 2)
	{
		set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)
		format(timestampmsg, 127, "** TIME: - %s **", timestamp)
		show_hudmessage(player, timestampmsg)
		
		client_cmd(player, "snapshot")  //ss
	}
	//Full
	else if(get_pcvar_num(design) == 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, "** PLAYER %s TIME: - %s **",name,timestamp)
		show_hudmessage(player, timestampmsg)
	    
		client_print(0, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
		
		client_cmd(player, "snapshot") //ss
	}
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	finish = finish - 1;
	
	if(finish == 0)
	{
		client_cmd(player, "kill")
		cs_set_user_team(player,CS_TEAM_SPECTATOR);
		new forum[51];
		get_pcvar_string(site,forum,50)
		client_print(player, print_chat, "Post your screenshots on %s for unban", forum)
	}
	
	return PLUGIN_CONTINUE;
}

public show_ip(id)
{
	console_print(id, "[SS]Last Stored IP: %s!",ip)
}




Chciałbym zrobic zeby komeda amx_ss działała z flaga t - custom level H

proszę o pomoc z góry Thx.Pozdrawiam
  • +
  • -
  • 0

#2 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1725
Godlike

  • Postów:6881
  • Steam:steam
  • Imię:Konrad
  • Lokalizacja:Koniecpol
Offline

Napisano 10.09.2009 07:21

Chciałbym zrobic zeby komeda amx_ss działała z flaga t - custom level H


więc zamień tą linijkę:

register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_A, " ")

na tą:
register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_H, "<authid, nick or #userid> <screens>")

  • +
  • -
  • 0

#3 Sefiron

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:95
  • Lokalizacja:Polska
Offline

Napisano 16.09.2009 14:51

Sory ze tak puzno pisze ale niemogłem wczesniej.

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new player
new ip[32]
new finish;

new maxscreens  //max nr of ss to a player
new screeninterval  //interval between 2 ss
new design  //visual stuff
new site  //the site/forum where a user can post ther pics to be unbanned

public plugin_init() 
{ 
	register_plugin("Ultimate SS", "1.2", "Hack")
	
	register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_H, "<authid, nick or #userid> <screens>")
	register_clcmd("say /ip", "show_ip")
	
	maxscreens = register_cvar("amx_ss_max", "5")
	screeninterval = register_cvar("amx_ss_interval", "1.0")
	design = register_cvar("amx_ss_design", "3")
	site = register_cvar("amx_ss_site","www.Cs-tyskie.pl")
}

public concmd_screen(id, level, cid)
{
	if(!cmd_access(id, level, cid, 3))   //if the one who requests an ss isnt admin exit
	{
		return PLUGIN_HANDLED
	}
	
	new arg1[24], arg2[4]
	read_argv(1, arg1, 23)
	read_argv(2, arg2, 3)
	
	new screens = str_to_num(arg2)
	new maxss = get_pcvar_num(maxscreens)
	
	if(screens > maxss)   //too many ss?
	{
		console_print(id, "[SS]Prea multe poze!")
		
		return PLUGIN_HANDLED
	}
	
	player = cmd_target(id, arg1, 1) 
	if (!player)   //the player has exited the sv or he didnt existed
	{
		return PLUGIN_HANDLED
	}
	finish = screens
	
	new Float:interval = get_pcvar_float(screeninterval)	//a set_task for each "amx_ss nickname nr_of_ss"
	new array[2]
	array[0] = id //save usefull data in a vector so it can be reused
	array[1] = player
	set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)
        
	return PLUGIN_HANDLED
}
 
public ss_propriuzis(array[2])
{
	//take data and set them accordingly
	new player = array[1]
	new id = array[0]
	
	//save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
	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_name(id, adminname, 31)
	get_user_ip(player, ip, 31)
	        
	//Clasic Design
	if(get_pcvar_num(design) == 0)
	{
		client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by adminl ^"%s^" **", name, adminname)
		client_cmd(player, "snapshot") //ss
	}
	//Doar Playerului
	else if(get_pcvar_num(design) == 1)
	{
		client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
		client_cmd(player, "snapshot") //ss
	}
	//HUD Message doar Playerului
	else if(get_pcvar_num(design) == 2)
	{
		set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)
		format(timestampmsg, 127, "** TIME: - %s **", timestamp)
		show_hudmessage(player, timestampmsg)
		
		client_cmd(player, "snapshot")  //ss
	}
	//Full
	else if(get_pcvar_num(design) == 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, "** PLAYER %s TIME: - %s **",name,timestamp)
		show_hudmessage(player, timestampmsg)
	    
		client_print(0, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
		
		client_cmd(player, "snapshot") //ss
	}
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	console_print(id, "[SS]%s 's ip is %s!",name,ip)
	finish = finish - 1;
	
	if(finish == 0)
	{
		client_cmd(player, "kill")
		cs_set_user_team(player,CS_TEAM_SPECTATOR);
		new forum[51];
		get_pcvar_string(site,forum,50)
		client_print(player, print_chat, "Post your screenshots on %s for unban", forum)
	}
	
	return PLUGIN_CONTINUE;
}

public show_ip(id)
{
	console_print(id, "[SS]Last Stored IP: %s!",ip)
}

skompilowalem ten plik wrzucilem przez FTP i osoby w users.ini posiadające level H niedziała im funkcja amx_ss.

proszę o help;)
  • +
  • -
  • 0

#4 naven

    Hero

  • Power User

Reputacja: 200
Profesjonalista

  • Postów:1088
  • GG:
  • Imię:Adam
  • Lokalizacja:Cieszyn
Offline

Napisano 16.09.2009 15:02

w cmdaccess.ini zobacz czy masz dopisane amx_ss jeśli tak to tam też zmień
  • +
  • -
  • 0

#5 Sefiron

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:95
  • Lokalizacja:Polska
Offline

Napisano 17.09.2009 15:59

Niechce pisać nastepnego Tematu wiec tu sie zapytam.

Chce aby po zrobieniu ssow banowało od razu

Bo teraz banuje ale robie ssy i dopiero po 20s banuje cos kolo tego.

Za pomoc THXX
  • +
  • -
  • 0

#6 naven

    Hero

  • Power User

Reputacja: 200
Profesjonalista

  • Postów:1088
  • GG:
  • Imię:Adam
  • Lokalizacja:Cieszyn
Offline

Napisano 21.09.2009 18:07

Powiedz jak banujesz? Amxbans, minibans, zwykłe bany? Daj składnie komendy tzn
amx_ban "czas?" "powód?" rozumiesz, nie;p?
  • +
  • -
  • 0

#7 csMisieK

    Zaawansowany

  • Użytkownik

Reputacja: 8
Nowy

  • Postów:85
  • Lokalizacja:Tomaszów
Offline

Napisano 21.09.2009 18:43

Ja używam amxbans - również się przyłącze do tego pytanka
  • +
  • -
  • 0

#8 naven

    Hero

  • Power User

Reputacja: 200
Profesjonalista

  • Postów:1088
  • GG:
  • Imię:Adam
  • Lokalizacja:Cieszyn
Offline

Napisano 21.09.2009 18:47

Wersja na amxbans
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new player
new ip[32]
new finish;

new maxscreens  //max nr of ss to a player
new screeninterval  //interval between 2 ss
new design  //visual stuff
new site  //the site/forum where a user can post ther pics to be unbanned

public plugin_init()
{
    register_plugin("Ultimate SS", "1.2", "Hack")
   
    register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_H, "<authid, nick or #userid> <screens>")
    register_clcmd("say /ip", "show_ip")
   
    maxscreens = register_cvar("amx_ss_max", "5")
    screeninterval = register_cvar("amx_ss_interval", "1.0")
    design = register_cvar("amx_ss_design", "3")
    site = register_cvar("amx_ss_site","www.Cs-tyskie.pl")
}

public concmd_screen(id, level, cid)
{
    if(!cmd_access(id, level, cid, 3))   //if the one who requests an ss isnt admin exit
    {
        return PLUGIN_HANDLED
    }
   
    new arg1[24], arg2[4]
    read_argv(1, arg1, 23)
    read_argv(2, arg2, 3)
   
    new screens = str_to_num(arg2)
    new maxss = get_pcvar_num(maxscreens)
   
    if(screens > maxss)   //too many ss?
    {
        console_print(id, "[SS]Prea multe poze!")
       
        return PLUGIN_HANDLED
    }
   
    player = cmd_target(id, arg1, 1)
    if (!player)   //the player has exited the sv or he didnt existed
    {
        return PLUGIN_HANDLED
    }
    finish = screens
   
    new Float:interval = get_pcvar_float(screeninterval)    //a set_task for each "amx_ss nickname nr_of_ss"
    new array[2]
    array[0] = id //save usefull data in a vector so it can be reused
    array[1] = player
    set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)
       
    return PLUGIN_HANDLED
}
 
public ss_propriuzis(array[2])
{
    //take data and set them accordingly
    new player = array[1]
    new id = array[0]
   
    //save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
    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_name(id, adminname, 31)
    get_user_ip(player, ip, 31)
           
    //Clasic Design
    if(get_pcvar_num(design) == 0)
    {
        client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by adminl ^"%s^" **", name, adminname)
        client_cmd(player, "snapshot") //ss
    }
    //Doar Playerului
    else if(get_pcvar_num(design) == 1)
    {
        client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
        client_cmd(player, "snapshot") //ss
    }
    //HUD Message doar Playerului
    else if(get_pcvar_num(design) == 2)
    {
        set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4)
        format(timestampmsg, 127, "** TIME: - %s **", timestamp)
        show_hudmessage(player, timestampmsg)
       
        client_cmd(player, "snapshot")  //ss
    }
    //Full
    else if(get_pcvar_num(design) == 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, "** PLAYER %s TIME: - %s **",name,timestamp)
        show_hudmessage(player, timestampmsg)
       
        client_print(0, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp)
       
        client_cmd(player, "snapshot") //ss
    }
    console_print(id, "[SS]%s 's ip is %s!",name,ip)
    console_print(id, "[SS]%s 's ip is %s!",name,ip)
    console_print(id, "[SS]%s 's ip is %s!",name,ip)
    finish = finish - 1;
   
    if(finish == 0)
    {
    client_cmd(player, "kill")
    cs_set_user_team(player,CS_TEAM_SPECTATOR);
    new forum[51];
    get_pcvar_string(site,forum,50)
    client_print(player, print_chat, "Post your screenshots on %s for unban", forum)
    server_cmd("amx_ban 0 #%d powod",get_user_userid(player))
    }
   
    return PLUGIN_CONTINUE;
}

public show_ip(id)
{
    console_print(id, "[SS]Last Stored IP: %s!",ip)
}

  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych