19.05.2011, 22:37
... You should learn to script on your own, you won't learn a thing by someone scripting for you. Anyways, here are your duty and off duty commands.
change "else return SendClientMessage(playerid,red,"Invalid Command. Type /cmds For A List Of All Available Server Commands.");" to something like "You are not a high enough level to use this command" if you want, but I made it say Invalid Command etc... because I don't want people to know what the admin commands are.
This is just a basic duty command. You can also add other features as hiding their icon on the radar while on duty, set them to a different colour, etc... This is close to my admin duty command but this has less features because I don't want to give out full ideas. The label is also included in this.
By the way, I think LuxAdmin is a copy of LAdmin, it has very similar functions as LAdmin does because I use it.
pawn Код:
// onplayercommandtext
dcmd(aduty,5,cmdtext);
dcmd(adutyoff,8,cmdtext);
// bottom of script
new Text3D:label[MAX_PLAYERS];
dcmd_aduty(playerid,params[])
{
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) // change it to your own level
{
new string[128];
new aname[MAX_PLAYER_NAME]; // admin name
GetPlayerName(playerid,aname,sizeof(aname));
format(string,sizeof(string),"* Administrator %s (%d) Is Now ON DUTY. Do Not Disturb This Admin.",aname,playerid);
label[playerid] = Create3DTextLabel("Administrator On Duty",red,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
SetPlayerSkin(playerid,skinid) // ENTER YOUR ADMIN SKIN ID HERE
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,38); // minigun
SetPlayerArmour(playerid,9999999);
SetPlayerHealth(playerid,9999999);
return 1;
} else return SendClientMessage(playerid,red,"Invalid Command. Type /cmds For A List Of All Available Server Commands.");
} else return SendClientMessage(playerid,red,"You Must Be Logged In To Use Commands.");
}
dcmd_adutyoff(playerid,params[])
{
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) // change it to your own level
{
new string[128];
new aname[MAX_PLAYER_NAME]; // admin name
GetPlayerName(playerid,aname,sizeof(aname));
format(string,sizeof(string),"* Administrator %s (%d) Is Now OFF DUTY. Player Returned To Regular State.",aname,playerid);
Delete3DTextLabel(Text3D:label[playerid]);
SetPlayerSkin(playerid,skinid) // ENTER YOUR NORMAL PLAYER SKIN HERE
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,weaponid); // give them more weps if u want when they do /adutyoff
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
return 1;
} else return SendClientMessage(playerid,red,"Invalid Command. Type /cmds For A List Of All Available Server Commands.");
} else return SendClientMessage(playerid,red,"You Must Be Logged In To Use Commands.");
}
This is just a basic duty command. You can also add other features as hiding their icon on the radar while on duty, set them to a different colour, etc... This is close to my admin duty command but this has less features because I don't want to give out full ideas. The label is also included in this.
By the way, I think LuxAdmin is a copy of LAdmin, it has very similar functions as LAdmin does because I use it.