want to know something please read it
#8

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Код:
CMD:getadminlevel(playerid, params[])
{
	if (isnull(params))
		return SendClientMessage(playerid, -1, "Usage: /getadminlevel [player name]");

	new path[35];
	format(path, sizeof (path), "users/%s.ini", params);
	// Change path to whatever your user path is

	if (!fexist(path))
		return SendClientMessage(playerid, -1, "Player is not registered.");

	new File: file = fopen(path, io_read);
	if (!file)
		return SendClientMessage(playerid, -1, "An error occured. Try again.");

	new string[64];
	while (fread(file, string))
	{
		string[strlen(string) - 1 EOS];
		if (!strcmp(string, "Admin = ", true, 8))
		{
			format(string, sizeof (string), "%s's admin level: %i", params, string[8]);
			SendClientMessage(playerid, -1, string)
			break;
		}
	}
	fclose(file);
	return 1;
}
it's working fine but it showing the player level is 138 but that player having level 5
Reply


Messages In This Thread
want to know something please read it - by javedali1211 - 12.08.2016, 07:21
Re: want to know something please read it - by Stinged - 12.08.2016, 07:52
Re: want to know something please read it - by BroZeus - 12.08.2016, 07:57
Re: want to know something please read it - by javedali1211 - 12.08.2016, 09:32
Re: want to know something please read it - by Stinged - 12.08.2016, 09:40
Re: want to know something please read it - by javedali1211 - 12.08.2016, 10:38
Re: want to know something please read it - by Stinged - 12.08.2016, 11:21
Re: want to know something please read it - by javedali1211 - 12.08.2016, 11:58
Re: want to know something please read it - by Stinged - 12.08.2016, 12:00
Re: want to know something please read it - by javedali1211 - 12.08.2016, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)