Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, juanex), 1,247 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
client_id not work #407773
09/19/12 09:50
09/19/12 09:50
Joined: Jul 2011
Posts: 55
Berlin, Germany
S
Sammy32 Offline OP
Junior Member
Sammy32  Offline OP
Junior Member
S

Joined: Jul 2011
Posts: 55
Berlin, Germany
Hello @ all

i have a little bit problem.

my.client_id == dplay_id

not work,

result as server from client_id = 0.677 and dplay_id = 0
result as client client_id = 0.677 and dplay_id = 142011.078

version a8.40 com


I need a query to have different objects at the clients for my first person shooter (weapon and body).

thx for the help
and best regards


- 3d Gamestudio Commercial -
- ANET Pro -
<JAVA | PHP | HTML | Flash > DEVELOPER

Re: client_id not work [Re: Sammy32] #407774
09/19/12 10:11
09/19/12 10:11
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Use ANet.
Also, how are you printing out these valuea?

Re: client_id not work [Re: Ch40zzC0d3r] #407776
09/19/12 10:33
09/19/12 10:33
Joined: Jul 2011
Posts: 55
Berlin, Germany
S
Sammy32 Offline OP
Junior Member
Sammy32  Offline OP
Junior Member
S

Joined: Jul 2011
Posts: 55
Berlin, Germany
hi,

if I could I would use anet i can use this:

enet_get_clientid() == enet_ent_creator(enet_ent_globpointer(my)

true, but i must pay for this ,-) and i think about it, if I'll buy it.

but, gamestudio have also a multiplayer part and i think it must be work with this " if ((my.client_id == dplay_id) ) " ?

the results come with my debug code
con_writeNum(dplay_id);
con_writeNum(my.client_id);
this code use from my player action.



but in the future i must buy this, i think so, my game need more player ,-)

best regards


- 3d Gamestudio Commercial -
- ANET Pro -
<JAVA | PHP | HTML | Flash > DEVELOPER

Re: client_id not work [Re: Sammy32] #407779
09/19/12 11:06
09/19/12 11:06
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
client_id and dplay_id work fine, I've used them many times without a problem. Check out my following test code:

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

void object()
{
	while(my.client_id < 0) wait(1);
	while(1)
	{
		VECTOR temp,col;
		if(dplay_id == my.client_id) vec_set(col,COLOR_GREEN);
		else vec_set(col,COLOR_RED);
		vec_set(temp,my.x);
		vec_to_screen(temp,camera);
		draw_text(str_for_num(NULL,my.client_id),temp.x,temp.y,col);
		wait(1);
	}
}


void main()
{
	fps_max = 60;
	dplay_timeout = 80;
	dplay_localfunction = 2;
	
	while(!key_1 && !key_2) wait(1);
	if(key_1) session_open("mplayer");
	else session_connect("mplayer",NULL);
	
	while(dplay_status < 2) wait(1);
	
	level_load(NULL);
	
	while(dplay_status < 6) wait(1);
	
	if(connection == 2) ent_create(CUBE_MDL,vector(100,30,0),object);
	else ent_create(SPHERE_MDL,vector(100,-30,0),object);
	
	while(1)
	{
		draw_text(str_for_num(NULL,dplay_id),20,20,COLOR_WHITE);
		wait(1);
	}
}



"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: client_id not work [Re: Superku] #407819
09/19/12 17:36
09/19/12 17:36
Joined: Jul 2011
Posts: 55
Berlin, Germany
S
Sammy32 Offline OP
Junior Member
Sammy32  Offline OP
Junior Member
S

Joined: Jul 2011
Posts: 55
Berlin, Germany
thank you so mutch Superku, for your answer.

i must try this.

best regards


- 3d Gamestudio Commercial -
- ANET Pro -
<JAVA | PHP | HTML | Flash > DEVELOPER


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1