[HELP]Server message/MOLE
#1

Hi, I want to make server message (it's something like MOLE if you play in Roleplay server).

So, I want to make message that can I send to all player



What I need to put in the underlined space?
Thanks for helping
Reply
#2

pawn Код:
CMD:say(playerid, params[])
{
    if(PlayerStat[playerid][AdminLevel] >= 4) //If the players admin level is 4
    {
        new str[256]; //Defining the string that'll act as your message
        if(sscanf(params, "s", str)) return SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /Say [Global Text]");
        format(str, 256, "Server: %s",  params);
        SendClientMessageToAll(-1, str);
    }
    else SendClientMessage(playerid, "You're not a high enough.. blah blah");
    return 1;
}
Haven't tested it but it should work..
Reply
#3

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
pawn Код:
CMD:say(playerid, params[])
{
    if(PlayerStat[playerid][AdminLevel] >= 4) //If the players admin level is 4
    {
        new str[256]; //Defining the string that'll act as your message
        if(sscanf(params, "s", str)) return SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /Say [Global Text]");
        format(str, 256, "Server: %s",  params);
        SendClientMessageToAll(-1, str);
    }
    else SendClientMessage(playerid, "You're not a high enough.. blah blah");
    return 1;
}
Haven't tested it but it should work..
Your SendClientMessage is wrong..

replace with:
SendClientMessage(playerid, COLOR_LIGHTRED, "You're not a high enough.. blah blah");
Reply
#4

Quote:
Originally Posted by Mriss
Посмотреть сообщение
Your SendClientMessage is wrong..

replace with:
SendClientMessage(playerid, COLOR_LIGHTRED, "You're not a high enough.. blah blah");
Yeah my bad, was editing it from a macro i was using and forgot to include the color
Reply
#5

just add the second blank with ''params'' like Flake have said.

and remove the first blank.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)