[POMOC] Oko admin/helper duty

Započeo Maad, Avgust 25, 2013, 01:05:08 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Extreme
Detaljan opis problema: Kada admin ide /adminduty pojavi se zuta boja ali ne traje dugo posle nekog vremena negde 4,5min nestane boja neznam sto ista stvar i za /helperduty, a za /vlasnikduty se crna boja uopste ne pojavljuje ja neznam sta je to  ::) ako neko zna nek mi objasni ili bolje to on uradi
Dio skripte:

Za admin duty kodovi ..

if(!strcmp(cmdtext, "/adminduty", true)) //
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
return 1;
    }
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
        if(AdminDuty[playerid] == 0)
        {
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s je sada na Admin Duznosti", sendername);
ABroadCast(TEAM_VAGOS_COLOR,string,1);
if(PlayerInfo[playerid][pAdmin] >= 2)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
        }
        else if(AdminDuty[playerid] == 1)
        {
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s vise nije na Admin Duznosti", sendername);
ABroadCast(TEAM_VAGOS_COLOR,string,1);
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "Niste Admin !");
        return 1;
    }
}
    return 1;
}


Za helper duty kodovi:

if(!strcmp(cmdtext, "/helperduty", true)) //
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
return 1;
    }
    if(PlayerInfo[playerid][pGm] > 0)
    {
        if(GmDuty[playerid] == 0)
        {
            GmDuty[playerid] = 1;
            SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,188); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid,233); }
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**HELPER: %s je sada na Helper Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
SetPlayerChatBubble(playerid, "[ HELPER ]", COLOR_YELLOW, 50.0, 99999999999);
        }
        else if(GmDuty[playerid] == 1)
        {
GmDuty[playerid] = 0;
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,188); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid,233); }
SetPlayerColor(playerid,COLOR_WHITE);
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**HELPER: %s vise nije na Helper Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
SetPlayerChatBubble(playerid, "[ HELPER ]", COLOR_YELLOW, 50.0, 99999999999);
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste Helper  !");
        return 1;
    }
}
    return 1;
}


Za vlasnikduty kodovi:

if(!strcmp(cmdtext, "/vlasnikduty", true)) //
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >= 1340)
    {
        if(AdminDuty[playerid] == 0)
        {
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 9999);
SetPlayerHealth(playerid, 999);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,COLOR_WHITE);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s je sada na Admin Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
if(PlayerInfo[playerid][pAdmin] >= 1340)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
        }
        else if(AdminDuty[playerid] == 1)
        {
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,COLOR_BLACK);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s vise nije na Admin Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste Vlasnik !");
        return 1;
    }
}
    return 1;
}


I evo tajmera nekog kog sam nasao u public OnGameModeInit()

    //AdminDuty
    SetTimer("boja", 500, 1)
    new cenaz[256];

Ko ima strpljenja nek pogleda.  :)


forward boja();
    public boja()
    {
    foreach(Player, i)
    {
    if(AdminDuty[i] != 0)
    {
     SetPlayerColor(i, 0xFFC801C8);
    }
    }
    return 1;
}


Izmeni SetPlayerColor kod vlasnik duty na ovo:

SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
Poslednja Izmena: Avgust 25, 2013, 20:22:34 POSLE PODNE od Maxwellâ„¢

Citat: Maxwellâ,,¢ poslato Avgust 25, 2013, 20:20:14 POSLE PODNE
Izmeni SetPlayerColor kod vlasnik duty na ovo:

SetPlayerColor(playerid,TEAM_VAGOS_COLOR);

Jel to ovde gde je COLOR_WHITE ili gde je COLOR_BLACK , da promenim u TEAM_VAGOS_COLOR ?

Stavi ovako vlasnik duty:

if(!strcmp(cmdtext, "/vlasnikduty", true)) //
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Morate se prvo prijaviti !");
return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >= 1340)
    {
        if(AdminDuty[playerid] == 0)
        {
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 9999);
SetPlayerHealth(playerid, 999);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,COLOR_WHITE);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s je sada na Admin Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
if(PlayerInfo[playerid][pAdmin] >= 1340)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
        }
        else if(AdminDuty[playerid] == 1)
        {
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerSkin(playerid, 294);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "**Admin: %s vise nije na Admin Duznosti", sendername);
ABroadCast(COLOR_YELLOW,string,1);
new Float:fa, Float:fy, Float:fu;
        GetPlayerPos( playerid, fa, fy, fu );
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste Vlasnik !");
        return 1;
    }
}
    return 1;
}

Stavljeno je za vlasnik duty . ..

Jel zna neko resenje zasto bude neko vreme color i onda nestane bude bela boja svaki 4,5 minuta ...
Ako jos nesto zatreba dacu ..
Poslednja Izmena: Avgust 26, 2013, 02:09:50 PRE PODNE od krrk


Probaj kod ovog :

SetTimer("boja", 500, 1)

Da povecas ovaj broj 500 na lupam ovako:

SetTimer("boja", 50000, 1)

pa vidi oce  duze biti.

Citat: Maxwellâ,,¢ poslato Avgust 26, 2013, 13:55:08 POSLE PODNE
Probaj kod ovog :

SetTimer("boja", 500, 1)

Da povecas ovaj broj 500 na lupam ovako:

SetTimer("boja", 50000, 1)

pa vidi oce  duze biti.

Ne pomaze :S . .




za sta uopste i pravis tu funkciju "boja" ? samo uz funkciju setplayercolor oboji igraca i miran si

Citat: Blaeks poslato Avgust 27, 2013, 19:45:31 POSLE PODNE
za sta uopste i pravis tu funkciju "boja" ? samo uz funkciju setplayercolor oboji igraca i miran si

Izbrisao sam forward boja i sranja oko toga ..

Nego, sad ko da nesto duze traje boja i od jednom svima nestane koji su bili na admin/helper dutiju !