Jump to content
  • 0
Sign in to follow this  
astralprojection

How to Add attached Player to Array

Question

2 answers to this question

Recommended Posts

  • 0

now its better to use queue iterator for this kind of system

-	script	sfhkjsdfhsk	FAKE_NPC,{OnInit:	if ( QUEUEOPT_LOGOUT != 1 ) end; // if your server is outdated, error will be thrown on this line	bindatcmd "whisper", strnpcinfo(0)+"::Onjoin", 0, 100;	bindatcmd "debug", strnpcinfo(0)+"::Ondebug", 99, 100; // GM99 debug	.q = queue();	end;Onjoin:	if ( queueadd( .q, getcharid(3) ) )		dispbottom "join success";	else		dispbottom "you already joined";	end;Ondebug:	.@it = queueiterator(.q);	for ( .@aid = qiget(.@it); qicheck(.@it); .@aid = qiget(.@it) ) {		.@name$ = rid2name(.@aid);		getmapxy .@map$, .@x, .@y, 0, .@name$;		dispbottom ( ++.@i )+". "+ .@name$ +" at "+ .@map$ +","+ .@x +","+ .@y;	}	if ( !.@i ) {		dispbottom "nobody join yet";	}	qiclear .@it;	end;}
Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.