02.08.2012, 22:22
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
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; }