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
 1800

SHOW TALKING PLAYERS CODE [PS3]

by modzlife2000 - 03-10-2018 - 06:19 PM
#1
Code:
void drawInfoText(char * text, int font, float x, float y, float scalex, float scaley, int r, int b, int g, int a, bool center, int dec = 0, bool outline = false) {
    if (strcmp(GET_THIS_SCRIPT_NAME(), "ingamehud") == 0) {
        UI::SET_TEXT_FONT(font);
        UI::SET_TEXT_SCALE(scalex, scaley);
        UI::SET_TEXT_COLOUR(r, g, b, a);
        if (dec == 0) {
            UI::SET_TEXT_WRAP(0.0f, 1.0f);
        }else{
            UI::SET_TEXT_WRAP(0.0f, .665);
            SET_TEXT_RIGHT_JUSTIFY(true);
        }
        UI::SET_TEXT_CENTRE(center);
        UI::SET_TEXT_COLOUR(r, g, b, a);
        if (outline)UI::SET_TEXT_OUTLINE();
        UI::_SET_TEXT_ENTRY("STRING");
        _ADD_TEXT_COMPONENT_STRING(text);;
        UI::_DRAW_TEXT(x, y);
    }
}


bool bool_lobby[50];


//loop

    if (bool_lobby[1]) {
        float xc;
        if (bool_lobby[42]) {
            xc = .5;
        }else{
            xc = .04;
        }
        float p = .075;
        for (int i = 0; i < 16; i++) {
            if (NETWORK_PLAYER_HAS_HEADSET(i) && NETWORK_IS_PLAYER_TALKING(i)) {
                char Buffer[100];
                sprintf(Buffer, "~y~%s", GET_PLAYER_NAME(i));
                drawInfoText(Buffer, 4, xc, (p += .03), .6, .50, 255, 255, 255, 255, 0, 0, 1);
            }
            else if (NETWORK_PLAYER_HAS_HEADSET(i) && !NETWORK_IS_PLAYER_TALKING(i)) {
                char Buffer[100];
                sprintf(Buffer, "~w~%s", GET_PLAYER_NAME(i));
                drawInfoText(Buffer, 4, xc, (p += .03), .6, .50, 255, 255, 255, 255, 0, 0, 1);
            }
        }
    }
    
    
    addBoolOption("Lip Flappers", bool_lobby[1]);
ZZzzZ ZZzzZ Cat-kiss Tear Peace
Reply
#2
(03-10-2018 - 06:19 PM)modzlife2000 Wrote:
Code:
void drawInfoText(char * text, int font, float x, float y, float scalex, float scaley, int r, int b, int g, int a, bool center, int dec = 0, bool outline = false) {
if (strcmp(GET_THIS_SCRIPT_NAME(), "ingamehud") == 0) {
UI::SET_TEXT_FONT(font);
UI::SET_TEXT_SCALE(scalex, scaley);
UI::SET_TEXT_COLOUR(r, g, b, a);
if (dec == 0) {
UI::SET_TEXT_WRAP(0.0f, 1.0f);
}else{
UI::SET_TEXT_WRAP(0.0f, .665);
SET_TEXT_RIGHT_JUSTIFY(true);
}
UI::SET_TEXT_CENTRE(center);
UI::SET_TEXT_COLOUR(r, g, b, a);
if (outline)UI::SET_TEXT_OUTLINE();
UI::_SET_TEXT_ENTRY("STRING");
_ADD_TEXT_COMPONENT_STRING(text);;
UI::_DRAW_TEXT(x, y);
}
}


bool bool_lobby[50];


//loop

if (bool_lobby[1]) {
float xc;
if (bool_lobby[42]) {
xc = .5;
}else{
xc = .04;
}
float p = .075;
for (int i = 0; i < 16; i++) {
if (NETWORK_PLAYER_HAS_HEADSET(i) && NETWORK_IS_PLAYER_TALKING(i)) {
char Buffer[100];
sprintf(Buffer, "~y~%s", GET_PLAYER_NAME(i));
drawInfoText(Buffer, 4, xc, (p += .03), .6, .50, 255, 255, 255, 255, 0, 0, 1);
}
else if (NETWORK_PLAYER_HAS_HEADSET(i) && !NETWORK_IS_PLAYER_TALKING(i)) {
char Buffer[100];
sprintf(Buffer, "~w~%s", GET_PLAYER_NAME(i));
drawInfoText(Buffer, 4, xc, (p += .03), .6, .50, 255, 255, 255, 255, 0, 0, 1);
}
}
}


addBoolOption("Lip Flappers", bool_lobby[1]);
ZZzzZ ZZzzZ Cat-kiss Tear Peace
thx!
Reply

Users browsing: 1 Guest(s)