auto change nick / name problem
Results 1 to 9 of 9
  1. #1
    Member Array
    Join Date
    Jun 2018
    Karma
    0

    Post auto change nick / name problem

    z svima

    stavio sam u amxx.cfg ovo: amx_task 1 "amx_nick "<Warrior> Player" "Promeni nick" s

    Task Scheduler.amxx radi upaljen je

    amx_ejl_adminchat.amxx isto radi upaljen je

    i nece da menja nepotrebne nickove zna li neko u cemu je problem?

    ako ne moze preko task-a da menja ima li kakav plugin samo da menja ovaj nick: <Warrior> Player u Promeni nick?

  2. #2
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    15

    Default

    dobro je sto ne radi taj task na svaku sekundu evo ti kod, detektuje mu nik na njegov konekt na serveru i plus ako slucajno u toku igre hoce da stavi taj nik, testirano:

    Code:
    #include <amxmodx>
    #include <amxmisc>
    
    #define PLUGIN "Zameni nick (warior player)"
    #define VERSION "1.0"
    #define AUTHOR "Srbija"
    
    
    public plugin_init() 
    {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    }
    public client_putinserver( id )
    {
    	new name[ 32 ]
    	get_user_name( id, name, charsmax( name ) )
    	
    	if( equali( "<Warrior> Player", name ) )
    		set_user_info( id, "name", "Promeni Nick" )
    }
    public client_infochanged( id ) 
    {   
    	new name[ 32 ]
    	get_user_info( id, "name", name, charsmax( name ) ) 
    	
    	if( equali( "<Warrior> Player", name ) )
    		set_user_info( id, "name", "Promeni Nick" )
    }
    PrimeKZ innovative kz main plugin
    PrimeBAN new method of banning players

    Deathrun Timer (click me)

  3. #3
    Member Array
    Join Date
    Jun 2018
    Karma
    0

    Default

    hvala puno!

    Code:
    #include <amxmodx>
    #include <amxmisc>
    
    #define PLUGIN "Zameni nick (warior player)"
    #define VERSION "1.0"
    #define AUTHOR "Srbija"
    
    
    public plugin_init() 
    {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    }
    public client_putinserver( id )
    {
    	new name[ 32 ]
    	get_user_name( id, name, charsmax( name ) )
    	
    	if( equali( "<Warrior> Player", name ) )
    		set_user_info( id, "name", "Promeni Nick" )
    }
    public client_infochanged( id ) 
    {   
    	new name[ 32 ]
    	get_user_info( id, "name", name, charsmax( name ) ) 
    	
    	if( equali( "<Warrior> Player", name ) )
    		set_user_info( id, "name", "Promeni Nick" )
    }
    Mozes li mi reci samo cemu to sluzi sto sam zutom bojom oznacio?
    Jel to za slotove ili za nesto drugo?

  4. #4
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    15

    Default

    get_user_name funkcija uzima nick igraca, ali mora da ga ubaci u NESTO za dalju proveru...to nesto sam ja stavio da bude name...mozes da stavis kikiriki, isto ce da radi, nebitno je koj je naziv...a 32 je zbog maximalnog dozvoljenog broja slova u imenu u csu
    PrimeKZ innovative kz main plugin
    PrimeBAN new method of banning players

    Deathrun Timer (click me)

  5. #5
    Senior Member Array
    Join Date
    Dec 2014
    Location
    Šibenik
    Age
    36
    Karma
    0

    Default

    Ovo je dobra stvar skroz ako ne opterecuje server, Ovo je sma?
    I dali moze umjesto "promjeni nick" staviti nesto drugo?

    Edit: Da, rjesio sam sve..Postavio i koliko sad vidim radi super. Hvala
    Last edited by Franky; 28-04-2019 at 11:05.

  6. #6
    Senior Member Array
    Join Date
    Dec 2014
    Location
    Šibenik
    Age
    36
    Karma
    0

    Default

    Samo jedno pitanje, Ja sam sad to sve napravio i radi super ali zasto sad npr "promjeni nick" svi se isto zovu a nema npr ono "promjeni nick (1)" ili (2) itd nego samo "promjeni nick" i imas isti nick nekoliko na serveru.. nije mi jasno ni kako je to moguce da sam server to ne napravi?

  7. #7
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    15

    Default

    ne bih znao kako server to ne promeni...probaj umesto:
    Code:
    set_user_info( id, "name", "Promeni Nick" )
    
    ->
    
    client_cmd( id, "name Promeni_Nick" )
    PrimeKZ innovative kz main plugin
    PrimeBAN new method of banning players

    Deathrun Timer (click me)

  8. #8
    Senior Member Array
    Join Date
    Dec 2014
    Location
    Šibenik
    Age
    36
    Karma
    0

    Default

    Neecee

  9. #9
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    15

    Default

    Code:
    public client_infochanged( id ) 
    {   
    	new name[ 32 ]
    	get_user_info( id, "name", name, charsmax( name ) ) 
    	
    	if( containi( "<Warrior> Player", name ) != -1 )
            {
                    new new_nick[ 32 ]; formatex( new_nick, charsmax( new_nick ), "Promeni_nick_%d%d", random_num( 0, 9 ), random_num( 0, 9 ) )
    		set_user_info( id, "name", new_nick )
            }
    }
    probaj ovo...nik ce da se razlikuje..npr: Promeni_nick_44 a drugi promeni_nick_58
    PrimeKZ innovative kz main plugin
    PrimeBAN new method of banning players

    Deathrun Timer (click me)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •