0 registered members (),
18,767
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
A8. 03 SendVar
#334449
07/23/10 12:31
07/23/10 12:31
|
Joined: Nov 2009
Posts: 37
XuserTM
OP
Newbie
|
OP
Newbie
Joined: Nov 2009
Posts: 37
|
No AneT This is 3DGS Standart network. Hi, My multiplayer project Client and Server In separate files.Bud I cant send string. Pls Help me. This is client code
/*
UzakDiyarlar oyununun 3D MMORPG
haline çevrilmesidir.Tüm kullanılan Plugin,Kütüphane ve diğer yazılımların lisanları alınmıştır.
ProjeYönetimi
ByFabs Ve ByXuserTM ye Aitdir.Tüm Hakları Saklıdır.
CLİENT!!!
*/
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
#include <mtlView.c>
STRING* ip = "127.0.0.1";
player_name = "game";
///////////////////////////////
#define PRAGMA_PATH "Data";
#define PRAGMA_PATH "Data\\Ses";
#define PRAGMA_PATH "Data\\MDL";
#define PRAGMA_PATH "Data\\2D";
#define PRAGMA_PATH "Data\\Script";
#define PRAGMA_PATH "Data\\Maps";
#define PRAGMA_PATH "Data\\CSKins";
#define PRAGMA_PATH "Data\\AneT";
//Oyunumuz İçin Olan Temel motorları yükliyelim ...
#include "grs.c" // giriş ayarları
BMAP* fare = "Data\2D\arrow.pcx";
FONT* arial_font = "Arial#20b";
STRING* loginname = "asdasdasdasdasd";
STRING* datasend = "asdasdasdasdasd";
#include "Data\Script\client.c";
function main()
{
session_connect("testserver","127.0.0.1");
video_window(NULL,NULL,1,"UzakDiyarlar3D");
wait(1);
mouse_map = fare;
mouse_mode = 3;
wait(1);
dplay_localfunction = 2;
on_client = on_client_event;
while(1)
{
if (!connection)
{
error("Sunucu ile olan bağlantı kesildi.");
session_connect("testserver","127.0.0.1");
}
else
{
var abc=110;
send_var_to(abc,0);
}
wait(1);
}
}
/*
UzakDiyarlar oyununun 3D MMORPG
haline çevrilmesidir.Tüm kullanılan Plugin,Kütüphane ve diğer yazılımların lisanları alınmıştır.
ProjeYönetimi
ByFabs Ve ByXuserTM ye Aitdir.Tüm Hakları Saklıdır.
SERVER !!!
*/
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
#include <mtlView.c>
///////////////////////////////
#define PRAGMA_PATH "Data";
#define PRAGMA_PATH "Data\\Ses";
#define PRAGMA_PATH "Data\\MDL";
#define PRAGMA_PATH "Data\\2D";
#define PRAGMA_PATH "Data\\Script";
#define PRAGMA_PATH "Data\\Maps";
#define PRAGMA_PATH "Data\\CSKins";
var abc = 403;
FONT* arial_font = "Arial#20b";
//Oyunumuz İçin Olan Temel motorları yükliyelim ...
#include "ackmysql.h" // mysql kütüphanesi ...
PANEL* aircraft_pan =
{
digits(40,30,4,arial_font,1,abc);
flags = SHOW;
}
#include "Data\Script\server.c";
function main()
{
ackmysql_init();
session_open("testserver"); // server oluşturuldu.
dplay_localfunction = 2;
wait(1);
if(ackmysql_connect("localhost", "root", "") == ACKMYSQL_FAILURE)
{
error("Mysql Serverına bağlanılamadı");
return;
}
//databeseyi seçelim
if(ackmysql_select_db("server") == ACKMYSQL_FAILURE)
{
error("Tablo seçim hatası oldu.");
return;
}
//Sunucuu kuruluyor
on_server = server_event; // server olayları...
}
Bud dont change abc in server. I send Client To Server
|
|
|
Re: A8. 03 SendVar
[Re: SchokoKeks]
#334458
07/23/10 13:40
07/23/10 13:40
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
Serious User
|
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
GSTNet sends var names and values
Andreas GSTools - Home of GSTScript 0.9.8: lua scripting for A6/7/8 GSTNet 0.7.9.20: network plugin for A6/7/8 GSTsqlite 1.3.7: sql database plugin for A6/7/8 3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
|
|
|
Re: A8. 03 SendVar
[Re: nfs42]
#334477
07/23/10 15:44
07/23/10 15:44
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
With Anet this is possible, but only when you set "anet_use_handles(0);" before connection. It sends the full variable names then. This might also be possible with the completely free GSTNET plugin, but I'm not sure about this. But this creates a lot of unnecessary traffic, and shouldn't be used if not absolutely needed. If you use it, try to use short variable names for saving traffic.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|