ItsMods

Full Version: friends help take care
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
OnAddonFrame does not use ServerClient Wink

So don't use clientnums inside it Smile

use
CSHARP Code
  1. ServerSay("^6[^7NOTICE^6]^7 message here",true);

and
CSHARP Code
  1. iPrintLnBold(null, "^6[^7NOTICE^6]^7 message here");


to message all players
or just get all Clients.


Code:
foreach(ServerClient it in GetClients())
{
      TellClient(it.ClientNum, "derpherp", true);
}
(07-04-2012, 10:43)Ich1994 Wrote: [ -> ]or just get all Clients.


Code:
foreach(ServerClient it in GetClients())
{
      TellClient(it.ClientNum, "derpherp", true);
}

yes it is that just too tired to think right

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Addon;

namespace derp
{
    public class derp : CPlugin
    {
          int jerp = 0;
          public override void OnAddonFrame()
          {

                jerp++;
                if (jerp == timeyouwant*4) /*onserveraddon works every 250 ms that means 4 times every second*/
                {
                      foreach(ServerClient it in GetClients())
                     {
                            TellClient(it.ClientNum, "derpherp", true);
                     }
                      jerp = 0;
               }
          }    
    }
}
in the current addon version, i'd ignore the clients
Pages: 1 2