Bug in Aduty
#1

Hey there guys....there is some bug in the /aduty (zGaming) as many of us already know that zgaming is full of bugs.
Anyways...when I open the server...and go OnDuty.
It closes samp-server...and the server starts reconnecting.
My server_logs.
http://pastebin.com/BBHCuavy
Anyone?
Reply
#2

This is my Aduty command in the gamemode.

pawn Код:
CMD:aduty(playerid, params[])
{
    new string[128], file[32];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(!aDuty[playerid])
    {
        format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
        format(file, sizeof(file), "users/%s.ini", dini_Get(file, "AdminName"));
        if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_GREY, "Choose an admin name using /aname first.");
        format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
        format(string, sizeof(string), "AdmWarn: %s has went on admin duty. (Admin name: %s)", RPN(playerid), dini_Get(file, "AdminName"));
        SendAdminMessage(COLOR_DARKRED, 1, string);
        SaveChar(playerid);
        ClearChar(playerid);
        format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
        SetPlayerName(playerid, dini_Get(file, "AdminName"));
        LoadChar(playerid);
        aDuty[playerid] = 1;
        SpawnChar(playerid);
        GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
        format(string, sizeof(string), "%s", RPALN(playerid));
        /*Delete3DTextLabel(aDutyText[playerid]);
        if(PlayerInfo[playerid][pAdmin] == 1) aDutyText[playerid] = Create3DTextLabel(string, COLOR_LIGHTGREEN, 0, 0, -20, 25, -1, 1);
        if(PlayerInfo[playerid][pAdmin] == 2) aDutyText[playerid] = Create3DTextLabel(string, COLOR_LIME, 0, 0, -20, 25, -1, 1);
        if(PlayerInfo[playerid][pAdmin] == 3) aDutyText[playerid] = Create3DTextLabel(string, COLOR_YELLOW, 0, 0, -20, 25, -1, 1);
        if(PlayerInfo[playerid][pAdmin] == 4) aDutyText[playerid] = Create3DTextLabel(string, COLOR_ORANGE, 0, 0, -20, 25, -1, 1);
        if(PlayerInfo[playerid][pAdmin] == 5) aDutyText[playerid] = Create3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, -1, 1);
        if(PlayerInfo[playerid][pAdmin] == 6) aDutyText[playerid] = Create3DTextLabel(string, COLOR_DARKRED, 0, 0, -20, 25, -1, 1);
        Attach3DTextLabelToPlayer(aDutyText[playerid], playerid, 0, 0, 0.25);*/

        if(IsValidDynamic3DTextLabel(aDutyText[playerid]))  DestroyDynamic3DTextLabel(aDutyText[playerid]);
        if(PlayerInfo[playerid][pAdmin] == 1) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_LIGHTGREEN, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 2) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_LIME, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 3) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 4) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 5) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid);
        if(PlayerInfo[playerid][pAdmin] == 6) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_DARKRED, 0, 0, -20, 25, playerid);
        Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, aDutyText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
    }
Reply
#3

dfddad
Reply
#4

Alright do this
Go to your folder where you keep zgaming and go to scriptfiles then make a folder called logs. Done

EDIT: its not a bug its just the releaser who forgot to put all the stuff in the download.
Reply
#5

Mr.Wizza...your solution fixed that thing....but another problem came up.
You will see with this image:


The codes of this:
pawn Код:
forward NOPSetPlayerPos();
public NOPSetPlayerPos()
{
    // NOP Vehicle Cheat
    foreach(Player, playerid)
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
        {
            if(IsLeoVehicle(GetPlayerVehicleID(playerid)) && PlayerInfo[playerid][pFac] != 1 || IsTruckerVehicle(GetPlayerVehicleID(playerid)) && PlayerInfo[playerid][pJob] != JOB_TRUCKER)
            {
                new string[128];
                format(string, sizeof(string), "AdmWarn: %s is either desynced or using NOP hacks. (Driving Restricted Vehicle)", RPN(playerid));
                SendAdminMessage(COLOR_DARKRED, 1, string);
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by xxRichixx
Посмотреть сообщение
Mr.Wizza...your solution fixed that thing....but another problem came up.
You will see with this image:


The codes of this:
pawn Код:
forward NOPSetPlayerPos();
public NOPSetPlayerPos()
{
    // NOP Vehicle Cheat
    foreach(Player, playerid)
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
        {
            if(IsLeoVehicle(GetPlayerVehicleID(playerid)) && PlayerInfo[playerid][pFac] != 1 || IsTruckerVehicle(GetPlayerVehicleID(playerid)) && PlayerInfo[playerid][pJob] != JOB_TRUCKER)
            {
                new string[128];
                format(string, sizeof(string), "AdmWarn: %s is either desynced or using NOP hacks. (Driving Restricted Vehicle)", RPN(playerid));
                SendAdminMessage(COLOR_DARKRED, 1, string);
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Remove that its made wrong.
Reply
#7

The whole of that script? Of Adminduty?
Reply
#8

No on the restricted vehicle in the script remove it
Reply
#9

Worked! Thanks and +rep fo sure!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)