ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2564

Black List

by XBLxPhantom - 10-08-2018 - 06:35 PM
#1
Any ideas on how i could go about a black list menu?  where there are empty slots, and clicking on one opens player list so you can select a player to place in said black list?..
Reply
#2
did you find this? im interested
Reply
#3
(10-09-2018 - 10:20 AM)figgetWigget Wrote: did you find this? im interested

No, focus has been on something else but if i find anything will post in this thread.
Reply
#4
Just finished this up last night. nothing crazy.  haven't tested myself but a friend has after i implemented in my menu. so far so good. let me know if anyone has a better way. #edit tested myself, saves name fine. but when clicking name to kick it doesn't. will fix.
Code:
/////////////////////////////////
#pragma region BLACK_LIST_CHOOSING
    case BLACK_LIST_CHOOSING:
        SubTitle("BLACK LIST", 1);
        for (int i = 0; i < 16; i++)
        {
            char* pName = PLAYER::GET_PLAYER_NAME(i);
            if (!NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
            {
                AddOption(PLAYER::GET_PLAYER_NAME(i), "~r~No Client Connected");
            }
            else
            {
                AddOption(PLAYER::GET_PLAYER_NAME(i), "Select a Client To Save in The Black List");
            }
            if (i == currentOption - 1)
            {

            }
        }
        if (optionPress && PLAYER::IS_PLAYER_PLAYING(currentOption - 1))
        {
            char* Name = PLAYER::GET_PLAYER_NAME(selectedPlayer);
            selectedPlayer = currentOption - 1;
            SavePlayerNameForBlackList(selectedPlayer);
            ShowMessageWithName(Name, "Saved In BlackList.");
        }
        for (int i = 16; i < 18; i++)
        {
            char* pName = PLAYER::GET_PLAYER_NAME(i);
            char* playerName;
            char* info;
            if (GAMEPLAY::ARE_STRINGS_EQUAL(pName, "**Invalid**"))
            {
                playerName = AddStrings("~r~No Client", " ~y~[SCTV]");
                info = "There is No Client Connected in Ths Slot.";
            }
            else
            {
                playerName = AddStrings(pName, " ~y~[SCTV]");
                info = "Select a Client To Save in The Black List";
            }
            AddOption(playerName, info);
            if (currentOption == optionCount)
            {
                if (optionPress && PLAYER::IS_PLAYER_PLAYING(i))
                {
                    char* Name = PLAYER::GET_PLAYER_NAME(selectedPlayer);
                    SavePlayerNameForBlackList(selectedPlayer);
                    ShowMessageWithName(Name, "Saved In BlackList.");
                }
                selectedPlayer = ((i)-1);
            }
        }

        break;
#pragma endregion
#pragma region BLACK_LIST
    case BLACK_LIST:
        SubTitle("BLACK LIST", 1);
        AddBlackListName(SavedName, "Click on Client to Kick, if that Doesn't work We'll Crash them. ~b~[MOST MODDERS CAN STOP THIS]");
        break;
#pragma endregion
////////////////////////////////////
#pragma region TESTING AREA
void SavePlayerNameForBlackList(Player player)
{
    char* Client = PLAYER::GET_PLAYER_NAME(player);
    SavedName = Client;
}
void AddBlackListName(char *option, char *info = NULL)
{
    SavedName = option;
    AddOption(option);
    if (currentOption == optionCount)
    {
        xInstruction = true;
        if (optionPress && (SavedName = "Empty"))
        {
            ChangeSubmenu(BLACK_LIST_CHOOSING);
        }
        else if (optionPress && (SavedName))
        {
            NETWORK::NETWORK_SESSION_KICK_PLAYER(selectedPlayer);
            int Args[3];
            Args[0] = 2;
            Args[1] = selectedPlayer;
            Args[2] = 0x35;
            TriggerScriptEvent(Args, 3, selectedPlayer);
            if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
            {
                JetsCrash();
                RainTrailers();
            }
            else if (!NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
            {

            }
        }
    }
}
#pragma endregion
/////////////////////////////////////

char* SavedName = "Empty"; //BlackList testing
Reply
#5
Nice players list from united x
Reply
#6
(12-20-2018 - 04:10 PM)PhucedMODZ Wrote: Nice players list from united x

You are gonna have to get over it, it is a very old verion on UX, leachers gonna leach.  Nice
Reply
#7
(12-19-2018 - 06:55 PM)XBLxPhantom Wrote: Just finished this up last night. nothing crazy.  haven't tested myself but a friend has after i implemented in my menu. so far so good. let me know if anyone has a better way. #edit tested myself, saves name fine. but when clicking name to kick it doesn't.  will fix.
Code:
/////////////////////////////////
#pragma region BLACK_LIST_CHOOSING
    case BLACK_LIST_CHOOSING:
        SubTitle("BLACK LIST", 1);
        for (int i = 0; i < 16; i++)
        {
            char* pName = PLAYER::GET_PLAYER_NAME(i);
            if (!NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
            {
                AddOption(PLAYER::GET_PLAYER_NAME(i), "~r~No Client Connected");
            }
            else
            {
                AddOption(PLAYER::GET_PLAYER_NAME(i), "Select a Client To Save in The Black List");
            }
            if (i == currentOption - 1)
            {

            }
        }
        if (optionPress && PLAYER::IS_PLAYER_PLAYING(currentOption - 1))
        {
            char* Name = PLAYER::GET_PLAYER_NAME(selectedPlayer);
            selectedPlayer = currentOption - 1;
            SavePlayerNameForBlackList(selectedPlayer);
            ShowMessageWithName(Name, "Saved In BlackList.");
        }
        for (int i = 16; i < 18; i++)
        {
            char* pName = PLAYER::GET_PLAYER_NAME(i);
            char* playerName;
            char* info;
            if (GAMEPLAY::ARE_STRINGS_EQUAL(pName, "**Invalid**"))
            {
                playerName = AddStrings("~r~No Client", " ~y~[SCTV]");
                info = "There is No Client Connected in Ths Slot.";
            }
            else
            {
                playerName = AddStrings(pName, " ~y~[SCTV]");
                info = "Select a Client To Save in The Black List";
            }
            AddOption(playerName, info);
            if (currentOption == optionCount)
            {
                if (optionPress && PLAYER::IS_PLAYER_PLAYING(i))
                {
                    char* Name = PLAYER::GET_PLAYER_NAME(selectedPlayer);
                    SavePlayerNameForBlackList(selectedPlayer);
                    ShowMessageWithName(Name, "Saved In BlackList.");
                }
                selectedPlayer = ((i)-1);
            }
        }

        break;
#pragma endregion
#pragma region BLACK_LIST
    case BLACK_LIST:
        SubTitle("BLACK LIST", 1);
        AddBlackListName(SavedName, "Click on Client to Kick, if that Doesn't work We'll Crash them. ~b~[MOST MODDERS CAN STOP THIS]");
        break;
#pragma endregion
////////////////////////////////////
#pragma region TESTING AREA
void SavePlayerNameForBlackList(Player player)
{
    char* Client = PLAYER::GET_PLAYER_NAME(player);
    SavedName = Client;
}
void AddBlackListName(char *option, char *info = NULL)
{
    SavedName = option;
    AddOption(option);
    if (currentOption == optionCount)
    {
        xInstruction = true;
        if (optionPress && (SavedName = "Empty"))
        {
            ChangeSubmenu(BLACK_LIST_CHOOSING);
        }
        else if (optionPress && (SavedName))
        {
            NETWORK::NETWORK_SESSION_KICK_PLAYER(selectedPlayer);
            int Args[3];
            Args[0] = 2;
            Args[1] = selectedPlayer;
            Args[2] = 0x35;
            TriggerScriptEvent(Args, 3, selectedPlayer);
            if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
            {
                JetsCrash();
                RainTrailers();
            }
            else if (!NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
            {

            }
        }
    }
}
#pragma endregion
/////////////////////////////////////

char* SavedName = "Empty"; //BlackList testing

lit ma dude
#CelestialFTW

Reply
#8
(12-20-2018 - 04:10 PM)PhucedMODZ Wrote: Nice players list from united x

I wouldn't say nice, i found it kinda garbage just haven't gotten to changing it.

(12-20-2018 - 05:26 PM)Niqqie Wrote:
(12-20-2018 - 04:10 PM)PhucedMODZ Wrote: Nice players list from united x

You are gonna have to get over it, it is a very old verion on UX, leachers gonna leach.  Nice

"leechers gonna leech" yet I'm posting something I'm making for others...hmmm how am i leaching?  atleast i don't sell menus with 90% of someone elses code :/ my shit's free to anyone chill enough to test it and not leak before i release the finished xex. and when it's finished it'll still be free lmao.
Reply
#9
(12-20-2018 - 04:10 PM)PhucedMODZ Wrote: Nice players list from united x

That layout is the same as every other menu out there, completely diff from the newest United x bro. just saying.
2021 Best Be Better Then 2020
Reply
#10
Yeah I know that lmao, when I get round to updating UX I might make some features like this, but make it so it stores the players in the db
Reply

Users browsing: 1 Guest(s)