Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Cerere comanda /jail si /unjail


Question

Posted

Salut, am luat un gamemode si nu am in gm comanda /jail <id> sau /unjail <id> va rog daca o are cineva si ma poate ajuta.

Multumesc

3 answers to this question

Recommended Posts

  • 0
Posted

YCMD:ajail(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new id,reason[128],string[128],minutes;
    if(sscanf(params, "uis[128]", id,minutes,reason)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/ajail <playerid/name> <Minutes> <reason>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    ResetWeapons(id);
    SetPlayerArmourEx(id, 0);
    for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(id, 1001, 1001, 200);
    CheckPaintball();
    PaintType[id] = 0;
    SetPlayerWantedLevel(id, 6);
    PlayerInfo[id][pWantedLevel] = 0;
    Update(id, pWantedLevelx);
    PlayerInfo[id][pJailed] = 2;
    PlayerInfo[id][pJailTime] = minutes*60;
    JailPrice[id] = 0;
    UpdateVar(id, "AJail", 1);
    PlayerInfo[id][pAJail] = 1;
    InsereazaSanctiune(id, playerid, JAIL, reason);
    Update(id,pJailedx);
    Update(id,pJailTimex);
    UpdateVar2(playerid, "Jails", 1);
    PlayerInfo[playerid][pHelpedPlayers] ++;
    PlayerInfo[playerid][pHelpedPlayersToday] ++;
    SpawnPlayer(id);
    new szQuery[256];
    mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE users SET `HelpedPlayers` = '%d', `HelpedPlayersToday`='%d' WHERE `ID` = '%d'", PlayerInfo[playerid][pHelpedPlayers], PlayerInfo[playerid][pHelpedPlayersToday], PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL, szQuery, "", "");    
    format(string, sizeof(string), "Esti in inchisoare pentru %d minute. motiv: %s", minutes,reason);
    SCM(id, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "AdmCmd: %s a fost bagat in inchisoare de %s pentru %d minute, motiv: %s", GetName(id), GetName(playerid),minutes,reason);
    MesajLung2(COLOR_LIGHTRED, string);
    return true;
}
YCMD:unjail(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new id,string[128];
    if(sscanf(params, "u", id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/unjail <playerid/name>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(PlayerInfo[id][pJailTime] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu este in jail!");
    ResetWeapons(id);
    ResetWeapons(id);
    PlayerInfo[id][pJailed] = 0;
    PlayerInfo[id][pJailTime] = 0;
    PlayerInfo[id][pWantedLevel] = 0;
    SetPlayerInterior(id, 0);
    JailPrice[id] = 0;
    Update(id,pJailedx);
    Update(id,pJailTimex);
    UpdateVar(id, "AJail", 0);
    PlayerInfo[id][pAJail] = 0;                
    Update(id,pWantedLevelx);
    SetPlayerPosEx(false, id, 1553.1921,-1675.7089,16.1953);
    format(string, sizeof(string), "Admin %s l-a scos pe %s din inchisoare.",GetName(playerid),GetName(id));
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,3);
    if(PlayerInfo[id][pChar] > 0 && PlayerInfo[id][pMember] != 0) {
        if(OnDuty[id] == 0) {}
        else SetPlayerSkinEx(id, PlayerInfo[id][pChar]);
    }
    else SetPlayerSkinEx(id, PlayerInfo[id][pModel]);
    ClearCrime(id);
    TextDrawHideForPlayer(id, Jailtime[id]);
    return true;
}


asta e pt burned

  • 0
Posted

CMD:jail(playerid, params[])

{

    new targetid;

    if (PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have permission to use this command."); // poti modifica nivelul de admin

    

    if (sscanf(params, "u[6]", targetid))

    {

        new jailtime = 300;

        

        if (IsPlayerConnected(targetid))

        {

            PlayerInfo[targetid][pJailed] = gettime() + jailtime;

            SetPlayerPos(targetid, 1234.567, 8901.234, 50.0);

            SCM(targetid, COLOR_RED, "You have been jailed for %d seconds.", jailtime);

            SendClientMessage(playerid, COLOR_LIGHTGREEN, "Player has been jailed.");

        }

        else

        {

            SendClientMessage(playerid, COLOR_LIGHTRED, "The specified player is not connected.");

        }

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, "Usage: /jail <id>");

    }

    return 1;

}

 

CMD:unjail(playerid, params[])

{

    new targetid;

    if (PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have permission to use this command.");

    

    if (sscanf(params, "u[6]", targetid))

    {

        if (IsPlayerConnected(targetid))

        {

            PlayerInfo[targetid][pJailed] = 0;

            SetPlayerPos(targetid, 1234.567, 8901.234, 50.0);

            SCM(targetid, COLOR_GREEN, "You have been unjailed.");

            SendClientMessage(playerid, COLOR_LIGHTGREEN, "Player has been unjailed.");

        }

        else

        {

            SendClientMessage(playerid, COLOR_LIGHTRED, "The specified player is not connected.");

        }

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, "Usage: /unjail <id>");

    }

    return 1;

}

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.