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
 

Zdjęcie

Akceptowanie zasad,,,


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

#1 Jesper

    Banned

  • Zbanowany

Reputacja: -2
Nowy

  • Postów:20
  • Lokalizacja:krk
Offline

Napisano 26.06.2010 08:21

Witam. Myślę że to dobry dział na tego typu temat.
A więc mam problem z plikiem .sma , zapisuje takie zasady jakie chce i dalej są takie jak pobrałem.

Czy mógłby mi ktoś je przerobić na takie jak chce ?
#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: [url=http://pukawka.pl")]http://pukawka.pl")[/url] 
    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[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 Przeklinaj") 
        format(menuoption[1], 63, "\r2 \yNie Czituj/Oszukuj") 
        format(menuoption[2], 63, "\r3 \yWykonuj cele mapy") 
        format(menuoption[3], 63, "\r4 \yNie badz statsiarzem") 
        format(menuoption[4], 63, "\r5 \yAdmin ma zawsze racje") 
        format(menuoption[5], 63, "\r6 \yDostepne Polecenia:") 
        format(menuoption[6], 63, "\r7 \y/top15, /rank, /rankstats, /me") 
        format(menuoption[7], 63, "\r* \y1. \wNie Akceptuje") 
        format(menuoption[8], 63, "\r* \y2. \rAkceptuje") 

        format(menubody, 511, "\yWitaj Graczu :\r^n     %s\w^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 
}




A chciałbym mieć takie :
client_print(playerId, print_chat, "* Witaj na serwerze: %s", hostname) 
    client_print(playerId, print_chat, "* Sponsor Serwera: NiceShoot.pl")  
    client_print(playerId, print_chat, "* Sprawy Banow, oraz inne problemy zalatwiamy na FORUM!") 
    client_print(playerId, print_chat, "* Dostepne Polecenia: /top15, /rankstats, /rank, /hats")


format(menuoption[0], 63, "\r1 \yNie Przeklinaj") 
        format(menuoption[1], 63, "\r2 \yNie Czituj/Oszukuj") 
        format(menuoption[2], 63, "\r3 \yWykonuj cele mapy") 
        format(menuoption[3], 63, "\r4 \yNienaduzywaj mikro") 
        format(menuoption[4], 63, "\r5 \yAdmin ma zawsze racje") 
        format(menuoption[5], 63, "\r6 \yDostepne Polecenia:") 
        format(menuoption[6], 63, "\r7 \y/top15, /rank, /rankstats, /hats") 
        format(menuoption[7], 63, "\r* \y1. \wNie Akceptuje") 
        format(menuoption[8], 63, "\r* \y2. \rAkceptuje")


i tu zamiast Aplikacja chce mieć [Zasady DR]
[Akceptacja] Gracz %s, nie zaakceptowal zasad.





Z góry Dziękuje i Wielki + !

Użytkownik Jesper edytował ten post 26.06.2010 08:22


#2 Owner123

    Wszechpomocny

  • Użytkownik

Reputacja: 146
Zaawansowany

  • Postów:331
  • Lokalizacja:Barty ;]
Offline

Napisano 26.06.2010 08:43

#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: NiceShoot.pl")
client_print(playerId, print_chat, "* Sprawy Banow, oraz inne problemy zalatwiamy na FORUM!")
client_print(playerId, print_chat, "* Dostepne Polecenia: /top15, /rankstats, /rank, /hats")

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 Przeklinaj")
format(menuoption[1], 63, "\r2 \yNie Czituj/Oszukuj")
format(menuoption[2], 63, "\r3 \yWykonuj cele mapy")
format(menuoption[3], 63, "\r4 \yNienaduzywaj mikro")
format(menuoption[4], 63, "\r5 \yAdmin ma zawsze racje")
format(menuoption[5], 63, "\r6 \yDostepne Polecenia:")
format(menuoption[6], 63, "\r7 \y/top15, /rank, /rankstats, /hats")
format(menuoption[7], 63, "\r* \y1. \wNie Akceptuje")
format(menuoption[8], 63, "\r* \y2. \rAkceptuje")


format(menubody, 511, "\yWitaj Graczu :\r^n %s\w^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[Zasady DR] 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[Zasady DR] 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
}


Użytkownik Owner123 edytował ten post 26.06.2010 08:46

  • +
  • -
  • 1

#3 Jesper

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: -2
Nowy

  • Postów:20
  • Lokalizacja:krk
Offline

Napisano 26.06.2010 09:03

No niestety nie pomogłeś ;/ dalej mam takie jak na początku.. ;/ Ale dziękuje za chęci.

#4 Kubaczek <3

    Zaawansowany

  • Użytkownik

Reputacja: 17
Początkujący

  • Postów:116
  • Steam:steam
  • Lokalizacja::)
Offline

Napisano 26.06.2010 09:04

Skompilowałeś i wgrałeś na serwer? Ja raz się dziwiłem czemu nie działa a zamiast na diablo wrzuciłem na zombie :P
  • +
  • -
  • 2

#5 Jesper

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: -2
Nowy

  • Postów:20
  • Lokalizacja:krk
Offline

Napisano 26.06.2010 09:14

Skopilowalem i teraz wklejam do plugis ? i nazwe do plugins.ini ?

26 czerwiec 2010 - 09:14:
kubaku4 DZIEKUJE CI !!! Wielki + !!!


Temat do Zamkniecia!

#6 sinoku

    Pomocny

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:42
Offline

Napisano 26.06.2010 23:17

a zmieniles mape? ewentualnie daj res serwera
  • +
  • -
  • 0




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

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