![]() |
|
|||||||
| CoD Multiplayer Everything about multiplayer in IL-2 CoD |
![]() |
|
|
Thread Tools | Display Modes |
|
#21
|
|||
|
|||
|
Alright, I finally have a solution. This won't send a message to the server, but it will appear in the server logs as something like "server to [username]: ". It will appear every five minutes for everybody connected to the server. You can decrease the time interval by changing 9000 to a lower number.
As a reminder, this code goes in the OnTickGame() method and both sides have to have at least one aircraft. I hope this helps. Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
{
if (Time.tickCounter() % 9000 == 0)
{
int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
if (GamePlay.gpRemotePlayers().Length > 0)
{
GamePlay.gpLogServerBegin(GamePlay.gpRemotePlayers(), totalAircraft.ToString());
GamePlay.gpLogServerEnd();
}
}
}
Last edited by TheEnlightenedFlorist; 05-29-2011 at 03:05 AM. |
|
#22
|
|||
|
|||
|
Quote:
This error occurs when you try to call a method or access a class member that does not exist.
__________________
Gigabyte Z68 Intel 2500K (@4.3 ghz)212 CM Cooler 8GB Ram EVGA 660SC (super clocked) 2GB Vram CORSAIR CMPSU-750TX 750W 64 GB SSD SATA II HD WIN7 UL 64BIT |
|
#23
|
|||
|
|||
|
Quote:
My latest snippet of code should work though. |
|
#24
|
|||
|
|||
|
Thanks a lot again! I'll install it tomorrow when I am at my gaming PC.
|
|
#25
|
|||
|
|||
|
Mate, you're using the log to read the commands, or you've found a beter way?
|
|
#26
|
||||
|
||||
|
This is an awesome project; please make it open source so others can contribute.
|
|
#27
|
|||
|
|||
|
No. It uses an external application. If you find a way to read text from the chat log, do let me know.
|
|
#28
|
|||
|
|||
|
Quote:
Also, it turns out there's a much easier way to reference the dll than using reflection. Code:
//$reference IL2ServerMasterLibrary.dll using IL2ServerMasterLibrary; Code:
ServerMaster master = new ServerMaster("pass", 27340);
string[] command = master.popCommand();
Last edited by TheEnlightenedFlorist; 07-29-2011 at 06:32 AM. |
|
#29
|
||||
|
||||
|
Quote:
|
|
#30
|
|||
|
|||
|
Quote:
You might also use kegetys' way to have a dll loaded at the start of the game. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|