Need help
#1

I want to make a Admin Duty for my server post it here if you have any good ideas!
Reply
#2

!!!!!!!
Reply
#3

You mean you want help in making or you just want good ideas? How exactly you mean..
Reply
#4

Lol i mean to give in codes admin duty becouse i dont know how to do it
Reply
#5

pawn Код:
new aDuty[MAX_PLAYERS];


CMD:aduty(playerid,params[])
{
     if(aDuty[playerid] == 0)
     {
          aDuty[playerid] = 1;
          SendClientMessageToAll(-1," --- An administrator is now ON DUTY!!");
     }
     else
     {
          aDuty[playerid] = 0;
          SendClientMessageToAll(-1," --- An administrator is now OFF DUTY!!");
     }
}
Reply
#6

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
Lol i mean to give in codes admin duty becouse i dont know how to do it
This is not the request section.

Also "My works", Why do you even post tutorials when you don't know how to script?
Reply
#7

I mean to give in codes becouse i dont know how to do it
Reply
#8

Becouse this Admin category i very hard for me i dont know how to do any Admin script becouse i am asking to show me then
ok
Reply
#9

Don't double post.

MAKE USE OF THE EDIT BUTTON.

Reply
#10

pawn Код:
new adminduty[MAX_PLAYERS];
pawn Код:
if(strcmp(cmd, "/adminduty", true) == 0)
    {
        if (adminlevel[playerid] >= 1)// EDIT THIS
        {
            if(adminduty[playerid] == 1)
            {
                GetPlayerName(playerid, nameee, sizeof(nameee));
                format(string, sizeof(string), "%s is now off admin duty!", nameee);
                SendClientMessageToAll(0xFF0000FF, string);
                adminduty[playerid] = 0;
                SetPlayerHealth(playerid, 0.0);
            }
            else if(adminduty[playerid] == 0)
            {
                GetPlayerName(playerid, nameee, sizeof(nameee));
                format(string, sizeof(string), "%s is now on admin duty!", nameee);
                SendClientMessageToAll(0xFF0000FF, string);
                SetPlayerColor(playerid, 0x9ACD32AA);
                adminduty[playerid] = 1;
            }
        }
        else SendClientMessage(playerid, RED, "You are not an admin!");
        return 1;
    }
Reply
#11

Код:
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(113) : error 017: undefined symbol "cmd"
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(115) : error 017: undefined symbol "adminlevel"
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(115) : warning 215: expression has no effect
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(115) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(115) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\commands.pwn(115) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
This is errors!
Reply
#12

Hey SpiderWalk.

Here is /AdminDutyON and /AdminDutyOFF code:-

I have made by myself.

You must #include <zcmd>

Top of your fs.

pawn Код:
new AdminOnDuty[MAX_PLAYERS]
And here is the code:-

pawn Код:
CMD:admindutyon(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    if(AdminOnDuty[playerid] == 1) return SendClientMessage(playerid,0xAA3333AA, "You're already on Adminstrator duty, Type /AdminDutyOff to OFF your duty!");
    else
    {
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    new string[128];
    AdminOnDuty[playerid] = 1;
    format(string,sizeof(string), "Adminstrator %s is now on Admin duty.", pName);
    SendClientMessageToAll(0x33CCFFAA, string);
    }
    else
    {
    SendClientMessage(playerid, 0xAA3333AA, "You're not an adminstrator to use this cmd");
    }
    return 1;
}

CMD:admindutyoff(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    if(AdminOnDuty[playerid] == 0) return SendClientMessage(playerid,0xAA3333AA, "You're already off Adminstrator Duty, Type /AdminDutyOn to ON your duty!");
    else
    {
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    new string[128];
    AdminOnDuty[playerid] = 0;
    format(string,sizeof(string), "Adminstrator %s is no longer on Adminstrator duty.", pName);
    SendClientMessageToAll(0x33CCFFAA, string);
    }
    else
    {
    SendClientMessage(playerid, 0xAA3333AA, "You're not an adminstrator to use this cmd");
    }
    return 1;
}
You must be /Rcon (Password) to use this command, or you can change it to your admin level fs.



Well i hope this works.


Thanks.
Reply
#13

wow good idea

i gonna use this on my server
Reply
#14

Thanks for help!
Reply
#15

I am sorry but how to put on admin sistem i have a Xtreme Admin Sistem and how to put it in script?(I am in school on Informatick ).When i will put on it will be only for Rcon Admin.But i need to have it on Admin script(Xtreme Admin Sistem)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)