OnPlayerCommandPerformed
#1

Check if player is admin - if not format the string and send to admins.That should help...
Reply
#2

Hello i have script to see the commands that players typed, my problem is i can see the cmd i have typed aswell and i dont want that, anything i can do about that and thanks.

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
  new 
str[100], name[24];
  
GetPlayerName(playerid,name,sizeof(name));
  
format(str,sizeof(str),"(CMD)%s used: %s",name,cmdtext);
  for(new 
i=0i<MAX_PLAYERSi++)
  {
    if(
IsPlayerAdmin(i))
    {
      
SendClientMessage(i,Green2,str);
    }
  }
  print(
str);
  
//****************************************************************************
  
return 1;

Reply
#3

Just change the line
pawn Код:
if(IsPlayerAdmin(i))
To

pawn Код:
if(IsPlayerAdmin(i) && i != playerid)
Reply
#4

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Just change the line
pawn Код:
if(IsPlayerAdmin(i))
To

pawn Код:
if(IsPlayerAdmin(i) && i != playerid)
Thank you =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)