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.
|
regulamin przeróbka
#1
Napisano 12.04.2010 20:37
ma wyglądać tak
1. 1akceptacja 2nie akceptuje 3pokaz regulamin
2. gdy wpiszemy na sayu "/rules" "/regulamin" "/zasady" wyswietla nam sie regulamin
wiem że w tym temacie tam to jest ale ja sie kompletnie nie znam na przeróbkach amxx
i proszę o gotowy .amxx
z góry dziekuje fury
#2
Napisano 12.04.2010 21:15
#include <amxmodx>
#include <amxmisc>
#define TASK_GENERAL 100
#define TASK_KICK 200
new const rules[] = "rules.txt";
public plugin_init()
{
register_plugin("Terms and Agreements","0.20","DahVid/Avalanche");
register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu");
register_clcmd("say /rules","rules");
register_clcmd("say /regulamin","regulamin");
register_clcmd("say /zasady","zasady");
set_task(1.0,"checkforfiles");
}
public checkforfiles()
{
if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.")
}
public client_putinserver(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
if(is_user_bot(id)) return;
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
public client_disconnect(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
}
public DisplayRulesMenu(taskid)
{
new id = taskid-TASK_GENERAL;
static szMenuBody[256];
if(!szMenuBody[0])
{
new len = format(szMenuBody,255,"Regulamin Serwera:^n");
len += format(szMenuBody[len],255-len,"^n7. Akceptuje");
len += format(szMenuBody[len],255-len,"^n8. Odmawiam");
len += format(szMenuBody[len],255-len,"^n^n9. Pokaz Regulamin");
}
new keys = MENU_KEY_7|MENU_KEY_8|MENU_KEY_9;
show_menu(id,keys,szMenuBody,-1,"rules_menu");
}
public RulesMenu(id,key)
{
switch(key)
{
case 6:
{
client_print(id,print_chat,"* Dziekujemy, GL & HF!");
}
case 7:
{
server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id));
}
case 8:
{
client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!");
show_motd(id,rules,"SERVER RULES");
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
}
}
#3
Napisano 13.04.2010 12:51
ze pod 1 klawiszem jest akceptacja a nie pod 6
pod 2 klawiszem nie akceptuje a nie pod 8
pod 3 klawiszem pokaz regulamin a nie pod 9
13 kwiecień 2010 - 12:51:
ee mógłby ktoś pomóc jeszcze mam cos takiego wgralem "zasady.txt" do pliku cstrike/addons/amxmodx/data/lang i gdy wchodzena serwer i przyciskam 9pokaż regulamin mam cos takiego
proszę O POMOC
frajer i gdy wpisuje /rules /zasady /regulamin to nie działa ;/
z góry dziekuje fury
Użytkownik fury edytował ten post 13.04.2010 12:52
#4
Napisano 13.04.2010 13:02
#5
Napisano 13.04.2010 13:14
plik .txt wrzucasz do cstrike
jeżeli zadziała masz +
13 kwiecień 2010 - 13:10:
dzięki change działa leci rep
13 kwiecień 2010 - 13:14:
i proszę jeszcze o zrobienie z tym gdy wpisuje /zasady , /regulamin , /rules
wyświetla sie regulamin
frajera amx nie działa
#6
Napisano 13.04.2010 13:32
register_clcmd("say /rules","rules"); register_clcmd("say /regulamin","regulamin"); register_clcmd("say /zasady","zasady");Że 3 oddzielne komendy w say i 3 oddzielne pliki, czyli musisz robić 3 .txt i tam wrzucać to samo...
#7
Napisano 14.04.2010 20:11
13 kwiecień 2010 - 22:13:
aha i jeszcze trzeba zrobić żeby pod 1 i 2 klawiszem była akceptacja i nie akceptacja zasad pod 9 moze byc pokazac regulamin
i proszę o jaknajszybszą odowiedz
z gory dziekuje fury
13 kwiecień 2010 - 22:35:
eh z klawiszami zdołałem zrobić ale z tym /rules nie ;/
#include <amxmodx> #include <amxmisc> #define TASK_GENERAL 100 #define TASK_KICK 200 new const rules[] = "rules.txt"; public plugin_init() { register_plugin("Terms and Agreements","0.20","DahVid/Avalanche"); register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu"); register_clcmd("say /rules","rules"); set_task(1.0,"checkforfiles"); } public checkforfiles() { if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.") } public client_putinserver(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); if(is_user_bot(id)) return; set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } public client_disconnect(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); } public DisplayRulesMenu(taskid) { new id = taskid-TASK_GENERAL; static szMenuBody[256]; if(!szMenuBody[0]) { new len = format(szMenuBody,255,"Regulamin Serwera:^n"); len += format(szMenuBody[len],255-len,"^n1. Akceptuje"); len += format(szMenuBody[len],255-len,"^n2. Odmawiam"); len += format(szMenuBody[len],255-len,"^n^n3. Pokaz Regulamin"); } new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3; show_menu(id,keys,szMenuBody,-1,"rules_menu"); } public RulesMenu(id,key) { switch(key) { case 0: { client_print(id,print_chat,"* Dziekujemy, GL & HF!"); } case 1: { server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id)); } case 2: { client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!"); show_motd(id,rules,"Zasady JailBreak"); set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } } }
14 kwiecień 2010 - 20:11:
wiem ze tak zrobił ale mi to nie działa jak pisze /zasady /regulamin /rules
13 kwiecień 2010 - 22:13:
aha i jeszcze trzeba zrobić żeby pod 1 i 2 klawiszem była akceptacja i nie akceptacja zasad pod 9 moze byc pokazac regulamin
i proszę o jaknajszybszą odowiedz
z gory dziekuje fury
13 kwiecień 2010 - 22:35:
eh z klawiszami zdołałem zrobić ale z tym /rules nie ;/#include <amxmodx> #include <amxmisc> #define TASK_GENERAL 100 #define TASK_KICK 200 new const rules[] = "rules.txt"; public plugin_init() { register_plugin("Terms and Agreements","0.20","DahVid/Avalanche"); register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu"); register_clcmd("say /rules","rules"); set_task(1.0,"checkforfiles"); } public checkforfiles() { if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.") } public client_putinserver(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); if(is_user_bot(id)) return; set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } public client_disconnect(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); } public DisplayRulesMenu(taskid) { new id = taskid-TASK_GENERAL; static szMenuBody[256]; if(!szMenuBody[0]) { new len = format(szMenuBody,255,"Regulamin Serwera:^n"); len += format(szMenuBody[len],255-len,"^n1. Akceptuje"); len += format(szMenuBody[len],255-len,"^n2. Odmawiam"); len += format(szMenuBody[len],255-len,"^n^n3. Pokaz Regulamin"); } new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3; show_menu(id,keys,szMenuBody,-1,"rules_menu"); } public RulesMenu(id,key) { switch(key) { case 0: { client_print(id,print_chat,"* Dziekujemy, GL & HF!"); } case 1: { server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id)); } case 2: { client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!"); show_motd(id,rules,"Zasady JailBreak"); set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } } }
może ktoś dokonczyć ten plugin???????/ chce zeby po wpisaniu /rules /regulamin /zasady wyskoczyl regulamin
frajera nie działa
z góry dziekuje fury
#8
Napisano 14.04.2010 20:22
#include <amxmodx>
#include <amxmisc>
#define TASK_GENERAL 100
#define TASK_KICK 200
new const rules[] = "rules.txt";
public plugin_init()
{
register_clcmd("say /rules","rules")
register_plugin("Terms and Agreements","0.20","DahVid/Avalanche");
register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu");
set_task(1.0,"checkforfiles");
}
public checkforfiles()
{
if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.")
}
public client_putinserver(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
if(is_user_bot(id)) return;
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
public client_disconnect(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
}
public DisplayRulesMenu(taskid)
{
new id = taskid-TASK_GENERAL;
static szMenuBody[256];
if(!szMenuBody[0])
{
new len = format(szMenuBody,255,"Regulamin Serwera:^n");
len += format(szMenuBody[len],255-len,"^n1. Akceptuje");
len += format(szMenuBody[len],255-len,"^n2. Odmawiam");
len += format(szMenuBody[len],255-len,"^n^n3. Pokaz Regulamin");
}
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;
show_menu(id,keys,szMenuBody,-1,"rules_menu");
}
public RulesMenu(id,key)
{
switch(key)
{
case 1:
{
client_print(id,print_chat,"* Dziekujemy, GL & HF!");
}
case 2:
{
server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id));
}
case 3:
{
client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!");
show_motd(id,rules,"SERVER RULES");
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
}
}
Użytkownik Frajer edytował ten post 14.04.2010 20:29
#9
Napisano 14.04.2010 20:27
ale to nie działa
tu coś innego nawala
#10
Napisano 14.04.2010 20:33
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Show regulamin"
#define VERSION "0.1"
#define AUTHOR "Frajer z wikipedii"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /regulamin","regulamin")
}
public regulamin(id)
{
show_motd(id,"/addons/amxmodx/data/regulamin.txt","Regulamin serwera")
}
hm zrób oddzielny amxx do tego, ja zaraz to wczepie w tamten
@Edit
spróbuj tego
#include <amxmodx>
#include <amxmisc>
#define TASK_GENERAL 100
#define TASK_KICK 200
new const rules[] = "rules.txt";
public plugin_init()
{
register_plugin("Terms and Agreements","0.20","DahVid/Avalanche");
register_clcmd("say /rules","rules")
register_clcmd("say /zasady","rules")
register_clcmd("say /regulamin","rules")
register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu");
set_task(1.0,"checkforfiles");
}
public checkforfiles()
{
if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.")
}
public client_putinserver(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
if(is_user_bot(id)) return;
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
public client_disconnect(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
}
public DisplayRulesMenu(taskid)
{
new id = taskid-TASK_GENERAL;
static szMenuBody[256];
if(!szMenuBody[0])
{
new len = format(szMenuBody,255,"Regulamin Serwera:^n");
len += format(szMenuBody[len],255-len,"^n1. Akceptuje");
len += format(szMenuBody[len],255-len,"^n2. Odmawiam");
len += format(szMenuBody[len],255-len,"^n^n3. Pokaz Regulamin");
}
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;
show_menu(id,keys,szMenuBody,-1,"rules_menu");
}
public rules(id)
{
show_motd(id,"/cstrike/rules.txt","Regulamin serwera")
}
public RulesMenu(id,key)
{
switch(key)
{
case 1:
{
client_print(id,print_chat,"* Dziekujemy, GL & HF!");
}
case 2:
{
server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id));
}
case 3:
{
client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!");
show_motd(id,rules,"SERVER RULES");
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
}
}
@Edit3
ten działa na 100%!!!
#include <amxmodx>
#include <amxmisc>
#define TASK_GENERAL 100
#define TASK_KICK 200
new const rules[] = "rules.txt";
public plugin_init()
{
register_plugin("Terms and Agreements","0.20","DahVid/Avalanche");
register_clcmd("say /rules","rules_menu")
register_clcmd("say /zasady","rules_menu")
register_clcmd("say /regulamin","rules_menu")
register_menucmd(register_menuid("rules_menu"),1023,"RulesMenu");
set_task(1.0,"checkforfiles");
}
public checkforfiles()
{
if(!file_exists(rules)) write_file(rules,"Erase this line and add your rules here. HTML can be used.")
}
public client_putinserver(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
if(is_user_bot(id)) return;
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
public client_disconnect(id)
{
remove_task(TASK_GENERAL+id);
remove_task(TASK_KICK+id);
}
public DisplayRulesMenu(taskid)
{
new id = taskid-TASK_GENERAL;
static szMenuBody[256];
if(!szMenuBody[0])
{
new len = format(szMenuBody,255,"Regulamin Serwera:^n");
len += format(szMenuBody[len],255-len,"^n1. Akceptuje");
len += format(szMenuBody[len],255-len,"^n2. Odmawiam");
len += format(szMenuBody[len],255-len,"^n^n3. Pokaz Regulamin");
}
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3;
show_menu(id,keys,szMenuBody,-1,"rules_menu");
}
public rules_menu(id)
{
show_motd(id,"/cstrike/rules.txt","Regulamin serwera")
}
public RulesMenu(id,key)
{
switch(key)
{
case 1:
{
client_print(id,print_chat,"* Dziekujemy, GL & HF!");
}
case 2:
{
server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id));
}
case 3:
{
client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!");
show_motd(id,rules,"SERVER RULES");
set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id);
}
}
}
Użytkownik Frajer edytował ten post 14.04.2010 20:43
#11
Napisano 14.04.2010 21:11
14 kwiecień 2010 - 21:07:
eeee powiem tyle to nie działa
działa jak wbije na serwer i klikne pokaz regulamin
ale gdy wpisuje
/regulamin
/rules
/zasady
wyskakuje okno białe tło jest i pisze /cstrike/rules.txt
popraw to bedzie +
14 kwiecień 2010 - 21:11:
MOŻNA ZAMKNAĆ TEMAT ZROBIONE!!
frajer ale i tak masz + dużo pomogłeś
#12
Napisano 15.04.2010 19:44
popraw to bedzie +
14 kwiecień 2010 - 21:11:
MOŻNA ZAMKNAĆ TEMAT ZROBIONE!!
frajer ale i tak masz + dużo pomogłeś
że co^^, przecież ja Ci ten ostatni kod podałem a że sobie zmieniłeś nazwę pliku gdzie znajduję się /rules to przecież nie problem
sorka za offtop
Można zamknąć
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych