/makeadmin not retaining info.
#1

Hello, I have this issue, where my Makeadmin script does not retain the admin information, it makes the person administrator and everything all fine, but when I restart the server, the player loses their admin... why?

Code:
	if(strcmp(cmd, "/makeadmin", true) == 0)
		  {
 		  if(IsPlayerAdmin(playerid))
 		  {
		  new level;
			new newadmin[18];
			tmp = strtok(cmdtext, idx);
 		  new newadminid = strval(tmp);
			if(IsPlayerConnected(newadminid))
		  {
			if(!strlen(tmp))
			{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makeadmin [playerid] [level(1-5)]");
			return 1;
		  }
 			else
			{
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			GetPlayerName(newadminid, newadmin, sizeof(newadmin));
			GetPlayerName(playerid, pname, sizeof(pname));
			format(string, sizeof(string), "You are now an admin level %d.", level);
			SendClientMessage(newadminid, COLOR_YELLOW, string);
			format(string, sizeof(string), "You made %s a level %d admin.", newadmin, level);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			PlayerInfo[newadminid][pAdmin] = level;
 			OnPlayerUpdate(playerid);
			return 1;
 			}
		}
	}
}
Reply


Messages In This Thread
/makeadmin not retaining info. - by Paladin - 04.05.2009, 16:44
Re: /makeadmin not retaining info. - by HB - 04.05.2009, 16:49
Re: /makeadmin not retaining info. - by Paladin - 04.05.2009, 16:56
Re: /makeadmin not retaining info. - by HB - 04.05.2009, 18:27
Re: /makeadmin not retaining info. - by Paladin - 06.05.2009, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)