view cmds? pms?
#1

hey, iv tried adding to my script the view or see cmds and pms thing like ladmin and other admin scripts. is there a way i could add this to a fs or my game mode? and how
Reply
#2

I dont understand. Explain what your trying to do in more detail.
Reply
#3

well u know how in ladmin fs for admin u got the command to see pm's that are sent out and the cmds the players use?

i would like to add it to my game mode , incase im not using ladmin
so im asking if anyone knows how to do the code so i can see pms and cmds that people do
Reply
#4

Are you talking about a system that logs commands and stuff to a file? I have never seen ladmin so I dont know the system you are talking about.
Reply
#5

not really, i already have that . the thing is i whant to see them while it happens. example: a user floods /countdown or something . i whant to see whos typing what commands at the exat time. and i also whant to monitor pms to see if people are passing down ips of other servers troug pm.

if u could help me it would be awesome. or if u dont know this do u know how to block numbers on pms? like if i say 454.54.45:7777 it will come out like ***.**.**:**** so they cant pass down ips?

idk something that could help me would be great.

btw sorry for my bad english
Reply
#6

I think you will find what you need. Look in my signature below my post and click on the Lords Logging System link.

It will write things to a file such as this
Код:
Kinetic ~ /me does this.
It also can do this.
Код:
Register: Kinetic ~ 192.168.0.1
Login: Kinetic ~ 192.168.0.1
Reply
#7

but how would i make it to appear on my screen when im on game. like

IsPlayerAdmin( etc... )

sendadminmessage( etc.. ) pm from someone to someone.. : etc.

sendadminmessage( player typed cmd:
Reply
#8

Ah, ok, I understand. Well first thing you have to do is make the SendAdminMessage function

pawn Код:
forward SendAdminMessage(color, string[]);
public SendAdminMessage(color, string[])
{
  for(new i=0; i<=GetMaxPlayers(); i++)
  {
    if(IsPlayerAdmin(i))
    {
      SendClientMessage(i, color, string);
    }
  }
  return 1;
}
then in the commands you must put the SendAdminMessage functions.
pawn Код:
if(strcmp("/command", cmdtext, true) == 0)
  {
    new str[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s(ID:%d) typed the /command command", name, playerid);
    SendAdminMessage(0xffffffff, str);
    return 1;
  }


Reply
#9

thanks dude

but. does this show me the commands people are typing? and pms?
Reply
#10

Quote:
Originally Posted by Kinetic
Ah, ok, I understand. Well first thing you have to do is make the SendAdminMessage function

pawn Код:
forward SendAdminMessage(color, string[]);
public SendAdminMessage(color, string[])
{
  for(new i=0; i<=GetMaxPlayers(); i++)
  {
    if(IsPlayerAdmin(i))
    {
      SendClientMessage(i, color, string);
    }
  }
  return 1;
}
then in the commands you must put the SendAdminMessage functions.
pawn Код:
if(strcmp("/command", cmdtext, true) == 0)
  {
    new str[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s(ID:%d) typed the /command command", name, playerid);
    SendAdminMessage(0xffffffff, str);
    return 1;
  }


What is the point of that seriously..

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new pName[MAX_PLAYER_NAME],string[256];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    for(new i=0; i<=GetMaxPlayers(); i++)
    {
      if(IsPlayerAdmin(i))
      {
        format(string,sizeof(string),"%s(id:%d) typed the command %s",pName,playerid,cmdtext);
        SendClientMessage(i,0xffffffff,string);
      }
    }
    //Your commands here...
    return 0;
}
The PM one...

pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
  new pNameRec[MAX_PLAYER_NAME],pNameSend[MAX_PLAYER_NAME],string[256];
    GetPlayerName(playerid,pNameRec,MAX_PLAYER_NAME);
    GetPlayerName(playerid,pNameSend,MAX_PLAYER_NAME);
    for(new i=0; i<=GetMaxPlayers(); i++)
    {
      if(IsPlayerAdmin(i))
    {
        format(string,sizeof(string),"%s(id:%d) sent the message "%s" to %s(id:%d)",pNameSend,playerid,text,pNameRec,recieverid);
            SendClientMessage(i,0xffffffff,string);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)