can somebody pls help me, i dont now what the **** am i doing wrong.
server:
#include <DarkGDK.h>
#include "multisync.h"
void GetPlayerInfo(void);
int Counter;
struct tPlayer
{
int x;
int y;
int z;
int ID;
} tPlayer;
tPlayer Player[16];
void DarkGDK ( void )
{
dbSyncOn();
if (NetHost(16))
{
while (LoopGDK())
{
if (NetPlayerJoined() != 0)
{
Counter++;
}
if (Counter > 0)
{
while(NetGetMessage() == true)
{
GetPlayerInfo();
}
NetSendAll();
}
dbSync();
}
}
}
void GetPlayerInfo(void)
{
int iLoop;
for ( iLoop = 0 ; iLoop < NetGetPlayerAmount() ; iLoop++ )
{
int x = Player[iLoop].x;
int y = Player[iLoop].y;
int z = Player[iLoop].z;
}
}
client:
#include <DarkGDK.h>
#include "multisync.h"
void GetPlayerInfo(void);
struct tPlayer
{
int x;
int y;
int z;
} tPlayer;
tPlayer Player[16];
void DarkGDK ( void )
{
dbSyncOn();
if (NetConnect("192.168.123.124"))
{
while (LoopGDK())
{
while(NetGetMessage() == true)
{
int x = NetGetInt();
int y = NetGetInt();
int z = NetGetInt();
}
dbMakeObjectCube(1, 1);
dbMakeObjectCube(2, 1);
dbMakeObjectCube(3, 1);
GetPlayerInfo();
////////////
NetSendAll();
dbSync();
}
}
}
void GetPlayerInfo(void)
{
int iLoop;
for ( iLoop = 0 ; iLoop < NetGetPlayerAmount() ; iLoop++ )
{
Player[iLoop].x = NetGetInt();
Player[iLoop].y = NetGetInt();
Player[iLoop].z = NetGetInt();
dbPositionObject(1, Player[1].x, Player[1].y, Player[1].z);
dbPositionObject(2, Player[2].x, Player[2].y, Player[2].z);
}
}
Game.Love