auto-name change problem
Use rename.ini file to change one's name,rename.ini is like this
PHP Code:
|
Re: need help,Thanks
Well, try to go through the loop to understand...
You're changing the player name to default name on each fail to compare the name, you should use somethnig to detect if the name wasn't changed. Code:
new bool:changed = falseYou should also provide a informative title about what the problem is, I was one step away from skipping this thread if I wasn't so bored :} |
Re: need help,Thanks
A short name about the thread's text, that's a title, in your case: "naming problem", "name loop problem", "auto-name change problem", etc.
This is scripting help not requests and you obviously didn't learn anything since you just placed my code inside a loop when I deliberly posted the loop so you'll see that there are some things that must NOT be in the loop... but now you're back to your initial problem. And client_infochanged() is called when a player changes his name... or any other information using setinfo or such, you might want to search for the corect info getting methods. |
Re: auto-name change problem
i chaged the title.
when a player changes his name,my idea is :if his new name isn't in the name list of name.ini ,then plugin handled. |
Re: auto-name change problem
Then why do you keep changing it to default name ?
Do you even understand what those codes do ? |
Re: auto-name change problem
Quote:
if (equali(name, g_szName[i])) { // } else { // } is useless. i want to learn how to make it sense. |
Re: auto-name change problem
Quote:
Quote:
I also added comments to the code to reinforce the information. And I didn't said it's useless, I just explained your issue. If you don't really know anything about amxx scripting I recommend you start reading the pawn tutorial: http://wiki.amxmodx.org/Pawn_Tutorial |
Re: auto-name change problem
Quote:
|
| All times are GMT -4. The time now is 10:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.