Raised This Month: $ Target: $400
 0% 

if equal steamid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-04-2014 , 04:45   Re: if equal steamid
Reply With Quote #1

Quote:
Originally Posted by Flick3rR View Post
Use a const and loop trough all the SteamIDs in it. I think this is the best way to read two or more steamids at once.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

new const SteamIDs[][]=
{
    
"",
    
"STEAM_x:x:xxxxxxxx",
    
"STEAM_y:y:yyyyyyyy",
    
"STEAM_z:z:zzzzzzzz"
}

public 
plugin_init() {
    
    
register_clcmd("say /test""CheckSteamIds")
}

public 
CheckSteamIds(id)
{
    for(new 
1sizeof SteamIDsi++)
    {
        new 
szSteamID[32]
        
get_user_authid(idszSteamIDcharsmax(szSteamID))
        
        if(
equal(szSteamIDSteamIDs[i]))
        {
            
//Do stuff needed :)
        
}
    }

Never create a new variable inside a loop.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
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 21:05.


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