Raised This Month: $ Target: $400
 0% 

command not working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-20-2013 , 05:43   Re: command not working
Reply With Quote #5

If you input "^n" in steamid string, then you can't try to compare to connected players steamids, won't work.
Also fprintf allow formatting, use it.
Your get_players usage is not correct, you have to loop the array.
Also you could add to get_players flags c and h so you don't collect bots and you don't collect hltvs

PHP Code:
public cmd_add_costum_ban(idlevelcid
{
    if(
cmd_access(idlevelcid2))
    {
        new 
new_steam_id[32]
        
read_argv(1new_steam_idcharsmax(new_steam_id))

        new 
File fopen(path"wt")

        
fprintf(Filenew_steam_id)
        
fprintf(File"^n^"%s^""new_steam_id);
        
fclose(File)

        new 
players[32], numsteamid[32], user
        get_players
(playersnum"ch")
        for(--
numnum>=0num--)
        {
            
user players[num]
            
get_user_authid(usersteamidcharsmax(steamid))

            if(
equal(new_steam_idsteamid))
            {
                
// code



                
break // we have a match, don't continue the loop for nothing
            
}
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 06:31.


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