AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Show name users.ini (https://forums.alliedmods.net/showthread.php?t=209682)

ironskillz1 02-28-2013 12:02

Show name users.ini
 
This shows the Steamid in Users.ini

but i want to show Name to can i some how do that?

Code:

public cmdAdminRemove(id)
{
 static iMenu;
 iMenu = menu_create("\r[%s]\y Admin Menu - v2.0\r by SnusMumrikeN^n\y- Remove Admin", "RemoveMenuHandler");
 
 static sBuffer[128], sTempItem[128];
 static sTemp[4][STR_LEN];
 
 static iFileP;
 iFileP = fopen(gAdminsFile, "rt");
 
 while(!feof(iFileP))
 {
  fgets(iFileP, sBuffer, sizeof sBuffer - 1);
 
  if((strlen(sBuffer) < 3) || sBuffer[0] == ';')
  continue;
 
  parse(sBuffer, sTemp[0], sizeof sTemp[] - 1, sTemp[1], sizeof sTemp[] - 1, sTemp[2], sizeof sTemp[] - 1, sTemp[3], sizeof sTemp[] - 1);
 
  for(new j = 0 ; j < sizeof sTemp ; j++)
  {
  remove_quotes(sTemp[j]);
  }
 
  formatex(sTempItem, sizeof sTempItem - 1, "\w%s\r|\w%s\r|\w%s\r|\w%s\r", sTemp[0], sTemp[1], sTemp[2], sTemp[3]);
 
  menu_additem(iMenu, sTempItem, "", 0, -1);
 }
 fclose(iFileP);
 
 menu_addblank(iMenu, 0);
 menu_display(id, iMenu, 0);
}


fysiks 03-01-2013 00:47

Re: Show name users.ini
 
If your admins are defined by SteamID (like they should be) then there is no name in the file to get. I've written at least one plugin that will get an extra piece of information from users.ini by adding another parameter in the file (the admin's name). That is probably what you should do too.


See here: http://forums.alliedmods.net/showthread.php?t=144788

ironskillz1 03-01-2013 08:15

Re: Show name users.ini
 
SOLVED


All times are GMT -4. The time now is 21:44.

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