#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
}
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.
|
zasady! cos zle
#1
Napisano 06.10.2008 14:43
#2
Napisano 06.10.2008 14:58
format(menuoption[7], 63, "r8 yZrozumiano?!A ma być tak:
format(menuoption[7], 63, "r8 yZrozumiano?!")Cały kod:
#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
}
#3
Napisano 06.10.2008 15:14
#4
Napisano 06.10.2008 15:19
W załączniku masz amxx.
Załączone pliki
#6
Napisano 06.10.2008 15:43
Najpierw mówisz, że nie możesz skompilować pluginu, więc podaje Ci błąd. Ty dalej mówisz, że nie możesz skompilować. Daję Ci już gotowy plik amxx a Ty mi pokazujesz jakiś screen, na którym nie widać w czym problem. Na dodatek nie ma to nic wspólnego z kompilacją. Możesz trochę jaśniej wytłumaczyć?
Chyba, że chodzi Ci o te literki niepotrzebne, to sprobuj to:
#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, "Nie Czituj! Czit=Perm!")
format(menuoption[1], 63, "Zachowaj kulture osobista!")
format(menuoption[2], 63, "Nie przeszkadzaj innym w grze!")
format(menuoption[3], 63, "Sluchaj adminow!")
format(menuoption[4], 63, "Nie kamp/raszuj!")
format(menuoption[5], 63, "Nie krzycz przez mikrofon!")
format(menuoption[6], 63, "Graj Fair-Play!")
format(menuoption[7], 63, "Zrozumiano?!")
format(menuoption[8], 63, "1. Gnaj sie!")
format(menuoption[9], 63, "2. Tak jest!")
format(menubody, 511, "Witaj Graczu :^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
}
#7
Napisano 06.10.2008 17:51
[ Dodano: 06-10-2008, 19:03 ]
dobra zrobilem z tego sma co napisales i jest dokladnie to samo tylko ze nie ma tego "r3 y" i 2 odpowiedzi ze zgadza sie z zasadami! czemu tak jest a nie tak jak kur3k podawal pluga!
#8
Napisano 06.10.2008 18:31
#9
Napisano 06.10.2008 18:43
no to jak widziales na screenie moim z zasadami to wlasnie chce tego pluga z moim zasadami co sa(powtarzam) na sreenie na gorze!
#10
Napisano 07.10.2008 18:58
Widać kolory takie jak (czerwony, żółty, biały) a jak się skomplikuje czy gotowe się pobierze to tych kolorów nie ma .
Też mam taki problem .
#11
Napisano 07.10.2008 19:03
#12
Napisano 07.10.2008 19:19
Czyli powinno to wyglądać tak:
#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, "r2yZachowaj 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
}
#13
Napisano 07.10.2008 19:21
format(menuoption[0], 63, "r1 yNie Czituj! Czit=Perm!")
za kolor odpowiada r1 czy y ?
#14
Napisano 07.10.2008 19:24
Prawdopodobnie r to czerwony y to żółty, a w to biały, od pierwszej litery angielskiej nazwy. A co do r1, to wyświetli nam się czerwona "1".Ja tam odpowiadam przeszukując google i inne pluginy
#15
Napisano 07.10.2008 19:25
za kolor odpowiada r1 czy y ?
To i to
r1 to jest chyba czerwony
y to jest chyba żółty .
#16
Napisano 07.10.2008 19:25
#17
Napisano 07.10.2008 19:27
#18
Napisano 07.10.2008 19:28
#19
Napisano 07.10.2008 19:28
To i to
r1 to jest chyba czerwony
y to jest chyba żółty .
chyba problem rozwiązany ;d
No to jak jest "to i to", no to który kolor się wyświetli ?
#20
Napisano 07.10.2008 19:28
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych


Dodatki SourceMod



Temat jest zamknięty










