28.01.2015, 08:58
Hi SAMP Community,
Who can help me to make admin name system, Just give me the code
/setadminname --- Will set admin name
/aduty --- His name will be set on what you set name on /setadminname
Admin cant go on duty if his admin name is not set.
Every times the admin on duty died, It will:
Only 2 commands and 1 special code.
REWARDS: High Admin RANK in my RP server, and +REP
HERE IS MY CODES:
Who can help me to make admin name system, Just give me the code
/setadminname --- Will set admin name
/aduty --- His name will be set on what you set name on /setadminname
Admin cant go on duty if his admin name is not set.
Every times the admin on duty died, It will:
Код:
KillEMSQueue(playerid); ClearAnimations(playerid);
REWARDS: High Admin RANK in my RP server, and +REP
HERE IS MY CODES:
pawn Код:
CMD:aduty(playerid, params[])
{
if(!PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, -1, "This is an admin only command!");
new var = PlayerInfo[playerid][pAdminDuty];
ResetPlayerWeapons(playerid);
if(!var)
{
AdminTexxt[playerid] = Create3DTextLabel("Admininstrator[ON DUTY] {FF0000}(DO NOT ATTACK!)", 0xFFFF00FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(AdminTexxt[playerid], playerid, 0.0, 0.0, 0.5);
GivePlayerValidWeapon(playerid, 24, 99999);
GivePlayerValidWeapon(playerid, 43, 60000);
GivePlayerValidWeapon(playerid, 24, 60000);
GivePlayerValidWeapon(playerid, 31, 99999);
GivePlayerValidWeapon(playerid, 32, 99999);
GivePlayerValidWeapon(playerid, 27, 99999);
GivePlayerValidWeapon(playerid, 34, 99999);
GivePlayerValidWeapon(playerid, 38, 99999);
SetPlayerColor(playerid, COLOR_ADUTY);
}
else
{
SetPlayerToTeamColor(playerid);
Delete3DTextLabel(AdminTexxt[playerid]);
}
SendClientMessageEx(playerid, COLOR_BLUE, (var) ? ("You are now off admin duty!") : ("You are now on Administrator duty!"));
//SetPlayerName(playerid, (var) ? (PlayerInfo[playerid][pNormalName]) : (PlayerInfo[playerid][pAdminName]));
PlayerInfo[playerid][pAdminDuty] = (var) ? (0) : (1);
//SetPlayerHealth(playerid, (var) ? (Float:(0x7F800000)) : Float:(0x7F800000));
SetPlayerHealth(playerid, (var) ? (100) : (100000));
SetPlayerArmour(playerid, (var) ? (0) : (9999999));
new szMessage[75];
format(szMessage, sizeof(szMessage), (var) ? ("Administrator %s is now {800000}OFF {FF0000}Duty!") : ("Administrator %s is now {00FF00}ON {FF0000}Duty!"), GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_REALRED, szMessage);
return 1;
}