SA-MP Forums Archive
Admin system help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin system help (/showthread.php?tid=365422)



Admin system help - Michael_Cuellar - 02.08.2012

I made this https://sampforum.blast.hk/showthread.php?tid=253481 and i was wondering how do i edit the levels and make more admin commands


Re: Admin system help - Majed - 02.08.2012

It's easy to edit levels.
And to make commands it's shown there.
Other wise, open any MADE admin system, see exampled of commands and try of creating Similar or with ur imaginiation!l
Example:

Код:
if(strcmp(cmd, "/ban", true) == 0)	{
	if(PlayerInfo[playerid][Level] >= 4) {
	    new tmp[256];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))	{
		SendClientMessage(playerid, red, "USAGE: /ban [playerid] [reason]");
		return 1;	}
		new player1;
		player1 = strval(tmp);
		if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID || (PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel]) )	{
		SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself");
		return 1;	}
		tmp = strtok(cmdtext, idx);

		GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
	   	new year,month,day;	getdate(year, month, day);	new strdate[20];	format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
		CMDMessageToAdmins(playerid,"BAN");
		format(string,256,"%s has been banned by Administrator %s [Reason: %s] [Date: %s] ",playername,adminname,cmdtext[6],strdate);	SendClientMessageToAll(grey,string);
		SaveToFile("BanLog",string); Ban(player1);
	} else	{
  	SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
	return 1;	}
There similar to this, and there you go.