/makeadmin CMD problems
#1

Код:
dcmd_makeadmin(playerid, params[])
{
  new
  str[128];
	if(IsPlayerConnected(playerid))
	{
  	if(PlayerI[playerid][PlayerAdmin] == 0) return SystemMsg (playerid, "You must be a admin to use this command!");
  	new giveplayerid = ReturnUser(params);
  	if(sscanf(params, "us", giveplayerid, PlayerAdmin)) return SystemMsg(playerid, " Usage : /makeadmin [playerid / name] [admin level]");
  	if(!IsPlayerConnected(giveplayerid)) return SystemMsg(playerid, "That player is not connected!");
	  else
		{
		  format(str, sizeof(str), "ADMIN %s has made %s level %s admin", PlayerName(playerid), PlayerName(giveplayerid), PlayerAdmin);
		  SendClientMessageToAll(COLOR_YELLOW, str); PlayerI[giveplayerid][PlayerAdmin];
		}
	}
	return 1;
I am trying to make it so an admin an set a player admin level and it saves to player and than saves to the user file on /q on disconnect (Which it already does, I managed to make it just set you to level 1 but i need it to set you to any value picked)
Reply


Messages In This Thread
/makeadmin CMD problems - by MisterTickle - 08.09.2009, 01:14
Re: /makeadmin CMD problems - by x-cutter - 08.09.2009, 01:37
Re: /makeadmin CMD problems - by _Vortex - 08.09.2009, 02:07
Re: /makeadmin CMD problems - by iLinx - 08.09.2009, 02:16

Forum Jump:


Users browsing this thread: 1 Guest(s)