Checking player's name?
I'm totally newbie on scripting for AMXX and I'm with some difficulty to make a function:
Code:
When player connects <- public client_connect ?Someone could make this little code so I can study on it? A little help with get_user_name(id, name, 17) is much appreciated too (Where did you get id? And name is where it will save the result? 17 is the number of letters it will save in the variable? One day I'll be good :up: |
Re: Checking player's name?
Here's the code:
Code:
#include <amxmodx>http://wiki.alliedmods.net/index.php/Pawn_Tutorial http://wiki.alliedmods.net/index.php...od_X_Scripting |
Re: Checking player's name?
Thank you stupok69, things are a little more clear now..
But (always have a "but") how to make to execute a command on client of his name is, for example, L0Lo? Code:
for (i = 0; i < 32; i++)How to make the "for" to run on every player connected? :up: PS: I'd already read these two tutorials but I still have difficulty to understand commands that have lots of arguments command (id, name, 1, et cetera) o.O |
Re: Checking player's name?
The plugin below will check if a player's name is "Lol0". It will only check the player's name when he joins the server or changes his name. If it's "Lol0" then it will change his name to "Arion".
PHP Code:
|
Re: Checking player's name?
Thanks again stupok69 :D
It worked... but If I add a new line of client_cmd: { client_cmd(id, "name Arion") // Call this function for client #id // Execute this command: "name Arion" client_cmd(id, "name L0Lo") } None of them run.. Why? Even if I make a new If, or a new function :S (Yes, I want the name to change twice) And where do I find functions like equal()? Only with experience? :P I take a look on funcions' part of AMXX website when I see a new function, helps me a little :D |
Re: Checking player's name?
Quote:
Code:
|
Re: Checking player's name?
I'm pretty sure it's like this:
Code:
if(name[16] == 0) |
Re: Checking player's name?
ahh
|
Re: Checking player's name?
Ok, but how do I execute 2 commands in sequence? :D
(One below the other doesn't work, I tried :P) |
Re: Checking player's name?
Code:
or you may need a delay: Code:
|
| All times are GMT -4. The time now is 21:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.