SA-MP Forums Archive
[HELP] duty admin dynamic 3dlabel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] duty admin dynamic 3dlabel (/showthread.php?tid=590664)



[HELP] duty admin dynamic 3dlabel - Luca12 - 02.10.2015

Hello everyone. I have one question. I want ask you guys how to create dynamic3dtextlabel when some admin is on duty and I want that same label stays as long he's on admin duty until he execute command /dutyoff and also for example if is admin on duty and drive car and some player sit g in car I want then to player see his 3ddynamiclabel I have that all but the problem is for some reason the label just dissapear after some time I also check my timers for destroying that specific label but I only have that in command /dutyoff. Thanks


Re: [HELP] duty admin dynamic 3dlabel - Logic_ - 02.10.2015

show us the command of admin duty and off duty.


Re: [HELP] duty admin dynamic 3dlabel - Luca12 - 02.10.2015

dutyon:

pawn Код:
CMD:dutyon(playerid,params[])
{
    if(IgracLogiran[playerid] != 1)
    {
        SendClientMessage(playerid,COLOR_GRAD2,"{FFFFFF}[{48E31C}G-Protect{FFFFFF}] {C3C3C3}Morate biti logirani za koristenje ove komande!");
        return 1;
    }
    if(PlayerInfo[playerid][Admin] > 0 || IsPlayerAdmin(playerid))
    {
        if(ADuty[playerid] == 1)
        {
            SendClientMessage(playerid,COLOR_BIJELA,"{F81414}[Odbijeno!] {C3C3C3}Vec imate ukljucenu Admin Duznost!");
            return 1;
        }
        new string[128],ime[MAX_PLAYER_NAME];
        RPIme(playerid,ime);
        format(string,128,"%s je sada na admin duznosti.",ime);
        PorukaAdminima(bojalv,string,1);
        PorukaGameSagesima(bojalv,string,1);
        SendClientMessage(playerid,COLOR_ZUTA,"Ukljucio si admin duznost.");
        DutyAdmin[playerid] = CreateDynamic3DTextLabel("Na Admin Duznosti! (Ne Ometaj!)",SVIJETLOPLAVA,0.0,0.0,0.6,15.0,playerid,.testlos = 1);
        Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL,DutyAdmin[playerid],E_STREAMER_ATTACH_OFFSET_Z,0.6);
        SetPlayerArmour(playerid,99.0);
        SetPlayerHealth(playerid,99.0);
        ADuty[playerid] = 1;
        Admin3DKreiran[playerid] = true;
        SetPlayerColor(playerid,SVIJETLOPLAVA);
    }
    else return SendClientMessage(playerid,COLOR_GRAD2,"{FFFFFF}[{48E31C}G-Protect{FFFFFF}] {C3C3C3}Samo Admini!");
    return 1;
}
and dutyoff

pawn Код:
CMD:dutyoff(playerid,params[])
{
    if(IgracLogiran[playerid] != 1)
    {
        SendClientMessage(playerid,COLOR_GRAD2,"{FFFFFF}[{48E31C}G-Protect{FFFFFF}] {C3C3C3}Morate biti logirani za koristenje ove komande!");
        return 1;
    }
    if(PlayerInfo[playerid][Admin] > 0 || IsPlayerAdmin(playerid))
    {
        if(ADuty[playerid] == 0)
        {
            SendClientMessage(playerid,COLOR_BIJELA,"{F81414}[Odbijeno!] {C3C3C3}Niste na Admin Duznosti!");
            return 1;
        }
        new string[128],ime[MAX_PLAYER_NAME];
        RPIme(playerid,ime);
        format(string,128,"%s nije vise na admin duznosti.",ime);
        PorukaAdminima(bojalv,string,1);
        PorukaGameSagesima(bojalv,string,1);
        SendClientMessage(playerid,COLOR_ZUTA,"Iskljucio si admin duznost.");
        if(Admin3DKreiran[playerid] == true)
        {
            DestroyDynamic3DTextLabel(DutyAdmin[playerid]);
            Admin3DKreiran[playerid] = false;
            ADuty[playerid] = 0;
        }
        SetPlayerArmour(playerid,0.0);
        SetPlayerHealth(playerid,99.0);
        SetPlayerColor(playerid,COLOR_BIJELA);
    }
    else return SendClientMessage(playerid,COLOR_GRAD2,"{FFFFFF}[{48E31C}G-Protect{FFFFFF}] {C3C3C3}Samo Admini!");
    return 1;
}
So what I want to say in my first post I mean I turn admmin duty or some other player who is admin and for a while it's fine all but the problem is happening that label just disappear after some time I have problem with that which I wasn't able to solve so I come to you guys for help. Thanks again.


Re: [HELP] duty admin dynamic 3dlabel - Luca12 - 07.10.2015

anyone? Thanks