#1

Hello. We have created a system to log and send message only to one player. How can I send a message to all admins are included with the level between 5 and 6.


PHP код:
#define LogMessage(%0,%1,%2,%3) format(string, sizeof(string),%2,%3) && SendClientMessage(%0, %1, string)
for(new 0MAX_PLAYERS++) { if(PlayerInfo[i][pLanguage] == && PlayerInfo[i][pAdmin] >= 5) return LogMessage(iCOLOR_LOG"AdmCmd: %s a acceptat report-ul lui %s."sendernamegiveplayer); else
if(
PlayerInfo[i][pLanguage] == && PlayerInfo[i][pAdmin] >= 5) return LogMessage(iCOLOR_LOG"AdmCmd: %s accepted report of %s."sendernamegiveplayer); } 
Reply
#2

Next time try to search

btw. edited for your admin level
Код:
stock SendMessageToAdmins(text[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] >= 5)
        {
            SendClientMessage(i, 0xFFFFFFFF, text);
        }
    }
}
Reply
#3

PHP код:
warning 202number of arguments does not match definition

LogMessage
("AdmCmd: %s a acceptat report-ul lui %s."sendernamegiveplayer); 
Reply
#4

Quote:
Originally Posted by Riso135
Посмотреть сообщение
Next time try to search

btw. edited for your admin level
Код:
stock SendMessageToAdmins(text[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] >= 5)
        {
            SendClientMessage(i, 0xFFFFFFFF, text);
        }
    }
}
to use the stoke you use this in your command

PHP код:
new string[250];
format(stringsizeof(string), "AdmCmd: %s a acceptat report-ul lui %s."sendernamegiveplayer);
SendMessageToAdmins(string); 
Reply
#5

I tried this out! So it is, give message even if only one player I have admin> = 5 if I am alone in my sv just give me.

// Was correct as I did, the problem may be the loop?
Reply
#6

help!
Reply
#7

pawn Код:
#define LogMessage(%0,%1,%2,%3) format(string, sizeof(string),%2,%3) \ SendClientMessage(%0, %1, string)

for(new i = 0, string[128]; i < MAX_PLAYERS; ++i)
{
    if(PlayerInfo[i][pLanguage] == 1 && (5 <= PlayerInfo[i][pAdmin] <= 6)) return LogMessage(i, COLOR_LOG, "AdmCmd: %s a acceptat report-ul lui %s.", sendername, giveplayer);
    else if(PlayerInfo[i][pLanguage] == 2 && (5 <= PlayerInfo[i][pAdmin] <= 6)) return LogMessage(i, COLOR_LOG, "AdmCmd: %s accepted report of %s.", sendername, giveplayer);
}
Reply
#8

PHP код:
#define LogMessage(%0,%1,%2,%3) format(string, sizeof(string),%2,%3) && SendClientMessage(%0, %1, string)
            
for(new 0MAX_PLAYERS++) { if(PlayerInfo[i][pLanguage] == 1) return LogMessage(iCOLOR_LOG"AdmCmd: %s a folosit comanda /gotomark."sendername); else
            if(
PlayerInfo[i][pLanguage] == 2) return LogMessage(iCOLOR_LOG"AdmCmd: %s used command /gotomark."sendername); } 
Even so doing, show message just a player.
If I did as you said the first error #define
error 001: expected token: ";", but found "\"
Reply
#9

pawn Код:
#define LogMessage(%0,%1,%2,%3) format(string, sizeof(string),%2,%3); SendClientMessage(%0, %1, string)

for(new i = 0, string[128]; i < MAX_PLAYERS; ++i)
{
    if(PlayerInfo[i][pLanguage] == 1 && (5 <= PlayerInfo[i][pAdmin] <= 6)) return LogMessage(i, COLOR_LOG, "AdmCmd: %s a acceptat report-ul lui %s.", sendername, giveplayer);
    else if(PlayerInfo[i][pLanguage] == 2 && (5 <= PlayerInfo[i][pAdmin] <= 6)) return LogMessage(i, COLOR_LOG, "AdmCmd: %s accepted report of %s.", sendername, giveplayer);
}
And if there's just you, the message'll be sent just to one player (in this case: you)...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)