Raised This Month: $ Target: $400
 0% 

Getting an ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tsilenzio
Junior Member
Join Date: Jul 2005
Old 06-28-2006 , 15:26   Re: Getting an ID
Reply With Quote #1

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?
tsilenzio is offline
BetaX
Member
Join Date: Nov 2005
Old 06-28-2006 , 18:31   Re: Getting an ID
Reply With Quote #2

You mean like if you wanted to vote someone off? :O I donno if anyone has ever wanted to do that... hm.
BetaX is offline
tsilenzio
Junior Member
Join Date: Jul 2005
Old 06-28-2006 , 20:11   Re: Getting an ID
Reply With Quote #3

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()?
tsilenzio is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 13:09   Re: Getting an ID
Reply With Quote #4

Quote:
Originally Posted by tsilenzio
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()?
You'll have to manually scan through. Here's a function that'll do it for you:
Code:
stock find_player_authid(szAuthid[]) {     static szPlayerAuthid[36],iPlayers[32],iPlayersnum     get_players(iPlayers,iPlayersnum)         for(new iCount = 0;iCount < iPlayersnum;iCount++)     {         iPlayer = iPlayers[iCount]                 get_user_authid(iPlayer,szPlayerAuthid,35)         if(equal(szAuthid,szPlayerAuthid))             return iPlayer     }         return 0 }

If it finds a player, it'll return something > 0, otherwise it'll return 0.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:02.


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