hi
i have 2 arrays one called admins[32] and one called adminSQL[100]
i need to compare these arrays and cant get my head around how
admins[32] stores the steam id of any admins on the server
adminSQL[100] stores all the admin steamids from "auth" field
how would i compare these 2 arrays since SQL could have anywhere from 1 admin to 100 admins and the server could have 32 admins on it.
heres what i got so far
Code:
new adminSteamIDs[32]
new authID[32]
new players[32], inum
new i = 0
get_players(players,inum)
//Find All Admins On Server and Store SteamID in array
while( i < inum ){
if( get_user_flags(players[i])){
get_user_authid(players[i],authID,31)
copy(adminSteamIDs[i],31,authID)
}
i++
}
//Retrieve All Admins From SQL Database and Store In Array
new steamSQL[100]
new adminName[100]
new j = 0
result = dbi_query(dbc,"SELECT auth,name FROM admins")
while( j < dbi_num_rows(result)){
dbi_nextrow(result)
dbi_result(result,"auth",steamSQL[j])
}
//Compare Admins Array With SQL Array And Print If They Match
someone help please
__________________