chce takie zasady ! ale proszę o 1 zeby zamisat tam nazwy serwa bylo Witaj na [G]ood [S]kill |FFA| @KampNO.pl
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.
|
Napisano 04.10.2008 17:25
Napisano 05.10.2008 11:56
Napisano 05.10.2008 12:04
Napisano 05.10.2008 12:05
Napisano 05.10.2008 12:09
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Akceptacja zasad"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define Keys (1<<0)|(1<<1)
new enabled
new delay
new immunity
new file[84]
new joined[33], accepted[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("TeamInfo","join_team","a","2=TERRORIST","2=CT")
enabled = register_cvar("amx_rules_enabled","1")
delay = register_cvar("amx_rules_delaykick","60.0")
immunity = register_cvar("amx_rules_immunity","0")
register_clcmd("radio1","hook")
register_clcmd("radio2","hook")
register_clcmd("radio3","hook")
register_menucmd(register_menuid("Zasady serwera"), Keys, "klawisze")
static configsdir[64]
get_localinfo("amxx_configsdir", configsdir, 63)
format(file , 83 , "%s/rules.txt" , configsdir)
if(!file_exists(file))
{
write_file(file, "; Wpisz tutaj swoje zasady!")
write_file(file, "; Linie zaczynajace sie od ; to komentarze")
}
}
public join_team()
{
if(!get_pcvar_num(enabled))
return PLUGIN_CONTINUE
// pobrano z cs-puchatek.pl
new id = read_data(1)
if(get_pcvar_num(immunity) && get_user_flags(id) & ADMIN_KICK)
return PLUGIN_CONTINUE
joined[id]++
if(joined[id] != 2) // check for first join
return PLUGIN_CONTINUE
new i, num, text[127], rules[440]
for(i = 0; read_file(file, i, text, 127, num); i++)
{
if(num > 0 && text[0] != ';')
{
add(rules,439,text)
add(rules,439,"^n")
}
}
new body[512]
formatex(body,511,"dZasady serwera:^nr%s^nyAkceptujesz zasady?^nw1. Nie^n2. Tak^n",rules)
show_menu(id, Keys, body, -1, "Zasady serwera")
set_task(get_pcvar_float(delay),"check_player",id)
return PLUGIN_CONTINUE
}
public klawisze(id, key)
{
new name[33], msg[100]
get_user_name(id,name,32)
switch (key)
{
case 0:
{
formatex(msg,99,"^x04%s nie zaakceptowal zasad serwera.",name)
for(new i = 1; i <= get_playersnum(); i++)
print_message(i,msg)
server_cmd("kick #%d Nie zaakceptowales zasad",get_user_userid(id))
}
case 1:
{
formatex(msg,99,"^x04%s zaakceptowal zasady serwera.",name)
for(new i = 1; i <= get_playersnum(); i++)
print_message(i,msg)
print_message(id,"^x03Zyczymy milej gry na serwerze.")
// pobrano z cs-puchatek.pl
accepted[id] = 1
}
}
}
public client_disconnect(id)
{
joined[id] = 0
accepted[id] = 0
}
public check_player(id)
{
if(!accepted[id])
server_cmd("kick #%d Nie zaakceptowales zasad!",get_user_userid(id))
}
public hook(id)
{
if(!accepted[id])
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
public print_message(id, msg[])
{
if(!is_user_connected(id))
return
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}Napisano 05.10.2008 13:19
#include <amxmodx>
#include <cstrike>
new gmsgSayText
public plugin_init()
{
register_plugin("Player Enter", "0.1", "dev.cs.wrocek.com")
register_menucmd(register_menuid("Witaj Graczu"),1023,"actionMenu")
gmsgSayText = get_user_msgid("SayText")
}
public client_putinserver(id)
{
if (is_user_bot(id))
return
set_task(10.0, "dispInfo", id + 1337)
}
public client_disconnect(id)
{
if(task_exists(id + 1337)){
remove_task(id + 1337)
}
}
public dispInfo(id)
{
new playerId = id - 1337
new nextmap[32]
new hostname[32]
get_cvar_string("amx_nextmap", nextmap, 31)
get_cvar_string("hostname", hostname, 31)
client_print(playerId, print_chat, "* Witaj na serwerze: %s", [G]ood [S]kill |FFA| @KampNO.pl)
prepare_menu(playerId + 1339)
}
public prepare_menu(id){
new playerId = id - 1339
if(is_user_connected(playerId)){
new CsTeams:team = cs_get_user_team(playerId)
if(team != CS_TEAM_T && team != CS_TEAM_CT) {
set_task(10.0,"prepare_menu",id)
} else {
showMenu(playerId)
}
} else {
remove_task(id)
}
}
public showMenu(id){
new name[32]
get_user_name(id, name, 31)
new menuoption[9][64]
new menubody[512]
new keys = (1<<0)|(1<<1)
// Clear string
for(new z = 0; z < 9; ++z)
{
menuoption[z][0] = '^0'
}
format(menuoption[0], 63, "r1 yNie Czituj! Czit = Perm!")
format(menuoption[1], 63, "r2 yZachowaj kulture osobista!")
format(menuoption[2], 63, "r3 yNie przeszkadzaj innym w grze!")
format(menuoption[3], 63, "r4 ySluchaj Adminow!")
format(menuoption[4], 63, "r5 yNie kamp!")
format(menuoption[5], 63, "r6 yAdmin ma zawsze racje!")
format(menuoption[6], 63, "r7 yNie krzycz przez mikrofon!")
format(menuoption[6], 63, "r8 yGraj Fair Play!")
format(menuoption[6], 63, "r9 yZrozumiano?!")
format(menuoption[7], 63, "r* y1. wNie Akceptuje")
format(menuoption[8], 63, "r* y2. rAkceptuje")
format(menubody, 511, "yWitaj Graczu :r^n %sw^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s", name, menuoption[0], menuoption[1], menuoption[2], menuoption[3], menuoption[4], menuoption[5], menuoption[6], menuoption[7], menuoption[8])
show_menu(id, keys, menubody, -1, "Witaj Graczu")
return PLUGIN_HANDLED
}
public actionMenu(id,key){
switch(key){
case 0: {
new num, i, name[32], message[191], players[32]
get_players(players,num)
get_user_name(id, name, 31)
server_cmd("kick #%d ^"Nie Zaakceptowales Zasad^"", get_user_userid(id))
formatex(message,190,"^x04[Akceptacja] Gracz %s, nie zaakceptowal zasad.",name)
for(i=0;i<num;i++)
{
message_begin(MSG_ONE,gmsgSayText,_,players[i])
write_byte(players[i])
write_string(message)
message_end();
}
}
case 1: {
new num, i, name[32], message[191], players[32]
get_players(players,num)
get_user_name(id, name, 31)
formatex(message,190,"^x04[Akceptacja] Gracz %s, zaakceptowal zasady.",name)
client_print(id,print_chat,"* Zaakceptowales Zasady, Powodzenia w Grze")
for(i=0;i<num;i++)
{
message_begin(MSG_ONE,gmsgSayText,_,players[i])
write_byte(players[i])
write_string(message)
message_end();
}
}
}
return PLUGIN_HANDLED
}
Skorzystalem z innego .sma
Napisano 05.10.2008 14:06
Napisano 05.10.2008 14:11
"r1 yNie Czituj! Czit = Perm!")
"r2 yZachowaj kulture osobista!")
"r3 yNie przeszkadzaj innym w grze!")
"r4 ySluchaj Adminow!")
"r5 yNie kamp!")
"r6 yAdmin ma zawsze racje!")
"r7 yNie krzycz przez mikrofon!")
"r8 yGraj Fair Play!")
"r9 yZrozumiano?!")
//"* Witaj na serwerze: %s", [G]ood [S]kill |FFA| @KampNO.pl)
Wiec masz.chce takie zasady ! ale proszę o 1 zeby zamisat tam nazwy serwa bylo Witaj na [G]ood [S]kill |FFA| @KampNO.pl
Napisano 05.10.2008 14:15
Napisano 05.10.2008 14:27
Napisano 05.10.2008 14:33
#include <amxmodx>
#include <cstrike>
new gmsgSayText
public plugin_init()
{
register_plugin("Player Enter", "0.1", "dev.cs.wrocek.com")
register_menucmd(register_menuid("Witaj Graczu"),1023,"actionMenu")
gmsgSayText = get_user_msgid("SayText")
}
public client_putinserver(id)
{
if (is_user_bot(id))
return
set_task(10.0, "dispInfo", id + 1337)
}
public client_disconnect(id)
{
if(task_exists(id + 1337)){
remove_task(id + 1337)
}
}
public dispInfo(id)
{
new playerId = id - 1337
new nextmap[32]
new hostname[32]
get_cvar_string("amx_nextmap", nextmap, 31)
get_cvar_string("hostname", hostname, 31)
client_print(playerId, print_chat, "* Witaj na serwerze: %s", hostname)
client_print(playerId, print_chat, "* Sponsor Serwera: http://pukawka.pl")
client_print(playerId, print_chat, "* Kontakt: kur3j@amxx.pl")
client_print(playerId, print_chat, "* Sprawy Banow, oraz inne problemy zalatwiamy na FORUM!")
client_print(playerId, print_chat, "* Dostepne Polecenia: /top15, /rankstats, /rank, /me, /hp")
prepare_menu(playerId + 1339)
}
public prepare_menu(id){
new playerId = id - 1339
if(is_user_connected(playerId)){
new CsTeams:team = cs_get_user_team(playerId)
if(team != CS_TEAM_T && team != CS_TEAM_CT) {
set_task(10.0,"prepare_menu",id)
} else {
showMenu(playerId)
}
} else {
remove_task(id)
}
}
public showMenu(id){
new name[32]
get_user_name(id, name, 31)
new menuoption[10][64]
new menubody[512]
new keys = (1<<0)|(1<<1)
// Clear string
for(new z = 0; z < 10; ++z)
{
menuoption[z][0] = '^0'
}
format(menuoption[0], 63, "r1 yNie Czituj! Czit=Perm!")
format(menuoption[1], 63, "r2 yZachowaj kulture osobista!")
format(menuoption[2], 63, "r3 yNie przeszkadzaj innym w grze!")
format(menuoption[3], 63, "r4 ySluchaj adminow!")
format(menuoption[4], 63, "r5 yNie kamp/raszuj!")
format(menuoption[5], 63, "r6 yNie krzycz przez mikrofon!")
format(menuoption[6], 63, "r7 yGraj Fair-Play!")
format(menuoption[7], 63, "r8 yZrozumiano?!
format(menuoption[8], 63, "r* y1. wGnaj sie!")
format(menuoption[9], 63, "r* y2. rTak jest!")
format(menubody, 511, "yWitaj Graczu :r^n %sw^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s^n%s", name, menuoption[0], menuoption[1], menuoption[2], menuoption[3], menuoption[4], menuoption[5], menuoption[6], menuoption[7], menuoption[8], menuoption[9])
show_menu(id, keys, menubody, -1, "Witaj Graczu")
return PLUGIN_HANDLED
}
public actionMenu(id,key){
switch(key){
case 0: {
new num, i, name[32], message[191], players[32]
get_players(players,num)
get_user_name(id, name, 31)
server_cmd("kick #%d ^"Nie Zaakceptowales Zasad^"", get_user_userid(id))
formatex(message,190,"^x04[Akceptacja] Gracz %s, nie zaakceptowal zasad.",name)
for(i=0;i<num;i++)
{
message_begin(MSG_ONE,gmsgSayText,_,players[i])
write_byte(players[i])
write_string(message)
message_end();
}
}
case 1: {
new num, i, name[32], message[191], players[32]
get_players(players,num)
get_user_name(id, name, 31)
formatex(message,190,"^x04[Akceptacja] Gracz %s, zaakceptowal zasady.",name)
client_print(id,print_chat,"* Zaakceptowales Zasady, Powodzenia w Grze")
for(i=0;i<num;i++)
{
message_begin(MSG_ONE,gmsgSayText,_,players[i])
write_byte(players[i])
write_string(message)
message_end();
}
}
}
return PLUGIN_HANDLED
}
0 użytkowników, 0 gości, 0 anonimowych