Message to all players when doing /ban
#4

Quote:
Originally Posted by matrix_smq
You have to use

Код:
ID = ReturnUser(cmdtext[6]);
And at the
Код:
format(str, 64, "%s has been banned from the server for: %s", pName,rest);
Take the ",rest" out.
Here is the code, i think it should work
Код:
else if(strcmp(cmdtext, "/ban", true, 5)==0)
{
  if(!IsPlayerAdmin(playerid)) return 0;
  if(!strlen(cmdtext[6]))
  {
    SendClientMessage(playerid, COLOR_ORED, "Usage: /ban [playerid] [reason]");
    return 1;
  }
  new ID = ReturnUser(cmdtext[6]);
  new pName[24], str[64];
  if(IsPlayerConnected(ID))
  {
    GetPlayerName(ID, pName, 24);
    format(str, 64, "%s has been banned from the server for: ", pName);
    SendClientMessageToAll(COLOR_ORED, str);
    print("Player banned");
    Ban(ID);
  }
  return 1;
}
Nope

Код:
C:\Users\Jani.Kannettava.000\Desktop\TEST\pawno\paapaaof.pwn(1139) : error 017: undefined symbol "ReturnUser"
C:\Users\Jani.Kannettava.000\Desktop\TEST\pawno\paapaaof.pwn(3890) : warning 203: symbol is never used: "GetId"
C:\Users\Jani.Kannettava.000\Desktop\TEST\pawno\paapaaof.pwn(3890) : warning 203: symbol is never used: "strvalfixed"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
- - by Jakku - 11.05.2009, 16:11
Re: Message to all players when doing /ban - by matrix_smq - 11.05.2009, 16:18
Re: Message to all players when doing /ban - by Jakku - 11.05.2009, 16:22
Re: Message to all players when doing /ban - by Jakku - 11.05.2009, 16:25
Re: Message to all players when doing /ban - by matrix_smq - 11.05.2009, 16:45
Re: Message to all players when doing /ban - by Jakku - 11.05.2009, 16:47

Forum Jump:


Users browsing this thread: 1 Guest(s)