Raised This Month: $51 Target: $400
 12% 

Solved Count all admins?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-20-2019 , 07:10   Count all admins?
Reply With Quote #1

Is there a way to count all admins in the file admins_simple.ini ?

If there is, please let me now. Thanks
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545

Last edited by cristian20042; 04-21-2019 at 09:17.
cristian20042 is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 04-20-2019 , 10:09   Re: Count all admins?
Reply With Quote #2

amount or nicknames?

for amount u can try to read lines with loop and check "if strcontains ' STEAM_ ' do count++"

Last edited by farawayf; 04-20-2019 at 10:10.
farawayf is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-20-2019 , 10:22   Re: Count all admins?
Reply With Quote #3

Nicknames
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545
cristian20042 is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 04-20-2019 , 10:40   Re: Count all admins?
Reply With Quote #4

for example i think it can be done by reading string after four "/" like "////nick"
example of admins_simple.ini
Code:
"STEAM_0:1:123"		"z"	////Gab3n
"STEAM_0:1:1234"	"z"	////Gab3n2

Last edited by farawayf; 04-20-2019 at 10:40.
farawayf is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-20-2019 , 11:29   Re: Count all admins?
Reply With Quote #5

Can it be done by taking the SteamID and searching for name via an api? If so, can someone show me a short example?
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545
cristian20042 is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-21-2019 , 09:17   Re: Count all admins?
Reply With Quote #6

Ok, I think I solved the problem. I can make a mysql database that stores playernames and steam ids, and I could get the steam id from every line in admins_simple and then do the magic and search for the steam ids. Solved.
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545
cristian20042 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 13:16.


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