Jump to content

Recommended Posts

Posted (edited)

salut, am comenzile /mute si /spec si au acces si lideri la comenzile acestea.

Codurile sunt aici:

Citat

CMD:mute(playerid, params[])
{
    if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 1 && pInfo[playerid][pRank] < 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");
    new text[40], mtime, playerto;
    if(sscanf(params, "uis[24]", playerto, mtime, text)) return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/mute [playerid/name] [time(minutes)] [reason]");
    if(playerto == INVALID_PLAYER_ID || mtime > 5000 || pInfo[playerto][pStatus] != 1) return SendClientMessage(playerid, COLOR_DARKGRAY, "Player not connected. (OR) Maximum mute minutes is 5000.");
    if(pInfo[playerto][pAdmin] > pInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_DARKGRAY, "You don't use this command on a admin with rank bigger than your.");
    if(pInfo[playerid][pRank] == 10 && pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 1 && mtime > 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum minutes for mute is 10 for leaders.");
    pInfo[playerto][mute] = gtm+(mtime*60);
    if(pInfo[playerid][pAdmin] || pInfo[playerid][pHelper]) format(strAll, 200, "%s has muted player %s for %i minutes, reason: %s.", nm[playerid], nm[playerto], mtime, text),
        SendClientMessageToAll(COLOR_RED, strAll), addlog(strAll, playerto, 11);
    else format(AdminWText, 190, "Leader %s has muted player %s for %i minutes, reason: %s.", nm[playerid], nm[playerto], mtime, text),
        SendStaffMessage(0xC22124FF, AdminWText), format(AdminWText, 190, "Leader %s has muted you for %i minutes, reason: %s.", nm[playerid], mtime, text), SendClientMessage(playerto, COLOR_ORANGE, AdminWText);
    return 1;
}

Citat

 

CMD:spec(playerid, params[])
{
    if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3 && pInfo[playerid][pRank] < 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");
    if(pInfo[playerid][pWp] == 755 || pInfo[playerid][pWp] == 756 || pInfo[playerid][pWp] == 666 || vwp[playerid] == 666) return SendClientMessage(playerid, COLOR_DARKGRAY, "Do not use this command if you are enrolled in a war/race.");
    if(pInfo[playerid][pSleep] == 1) return SendClientMessage(playerid, COLOR_DARKGRAY, "You can't use this command, you sleeping.");
    new playerto;
    if(sscanf(params, "u", playerto)) return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/spec [playerid/name]");
    if(playerto == INVALID_PLAYER_ID || playerto == playerid || pInfo[playerto][pStatus] != 1) return SendClientMessage(playerid, COLOR_DARKGRAY,"Player not connected.");
    if(pInfo[playerid][pSpecCRE] != 1) CreateSpecTD(playerid);
    if(pInfo[playerid][pRank] == 10 && pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3)
    {
        if(pInfo[playerid][pJailed] > 0) return SendClientMessage(playerid, COLOR_DARKGRAY, "Do not use this command if you are in jail.");
        if(pInfo[playerid][pMember] != pInfo[playerto][pMember]) return SendClientMessage(playerid, COLOR_DARKGRAY, "The player is not a part of your faction.");
        if(pInfo[playerid][pSpv] == -1) GetPlayerPos(playerid, pInfo[playerid][pSpecPos0], pInfo[playerid][pSpecPos1], pInfo[playerid][pSpecPos2]), pInfo[playerid][pSpecInt] = innt[playerid], pInfo[playerid][pSpecVW] = vwp[playerid];
        format(stgtts , 80, "Name: ~y~%s ~w~(~y~%d~w~)", nm[playerto], playerto), PlayerTextDrawSetString(playerid, Spectate0[playerid], stgtts);
        if(vix[playerto] > 0) return
            PlayerTextDrawShow(playerid, Spectate0[playerid]), PlayerTextDrawShow(playerid, Spectate1[playerid]),
            pInfo[playerid][pSpv] = playerto,
            KillTimer(pInfo[playerid][pP104]), pInfo[playerid][pP104] = SetTimerEx("fups", 1000, true, "ii", playerid, playerto),
            TogglePlayerSpectating(playerid, 1), SetPlayerInteriorEx(playerid, innt[playerto]), SetPlayerVirtualWorldEx(playerid, vwp[playerto]),
            PlayerSpectateVehicle(playerid, vix[playerto]);

        else return PlayerTextDrawShow(playerid, Spectate0[playerid]), PlayerTextDrawShow(playerid, Spectate1[playerid]), pInfo[playerid][pSpv] = playerto,
            TogglePlayerSpectating(playerid, 1), SetPlayerInteriorEx(playerid, innt[playerto]), SetPlayerVirtualWorldEx(playerid, vwp[playerto]),
            PlayerSpectatePlayer(playerid, playerto), KillTimer(pInfo[playerid][pP104]), pInfo[playerid][pP104] = SetTimerEx("fups", 1000, true, "ii", playerid, playerto);
    }
    if(pInfo[playerto][pAdmin] > pInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_DARKGRAY, "You don't spectate a admin with rank bigger than your.");
    if(pInfo[playerid][pSpv] == -1) GetPlayerPos(playerid, pInfo[playerid][pSpecPos0], pInfo[playerid][pSpecPos1], pInfo[playerid][pSpecPos2]), pInfo[playerid][pSpecInt] = innt[playerid], pInfo[playerid][pSpecVW] = vwp[playerid];
    format(stgtts , 80, "Name: ~y~%s ~w~(~y~%d~w~)", nm[playerto], playerto), PlayerTextDrawSetString(playerid, Spectate0[playerid], stgtts);
    format(AdminWText, 190, "AdmCmd: %s is now spectate on %s.", nm[playerid], nm[playerto]), SendAdminMessage(playerid, COLOR_ADMWARNING, AdminWText);
    if(vix[playerto] > 0) return
        PlayerTextDrawShow(playerid, Spectate0[playerid]), PlayerTextDrawShow(playerid, Spectate1[playerid]),
        pInfo[playerid][pSpv] = playerto,
        KillTimer(pInfo[playerid][pP104]), pInfo[playerid][pP104] = SetTimerEx("fups", 1000, true, "ii", playerid, playerto),
        TogglePlayerSpectating(playerid, 1), SetPlayerInteriorEx(playerid, innt[playerto]), SetPlayerVirtualWorldEx(playerid, vwp[playerto]),
        PlayerSpectateVehicle(playerid, vix[playerto]);

    else return PlayerTextDrawShow(playerid, Spectate0[playerid]), PlayerTextDrawShow(playerid, Spectate1[playerid]), pInfo[playerid][pSpv] = playerto,
        TogglePlayerSpectating(playerid, 1), SetPlayerInteriorEx(playerid, innt[playerto]), SetPlayerVirtualWorldEx(playerid, vwp[playerto]),
        PlayerSpectatePlayer(playerid, playerto), KillTimer(pInfo[playerid][pP104]), pInfo[playerid][pP104] = SetTimerEx("fups", 1000, true, "ii", playerid, playerto);
}

 

 

Edited by WicK.
Posted

Daca te uiti mai atent gasesti problema :)) 

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3 && pInfo[playerid][pRank] < 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

Posted
Acum 1 minut, iSorin[] a spus:

Daca te uiti mai atent gasesti problema :)) 

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3 && pInfo[playerid][pRank] < 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

la [pRank] <10 pun 0? in loc de 10

Posted
Chiar acum, WicK. a spus:

la [pRank] <10 pun 0? in loc de 10

Pai daca nu vrei sa aiba si membrii acces. Eu zic ca scoti toata aia. pInfo[playerid][pRank] < 10

Posted
Acum 14 minute, iSorin[] a spus:

Pai daca nu vrei sa aiba si membrii acces. Eu zic ca scoti toata aia. pInfo[playerid][pRank] < 10

(82534) : error 029: invalid expression, assumed zero

Posted
Chiar acum, WicK. a spus:

(82534) : error 029: invalid expression, assumed zero

pai si linia de cod ?

Posted

Inlocuieste 

Citat

if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 1 && pInfo[playerid][pRank] < 10) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

cu

Citat

if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

Posted
Acum 2 minute, iSorin[] a spus:

pai si linia de cod ?

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3 && return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

Posted
Chiar acum, WicK. a spus:

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3 && return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

Posted
Acum 1 minut, iSorin[] a spus:

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 3) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

 

multumesc dar la mute?....

Posted
Chiar acum, WicK. a spus:

multumesc dar la mute?....

 if(pInfo[playerid][pAdmin] < 1 && pInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not authorized to use that command.");

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.