AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to check name change? (https://forums.alliedmods.net/showthread.php?t=106012)

turshija 10-10-2009 16:56

How to check name change?
 
Hello ...
I'm developing anti IP spam in chat, and I've managed to make everything except one thing ...
Block IP address in name ...

Now, I know how to get players name and check if its IP ...
How do I check if player changed his name during game?
Is there something like public name_change(id) function that does every time player changes his name ?
Because I think checking players name in public client_connect is not really smart thing ... :)

xPaw 10-10-2009 17:05

Re: How to check name change?
 
http://www.amxmodx.org/funcwiki.php?go=func&id=8

turshija 10-10-2009 17:19

Re: How to check name change?
 
thanks :)
K+

edit: oh and by the way ... Now I have to check players name in client_connect and in client_infochanged ?

vitorrd 10-10-2009 17:40

Re: How to check name change?
 
Quote:

Originally Posted by turshija (Post 957945)
thanks :)
K+

edit: oh and by the way ... Now I have to check players name in client_connect and in client_infochanged ?

Isn't it better to use their Steam ID instead of their names?
get_user_authid: http://www.amxmodx.org/funcwiki.php?go=func&id=166

turshija 10-10-2009 17:46

Re: How to check name change?
 
Dude ...
Did you read my first post at all ? o_O
I need player name because I have to check if he named himself by an IP ... :S
For example, some kiddie puts his servers IP in his name and goes to another server and stars spamming "JOIN THIS SERVER BLABLABLA" ...

vitorrd 10-10-2009 17:50

Re: How to check name change?
 
Quote:

Originally Posted by turshija (Post 957976)
Dude ...
Did you read my first post at all ? o_O
I need player name to check if he named himself by an IP ... :S
For example, some kiddie puts his servers IP in his name and goes to another server and stars spamming "JOIN THIS SERVER BLABLABLA" ...

I'll try being nice about this: Your english sucks, therefore you should watch how you talk to people. Moreover, you could waste your precious time testing whether client_infochanged is called upon connection or not instead of wasting it disrespecting people that don't understand your lame english.

turshija 10-10-2009 17:55

Re: How to check name change?
 
Good job being an arrogant fool ...
Not everyone on this forum is native english speaker ...


One more question intended to people that are more friendly:
How do I change players name?
I don't see any set_user_name command ...

ConnorMcLeod 10-10-2009 19:06

Re: How to check name change?
 
set_user_info(id, "name", "NewNameHere")

More offensive :
client_cmd(id, "name NewName")

turshija 10-10-2009 19:31

Re: How to check name change?
 
thanks!
I will K+ you when my karma recharges ... :)

turshija 10-10-2009 20:12

Re: How to check name change?
 
hmm ...
for some strange reason, I can't get this to work ... :S
I have
PHP Code:

public client_infochanged(id


    (
check if name is allowed)

    
     if (
name not allowed) {
    
log(id,"Name not allowed!");
    
client_cmd(id"name changeme")
    }
    


i've tried with client_cmd, set_user_info and same as set_task(0.1, "change_name", id) with this function:
PHP Code:

public change_name(id)
{
    
client_cmd(id"name changeme")


but all I get when I change name to the not allowed one during game I get messages:

[not allowed name] changed name to "changeme"
but my name stays the same ... :S


All times are GMT -4. The time now is 22:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.