View Single Post
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-03-2014 , 18:38   Re: if equal steamid
Reply With Quote #2

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.
EDIT: Moved that new variable for name outside the loop.
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)
{
    new 
szSteamID[32]
    
get_user_authid(idszSteamIDcharsmax(szSteamID))
    for(new 
1sizeof SteamIDsi++)
    {
        if(
equal(szSteamIDSteamIDs[i]))
        {
            
//Do stuff needed :)
        
}
    }

__________________

Last edited by Flick3rR; 06-13-2014 at 18:34.
Flick3rR is offline
Send a message via Skype™ to Flick3rR