Server chat in Console?
#1

How to make the server chat in the "samp-server.exe console" ?
Reply
#2

4char
Reply
#3

in ur gamemode ensure that onplayertext return value= true/ 1

This is what i mean.........
pawn Код:
public OnPlayerText(playerid, text[])
{

   return 1;
}
//or
public OnPlayerText(playerid, text[])
{

   return true;
}
Reply
#4

-Wrong place-
Reply
#5

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
in ur gamemode ensure that onplayertext return value= true/ 1

This is what i mean.........
pawn Код:
public OnPlayerText(playerid, text[])
{

   return 1;
}
//or
public OnPlayerText(playerid, text[])
{

   return true;
}
Not working
Reply
#6

im not really sure what you mean a console command or to show player's chat in game but

as i understand you want to monitor what player's are talking in game so try this

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    printf("[CHAT]: %s[%d]: %s",name,playerid,text[0]);
    return 1;
}
Reply
#7

You're either returning 0 in OnPlayerText (though IIRC this still shows the text in the console..) or you have the 'chatlog' server var (or a similar name) set to off.
Reply
#8

Quote:
Originally Posted by pds2012
Посмотреть сообщение
im not really sure what you mean a console command or to show player's chat in game but

as i understand you want to monitor what player's are talking in game so try this

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    printf("[CHAT]: %s[%d]: %s",name,playerid,text[0]);
    return 1;
}
Perfect thank you dude :>
Reply
#9

https://sampwiki.blast.hk/wiki/Server.cfg

Check where it says "chatlogging", it's probably disabled for you.

@MP2: Yes, when you return 0 in OnPlayerText, it still shows the messages in the server console.

@pds2012: While that IS a solution, the SA:MP server does it automatically. It's a matter of the wrong variable being set in the server.cfg file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)