Raised This Month: $ Target: $400
 0% 

Help Please


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 03-07-2006 , 00:31   Help Please
Reply With Quote #1

can someone tell me why this doesnt work properly?

when i test it with just one person( my self ) it works because im slot #1 but when someone else is in slot #1 it doesnt work.

its suposed to connect to a SQL DB then loop through all players STEAMIDs on the server and compare then with ones located in the admins table.

if it one matches it shud print Alias Name then STEAMID followed by Real Name

ie
Player??? STEAM123 Dave

Code:
public checkAdmin(id){     if (!(get_user_flags(id)&ADMIN_KICK)){         console_print(id,"You have no access to that command")         return PLUGIN_HANDLED }             new players[32],inum, auth[32],name[32],playerid[32], playername[32]         if(!get_playersnum()){         console_print(id,"No Players Found")         return PLUGIN_HANDLED     }     get_players(players,inum)     result = dbi_query(dbc,"SELECT * FROM admins")         console_print(id,"Admins On Server")         for (new i=0;i<=dbi_num_rows(result);i++) {                     dbi_nextrow(result)         dbi_result(result,"auth",auth,31)         get_user_authid(players[i],playerid,31)         get_user_name(players[i],playername,31)         if ( equal(auth,playerid)){             dbi_result(result,"name",name,31)             console_print(id,"%s %s = %s",playername,playerid,name)         }     }     dbi_free_result(result)     return PLUGIN_HANDLED }

think its to do with the loop
__________________
Dont know how to add admins?

use my program
http://www.amxmodx.org/forums/viewto...=129092#129092

it does the work for you ... sort of
Anthraxnz 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 20:17.


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