Console Messages in game!
#3

For example..

This function ..

PHP Code:
SendAdminMessage(color, const text[], {Float,_}:...)
{
    static
          
args,
        
str[192];

    if((
args numargs()) <= 2)
    {
        foreach(new 
Player)
        {
            if(
PlayerInfo[i][pLogged] && PlayerInfo[i][pAdmin] > 0)
            {
                
SendClientMessage(icolortext);
            }
        }

        
printf(text);
    }
    else
    {
        while(--
args >= 2)
        {
            
#emit LCTRL     5
            #emit LOAD.alt     args
            #emit SHL.C.alt 2
            #emit ADD.C     12
            #emit ADD
            #emit LOAD.I
            #emit PUSH.pri
        
}
        
#emit PUSH.S         text
        #emit PUSH.C         192
        #emit PUSH.C         str
        #emit LOAD.S.pri     8
        #emit ADD.C         4
        #emit PUSH.pri
        #emit SYSREQ.C         format
        #emit LCTRL         5
        #emit SCTRL         4

        
foreach(new Player)
        {
            if(
PlayerInfo[i][pLogged] && PlayerInfo[i][pAdmin] > 0)
            {
                
SendClientMessage(icolorstr);
            }
        }

        
printf(str);

        
#emit RETN
    
}
    return 
1;

Used like that for example..
PHP Code:
SendAdminMessage(COLOR_YELLOW"AdmWarning: %s[%i] failed the health hack check as they tabbed."GetPlayerRPName(i), i); 
So it double sends in game one time with a white color, another time with Red Color..

Also most importantly, The join thing and leave ..

Example..

Quote:

[16:09:29] [connection] incoming connection: XXXXXXXX id: 0
[16:09:30] [join] BLA_BLA has joined the server (XXXXXXXXXX)
[16:09:30] The request failed! The response code was: 6

It sends these messages to every single player in game..
Reply


Messages In This Thread
Console Messages in game! - by JasonRiggs - 31.01.2018, 20:23
Re: Console Messages in game! - by Nizarh - 31.01.2018, 20:34
Re: Console Messages in game! - by JasonRiggs - 31.01.2018, 20:42
Re: Console Messages in game! - by JasonRiggs - 31.01.2018, 20:51
Re: Console Messages in game! - by JasonRiggs - 31.01.2018, 21:22
Re: Console Messages in game! - by solstice_ - 31.01.2018, 21:24
Re: Console Messages in game! - by JasonRiggs - 31.01.2018, 22:45
Re: Console Messages in game! - by JasonRiggs - 01.02.2018, 10:54
Re: Console Messages in game! - by Mugala - 01.02.2018, 11:01
Re: Console Messages in game! - by JasonRiggs - 01.02.2018, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)