/adminduty
#6

Here is not "SendToAdmin"

pawn Код:
CMD:adminduty(playerid, params[])
{
    new str[126];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "SERVER: You are not authorized to use this command.");
    if(GetPVarInt(playerid, "Injured") == 1) return SendClientMessage(playerid, COLOR_GREY, "WARNING: You may not go on duty while injured, /giveup if emergency.");
    if(AdminDuty[playerid] != 1)
    {
        AdminDutyCash[playerid] = PlayerInfo[playerid][pCash];
        GetPlayerHealth(playerid, AdminDutyHealth[playerid]);
        AdminDutyArmor[playerid] = PlayerInfo[playerid][pArmor];
        AdminDuty[playerid] = 1;
        format(str, sizeof(str), "%s (ID %i - %s) is now on duty as a level %i admin.", PlayerInfo[playerid][pAName], playerid, GetName(playerid), PlayerInfo[playerid][pAdmin]);
        SendClientMessageToAdmins(-1, str, 1);
        SetPlayerName(playerid, PlayerInfo[playerid][pAName]);
        SendClientMessage(playerid, -1, "STAFF: You are now on duty as an admin, you do now have access to all of your commands.");
        GetPlayerPos(playerid, PlayerInfo[playerid][pAx], PlayerInfo[playerid][pAy], PlayerInfo[playerid][pAz]);
    }
    else
    {
        waitcheck[playerid] = 2;
        SetPVarInt(playerid, "SpecOff", 1);
        TogglePlayerSpectating(playerid, false);
        SetCameraBehindPlayer(playerid);
        AdminDuty[playerid] = 0;
        SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ], 0, 0, 0, 0, 0, 0, 0);
        SpawnPlayer(playerid);
        SetPlayerWeapons(playerid);
        SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
        SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
        SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
        SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
        SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
        SetPlayerName(playerid, PlayerInfo[playerid][pName]);
        new backup[126];
        format(backup, 126, "%s Old cash: %i - New cash: %i", GetName(playerid), PlayerInfo[playerid][pCash], AdminDutyCash[playerid]);
        Log("/logs/backup.txt", backup);
        PlayerInfo[playerid][pCash] = AdminDutyCash[playerid];
        SetPlayerPos(playerid, PlayerInfo[playerid][pAx], PlayerInfo[playerid][pAy], PlayerInfo[playerid][pAz]);
        format(str, sizeof(str), "%s (ID %i - %s) is now off admin duty.", PlayerInfo[playerid][pAName], playerid, GetName(playerid));
        SendClientMessageToAdmins(-1, str, 1);
        SendClientMessage(playerid, -1, "STAFF: You are now off duty as an admin and have only a limited access to your commands.");
        spec[playerid] = -1;
        SetPlayerWeaponsEx(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
/adminduty - QUICK HELP - by PabloDiCostanzo - 26.02.2013, 14:24
Re: /adminduty - by Mitchy - 26.02.2013, 19:54
Re: /adminduty - by seanny - 26.02.2013, 19:55
Re: /adminduty - by Oscii - 26.02.2013, 20:17
Re: /adminduty - by PabloDiCostanzo - 27.02.2013, 01:30
Re: /adminduty - by PabloDiCostanzo - 28.02.2013, 16:02
Respuesta: /adminduty - by Strier - 28.02.2013, 16:05
Re: /adminduty - by PabloDiCostanzo - 28.02.2013, 16:22
Re: /adminduty - by Denying - 28.02.2013, 16:30
Re: /adminduty - by Height - 28.02.2013, 16:38

Forum Jump:


Users browsing this thread: 2 Guest(s)