SA-MP Forums Archive
Need 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help (/showthread.php?tid=246350)



Need help - SpiderWalk - 03.04.2011

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


Re: Need help - SpiderWalk - 03.04.2011

!!!!!!!


Re: Need help - Davz*|*Criss - 03.04.2011

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


Re: Need help - SpiderWalk - 03.04.2011

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


Re: Need help - Marricio - 03.04.2011

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!!");
     }
}



Re: Need help - Cameltoe - 03.04.2011

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?


Re: Need help - SpiderWalk - 03.04.2011

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


Re: Need help - SpiderWalk - 03.04.2011

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


Re: Need help - SchurmanCQC - 03.04.2011

Don't double post.

MAKE USE OF THE EDIT BUTTON.




Re: Need help - Venice - 03.04.2011

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;
    }



Re: Need help - SpiderWalk - 03.04.2011

Код:
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!


Re: Need help - Davz*|*Criss - 04.04.2011

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.


Re: Need help - Gray - 04.04.2011

wow good idea

i gonna use this on my server


Re: Need help - SpiderWalk - 05.04.2011

Thanks for help!


Re: Need help - SpiderWalk - 05.04.2011

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)