This? YES!!
#1

pawn Код:
//==============================================================================
//OnPlayerCommandText
//==============================================================================
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(AccInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid, red, "Sorry, but, you must be {00BBF6}Logged In{11FF00} to use Commands!");
    //--------------------------------------------------------------------------
    if(GetPVarInt(playerid, "Jailed") == 1 && AccInfo[playerid][Level] < 10)
    {
        SendClientMessage(playerid,red,"ERROR: You cannot use commands in Jail!");
        return 1;
    }
    //--------------------------------------------------------------------------
    if(GetPVarInt(playerid, "PlayerInDM") == 1 || GetPVarInt(playerid, "PlayerInRace") == 1 || GetPVarInt(playerid, "PlayerInGifts") == 1)
    {
        if(strcmp(cmdtext, "/leave",        true) == 0)         return 0;
        if(strcmp(cmdtext, "/exitrace",     true) == 0)         return 0;
        if(strcmp(cmdtext, "/stats",        true) == 0)         return 0;
        if(strcmp(cmdtext, "/acmds",        true) == 0)         return 0;
        if(strcmp(cmdtext, "/kick",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/ban",          true) == 0)         return 0;
        if(strcmp(cmdtext, "/selectgift",   true) == 0)         return 0;
        if(strcmp(cmdtext, "/rban",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/slap",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/warn",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/mute",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/jail",         true) == 0)         return 0;
        if(strcmp(cmdtext, "/explode",      true) == 0)         return 0;
        if(strcmp(cmdtext, "/report",       true) == 0)         return 0;
        if(strcmp(cmdtext, "/finish",       true) == 0)         return 0;
        else GameTextForPlayer(playerid, "~w~Use ~r~/Leave~w~ to leave!", 6000, 4);
        return 1;
    }
    //--------------------------------------------------------------------------
    if(AccInfo[playerid][BRBSts] == 1)
    {
        if(strcmp(cmdtext, "/back", true) == 0) return 0;
        else GameTextForPlayer(playerid, "~w~Use ~r~/Back~w~ to return!", 4000, 4);
        return 1;
    }
    new string[256];
    format(string, sizeof(string), "*** %s (%d) Command: %s", pName(playerid),playerid,cmdtext);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if( (AccInfo[i][Level] > AccInfo[playerid][Level]) && (AccInfo[i][Level] > 1) && (i != playerid))
            {
                SendClientMessage(i, grey, string);
            }
        }
    }
    return 0;
}
Well, my LuxAdmin was Bugged so i remove this code now its working fine so this code is for what? its IMPORTANT.
Reply
#2

That code stops commands from working if they are in certain situations like "InDM".
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)