Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Quote Originally Posted by errieman View Post
    Thank you, that worked for a while but now I have the same problem but it doesn't even show up in the logs.
    The source file is just sitting there, Procon won't even try to compile it.

    edit: it is on another server
    You have to use an editor that saves to Unicode, either UTF-16 LE with BOM, or UTF-8 with BOM. If you save the file to ASCII, it won't compile. Notepad on Win7 will save to Unicode.
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

  2. #12
    Quote Originally Posted by PapaCharlie9 View Post
    You have to use an editor that saves to Unicode, either UTF-16 LE with BOM, or UTF-8 with BOM. If you save the file to ASCII, it won't compile. Notepad on Win7 will save to Unicode.
    It did work, but I had to restart the ProCon layer server to refresh the plugins, but that's a whole other story.

    Anyway thank you for your time and help.

  3. #13

    Lightbulb

    ALSO after an extensive talk with Phil_K and PapaCharlie I would like to add that in order to use a player list ensure that you populate and use your own.... DO NOT use FrostbitePlayerInfoList as it is deprecated.

    ALSO OnPlayerLeft and OnPlayerJoin is not always called (such as when a player is kicked). So DO NOT depend on them... if you must depend on one function always being called then depend instead on OnListPlayers which is called every 30 seconds according the devs.

    I therefore submit the following as an example as what one could use when beginning a plugin that uses the playerlist.

    Code:
    public void OnPluginLoaded(string strHostName, string strPort, string strPRoConVersion)
    {
    	this.m_strHostName = strHostName;
    	this.m_strPort = strPort;
    	this.m_strPRoConVersion = strPRoConVersion;
    	this.RegisterEvents(this.GetType().Name, "OnListPlayers", "OnPlayerLeft", "OnPlayerJoin" /* etc.... */ );
    }
    
    public void OnListPlayers(List<CPlayerInfo> players, CPlayerSubset subset)
    {
         	if (subset.Subset == CPlayerSubset.PlayerSubsetType.All)
    	{
    		this.PlayerList.Clear(); // fresh list
                   	foreach (CPlayerInfo p in players)
    		{
    			this.PlayerList.Add(p.SoldierName, p);
    		}
           	}
    }
    		
    public void OnPlayerLeft(CPlayerInfo p)
    {
    	if ( this.PlayerList.ContainsKey(p.SoldierName) )
    	{
    		this.PlayerList.Remove(p.SoldierName);
    	}
    }
    		
    public void OnPlayerJoin(string soldierName)
    {
    	if (!this.PlayerList.ContainsKey(soldierName))
    	{
    		this.PlayerList.Add(soldierName, new CPlayerInfo(soldierName, "", 0, 24));
    	}
    }
    Last edited by DanBalls; 21-12-2013 at 23:29.
    Game on...
    Balls
    www.cidclan.net




  4. #14
    Developer
    Join Date
    Apr 2010
    Location
    Münster(Westf.), Germany
    Posts
    3,134
    Quote Originally Posted by DanBalls View Post
    ALSO after an extensive talk with Phil_K and PapaCharlie I would like to add that in order to use a player list ensure that you populate and use your own.... DO NOT use FrostbitePlayerInfoList as it is deprecated.
    It is not deprecated. It fits another need then you expected.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •