Getting an ID
Hello, I am VERY new to scripting. I was wondering how you obtain an authid, and if its a string like a steam ID like STEAM:0:0:123456 or if its a 3 digit number like 124 or just a single digit number. Also I was wondering if you do or dont include the # infront of it.
And if you dont keep the # infront of it, then how do u seperate it from it?. If you dont mind can you give me a small example? And explain a little bit. Sorry to ask for so much, I am just really confused on this part of scripting. Thank you SO much in advance! - tsilenzio edit: Also if possible show how to detect if there is no player ID by the number the user provides? |
Re: Getting an ID
get_user_authid ( index, authid[], len )
Get more on that here... http://www.amxmodx.org/funcwiki.php?go=func&id=166 |
Re: Getting an ID
yea but does that give me their ID, or search for them by their id? I get confused very easily sorry :(
|
Re: Getting an ID
When you do this command whoever triggers the function by what ever means the plugin uses such as a client command or console command it will take their AuthID, as in the person who triggered the event.
|
Re: Getting an ID
Yea, but thats not what i want, I want it where if i type amx_blah #314 . how could i get it to search for this ID? And return a value for it?
|
Re: Getting an ID
You mean like if you wanted to vote someone off? :O I donno if anyone has ever wanted to do that... hm.
|
Re: Getting an ID
I am making a plugin called amx_delhacker which takes the parameters <name, or #authid> And then it will figure out if that was the name of the person or the authid,.. i was wondering how to search for people by authid.. or is that the id's that it fills up when u run the command: get_players()?
|
Re: Getting an ID
Quote:
Code:
If it finds a player, it'll return something > 0, otherwise it'll return 0. |
| All times are GMT -4. The time now is 08:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.