Admin script
#1

Could anyone create an admin script with few commands?
/freeze (time)
/setcolour
/setskin
/kill
/tp
/spawn (vehicleid)
/kick
/ban
/nos
/mute (mins)
/countdown
Reply
#2

Post it in the topic of madmin then ?
Dont create new topics for stuff that already excists .

/Artix
Reply
#3

Just pick an adminscript in the Filterscripts category and delete the commands that you don't need.
Reply
#4

Now Im using Lethal adminscript and if I try to open it, if i compile it shows a error.
Reply
#5

@shoru93 i will give you the /kick and /ban command.

you may use ZCMD because this is on ZCMD Format

pawn Код:
CMD:kick(playerid, params[])
{
    new pid;
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /kick <playerid/name> <reason>");
        if(!IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID && pid != playerid)
        {
           new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
           GetPlayerName(pid, paramname, sizeof(paramname));
           GetPlayerName(playerid, adminname, sizeof(adminname));
           format(string, sizeof(string), "Administrator %s has kicked %s <Reason: %s>",adminname,paramname, params[2]);
           SendClientMessageToAll(COLOR_RED, string);
           format(string, sizeof(string), "You have been kicked by Administrator %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(pid,COLOR_RED, string);
           format(string, sizeof(string), "You kicked %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(playerid,COLOR_GREEN, string);
           Kick(pid);
           format(string,sizeof(string),"Administrator %s has kicked %s",adminname,paramname);
           SendToAdmins(COLOR_GREY,string);
        }
        else return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected or its yourself.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 2 to use this command");
    return 1;
}

CMD:ban(playerid, params[])
{
    new pid;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /ban <playerid/name> <reason>");
        if(!IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID && pid != playerid)
        {
           new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
           new year,month,day; getdate(year, month, day);
           new hour,minuite,second; gettime(hour,minuite,second);
           GetPlayerName(pid, paramname, sizeof(paramname));
           GetPlayerName(playerid, adminname, sizeof(adminname));
           format(string, sizeof(string), "Administrator %s has ban %s <Reason: %s> <Date: %d/%d/%d> <Time: %d:%d>",adminname,paramname, params[2],day,month,year,hour,minuite);
           SendClientMessageToAll(COLOR_RED, string);
           format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(pid,COLOR_RED, string);
           SendClientMessage(pid,COLOR_WHITE, "====Xtreme Gangwar 0.3c Ban Details====");
           format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(pid,COLOR_RED, string);
           SendClientMessage(pid,COLOR_RED, "Make unban appeal at our forums. www.server.com");
           SendClientMessage(pid,COLOR_RED, "Dont Try To Ban Evade or You will be range banned!");
           format(string, sizeof(string), "You ban %s <Reason: %s>", paramname, params[2]);
           SendClientMessage(playerid,COLOR_GREEN, string);
           SaveIn("BanLog",string);
           Kick(pid);
           format(string,sizeof(string),"Administrator %s has banned %s",adminname,paramname);
           SendToAdmins(COLOR_GREY,string);
        }
        else return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected or its yourself.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 2 to use this command");
    return 1;
}
I hope you enjoy
Reply
#6

I can give you freeze command
pawn Код:
CMD:freeze(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not an admin!");
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"Syntax Error: \"/FREEZE <NICK OR ID>\".");
    new id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid,COLOR_RED,"Syntax Error: \"/FREEZE <NICK OR ID>\".");
    if(id == INVALID_PLAYER_ID || id == playerid) return SendClientMessage(playerid,COLOR_RED,"ERROR: You can not freeze yourself or a disconnected player.");
    new string[256],name[24],ActionName[24];
    GetPlayerName(playerid,name,24);
    GetPlayerName(id,ActionName,24);
    TogglePlayerControllable(id,false);
    format(string,256,"Admin Chat: Admnistrator \"%s\" has frozen \"%s\".",name,ActionName);
    return 1;
}
I hope you like it.
Reply
#7

command setskin in zcmd and sscanf
pawn Код:
CMD:setskin(playerid, params[])
{
     if(IsPlayerAdmin(playerid))
     {
        new Player2, Skin, Name[24+1], string[128];
        if(sscanf(params, "ui", Player2, Skin))return SendClientMessage(playerid, -1, "USAGE: /SetSkin [ID] [Skin ID]");
        else if(Player2 == INVALID_PLAYER_ID)return SendClientMessage(playerid, -1, "Error: Player is not connected.");
        else if(Skin > 299)return SendClientMessage(playerid, -1, "Error: Invalid skin.");
        else {
                GetPlayerName(playerid, Name, sizeof Name);
                format(string, sizeof string, "The Admins '%s' to change your skin [ Skin ID: %i ]", Name, Skin);
                SetPlayerSkin(playerid, Skin);
                SendClientMessage(Player2, -1, string);
             }
     }else return SendClientMessage(playerid, -1, "Error: You must be Administrator to use this command.");
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)