Guys pls help
#1

Guys i wanna create a /adminduty command for Dm server but i am unable to make that so i wish that anyone will send me the /adminduty script
Reply
#2

Just download admin system and copy past it to your script.. Look how all commands are maked and make your own so it's easy way to learn
Reply
#3

In which admin script can i find /adminduty ?
Reply
#4

you wantto make that if admin is on duty he can use admin commands and if he is not he can't?
Reply
#5

Here is one for LuxAdmin you can change it to yours and btw there is a problem with the 3DTextLabel that it dose not disabear

PHP код:
new Text3D:Label[MAX_PLAYERS];
dcmd_onduty(playerid,params[])
{
    
#pragma unused params
    
if (AccInfo[playerid][Level] >= 1)
    {
        if(
AccInfo[playerid][OnDuty] == 0)
        {
            new 
string[240];
            new 
AdminName[MAX_PLAYER_NAME];
            
GetPlayerName(playeridAdminNamesizeof(AdminName));
            
AccInfo[playerid][OnDuty] = 1;
             
SetPlayerHealth(playerid,100000);
            
GivePlayerWeapon(playerid,31,100000); GivePlayerWeapon(playerid,16,100000);
             
GivePlayerWeapon(playerid,34,100000); GivePlayerWeapon(playerid,29,100000);
            
GivePlayerWeapon(playerid,38,100000); GivePlayerWeapon(playerid,24,100000);
            
GivePlayerWeapon(playerid,26,100000); GivePlayerWeapon(playerid,4,1);
            
Attach3DTextLabelToPlayer(Label[playerid], playerid0.00.01.0 );
            
Label[playerid] = Create3DTextLabel("ADMIN ON DUTY[DONT ATTACK]"red30.040.050.040.00);
            
format(stringsizeof(string),"[ADMIN]: %s is now on Admin Duty"AdminName);
            
AccInfo[playerid][God] = 1;
             return 
SendClientMessageToAll(green,string);
        }
        else
        {
            new 
string[240];
            new 
AdminName[MAX_PLAYER_NAME];
            
GetPlayerName(playeridAdminNamesizeof(AdminName));
            
AccInfo[playerid][OnDuty] = 0;
            
ResetPlayerWeapons(playerid);
            
SetPlayerHealth(playerid,100);
            
SetPlayerArmour(playerid,0);
            
Delete3DTextLabel(Label[playerid]);
            
format(stringsizeof(string),"[ADMIN]: %s is now Off Admin Duty"AdminName);
             
AccInfo[playerid][God] = 0;
             return 
SendClientMessageToAll(orange,string);
        }
    }
    return 
SendClientMessage(playerid,orange,"Your level is not high enough");

Reply
#6

pawn Код:
CMD:aduty(playerid,params[])
{
 new string[128];
 new Name[MAX_PLAYER_NAME];
 GetPlayerName(playerid, Name, sizeof(Name));
 if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You Need To Be Rcon Admin");
 SetPlayerHealth(playerid,99999);
 format(string, sizeof(string), "%s(%d) is on admin duty", Name, playerid);
 SendClientMessageToAll(-1,string);
 return 1;
}

pawn Код:
CMD:adutyoff(playerid,params[])
{
 new string[128];
 new Name[MAX_PLAYER_NAME];
 GetPlayerName(playerid, Name, sizeof(Name));
 if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You Need To Be Rcon Admin");
 SetPlayerHealth(playerid,100);
 format(string, sizeof(string), "%s(%d) is out of admin duty", Name, playerid);
 SendClientMessageToAll(-1,string);
 return 1;
}
You will need zcmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)