|
4 registered members (TipmyPip, Enayn, alx, 1 invisible),
5,028
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: chrisp1]
#347318
11/14/10 14:39
11/14/10 14:39
|
Joined: Nov 2010
Posts: 125 Germany
chrisp1
Member
|
Member
Joined: Nov 2010
Posts: 125
Germany
|
Also ich hätte da nochmal eine Frage: Der Client benötigt ja die Ip Adresse des Servers um ihm beizutreten. Gibt es eine variable oder funktion mit der der Server seine eigene IP sehen kann ?
English: I have another question. Is there a function or var that the server can see his own Ip?
Last edited by chrisp1; 11/14/10 15:30.
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: chrisp1]
#347391
11/14/10 22:15
11/14/10 22:15
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
OP
Serious User
|
OP
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
GSTNet_MyIP(sIP1,sIP2,sIP3,sIP4)
//----------------------------------------------------------------------------------------
// function: ip
// purpose: demo get ip
//------------------------------------------------------------------
function getip() {
diag("\nGETIP:");
if (GSTNet_ClientIP(1,sGSTNetTemp)){
diag(sGSTNetTemp);
}
beep;
GSTNet_MyIP(sGSTNetTemp1, sGSTNetTemp2, sGSTNetTemp3, sGSTNetTemp4);
diag("\nIP1:"); diag(sGSTNetTemp1);
diag("\nIP2:"); diag(sGSTNetTemp2);
diag("\nIP3:"); diag(sGSTNetTemp3);
diag("\nIP4:"); diag(sGSTNetTemp4);
}
on_i=getip;
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: [GSTNet] new posts on "Third Party Tools"
[Re: chrisp1]
#347594
11/16/10 18:27
11/16/10 18:27
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Schreib dir n PHP Skript und lass dir "$_SERVER['REMOTE_ADDR']" zurückgeben.
<?php
echo($_SERVER['REMOTE_ADDR']);
?>
Einfach ein HTTP GET request auf das PHP Skript ausführen und die Rückgabe nutzen. Fertig. Oder www.wieistmeineip.de
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: WretchedSid]
#348357
11/25/10 12:42
11/25/10 12:42
|
Joined: Aug 2004
Posts: 1,305 New York
PrenceOfDarkness
Serious User
|
Serious User
Joined: Aug 2004
Posts: 1,305
New York
|
is the 16 client limit hard coded in or is it advised?
Last edited by PrenceOfDarkness; 11/25/10 12:42.
"There is no problem that can't be solved with time and determination." -me prenceofdarkness for instant messages on AIM.
Looking for a model designer PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: PrenceOfDarkness]
#348375
11/25/10 18:26
11/25/10 18:26
|
Joined: Jun 2001
Posts: 1,004 Dossenbach
nfs42
OP
Serious User
|
OP
Serious User
Joined: Jun 2001
Posts: 1,004
Dossenbach
|
for now its limited to 64 clients and 1000 global concurrent entities
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: [GSTNet] new posts on "Third Party Tools"
[Re: nfs42]
#350504
12/16/10 16:07
12/16/10 16:07
|
Joined: Nov 2010
Posts: 125 Germany
chrisp1
Member
|
Member
Joined: Nov 2010
Posts: 125
Germany
|
So hier post ich auch nochmal meinen server und client code . Also könnte mir bitte jemand sagen was ich falsch gemacht habe ? Der Server funktioniert aber ich kann mit dem Client den Server nicht finden . Hier der ausschnitt :
function startserver()
{
serverstatus = 2;
GSTNet_StartServer(2030,1);
while(GSTNet_Connection() ==0)
{
wait(1);
}
reset(hostnumber,VISIBLE);
setString (strInstructions,"You logged in as server. Press s to spawn");
setString (strServerStatus ,"Server status : Connected");
while(joined == 0)
{
if(key_s)
{
joined = 1;
//GSTNet_SendString(0,"gm");
setString (strServerStatus ,"Server status : Connected transfering data.");
wait(-0.5);
setString (strServerStatus ,"Server status : Connected transfering data..");
wait(-0.5);
setString (strServerStatus ,"Server status : Connected transfering data...");
wait(-0.5);
setString (strServerStatus ,"Server status : Connected transfering data..");
wait(-0.5);
setString (strServerStatus ,"Server status : Connected transfering data.");
wait(-0.2);
//GSTNet_SendVar(0,_str("serverstatus"));
setString (strServerStatus ,"Server status : Connected and data transfered");
setString (strInstructions ,"Succesfully spawned");
joined = 1;
ent = GSTNet_ent_create(_str("submarine.mdl"),vector(1000,0,-100),_str("submarineonline"));
wait(1);
diag("\n prepare to start");
}
wait(1);
}
}
function startclient()
{
serverstatus = 1;
GSTNet_StartClient(serverip,2300,1); // _str("255.255.255.255")
wait(1);
setString (strClientStatus,"Client status : Searching for connection");
wait(-1);
if (GSTNet_Connection() ==0)
{
setString (strClientStatus,"Client status : No server found");
setString (strInstructions,"Please try again or search for another server");
inkey(serverip);
joined = 0;
while(joined == 0)
{
if(key_enter)
{
joined = 1;
startclient();
}
wait(1);
}
}
while((GSTNet_ClientId() == 0)||(GSTNet_Connection == 0))//wait for the connection to be established and the ID given by the server to proceed
{
wait(1);
}
setString(strInstructions, "You logged in as client");
setString(strClientStatus, "Client status : Connected");
gamenumber = str_stri(gm,"c");
wait(1);
if (gamenumber == 1) mode_capturethefish_client();
}
function host()
{
setString(strServerStatus,"Server status: Prepare to start ");
setString(strInstructions,"Choose your gamemode to start");
getip();
serverstatus = 10;
level_load("3dgs2.wmb");
wait(1);
set (host_panel,SHOW);
}
function join()
{
joined = 0;
setString(strClientStatus,"Client status: Prepare to start ");
setString(strInstructions,"Type in the ip number you want to join");
serverstatus = 10;
level_load("3dgs2.wmb");
wait(1);
set(join_panel,SHOW);
inkey(serverip);
while(joined == 0)
{
if(key_enter)
{
joined = 1;
startclient();
}
wait(1);
}
}
Last edited by chrisp1; 12/16/10 16:07.
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: chrisp1]
#357244
02/06/11 11:17
02/06/11 11:17
|
Joined: Nov 2010
Posts: 125 Germany
chrisp1
Member
|
Member
Joined: Nov 2010
Posts: 125
Germany
|
I have created a php file at www.littlesubmarine.bplaced.net/test.php But if I try GSTNet_HTTPGet("www.littlesubmarine.bplaced.net","/test.php",serveripserver); i only get : GSTERROR unable to resolve host! Any ideas why this happens?
Last edited by chrisp1; 02/06/11 11:18.
|
|
|
Re: [GSTNet] new posts on "Third Party Tools"
[Re: chrisp1]
#357247
02/06/11 11:21
02/06/11 11:21
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
add a http:// in fron so that the protocol is known to GSTNet. (Just a guess, but its a common error that it doesn't defaults to http)
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|