SA-MP Forums Archive
Command otherwise? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command otherwise? (/showthread.php?tid=445656)



~fixed~ - Blackazur - 22.06.2013

----


Re: Command otherwise? - Sulps - 22.06.2013

Something Like This
pawn Код:
#include <a_samp>
#define red 0xFF0000AA

public OnPlayerText(playerid, text[])
{
    if(text[0] == '//' && IsPlayerAdmin(playerd)) {
      new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]); SendMessageToRAdmins(red,string);
      return 0;
}

stock SendMessageToRAdmins(color,const msg[])
{
   for (new i=0; i<MAX_PLAYERS; i++)
   {
      if (IsPlayerConnected(i) && IsPlayerAdmin(i)) SendClientMessage(i,color,msg);
   }
}



AW: Command otherwise? - Blackazur - 22.06.2013

----