Jump to content
  • 0
kerbiii

getuser not working on pub

Question

OnInit:waitingroom "PvP[" + getmapusers("guild_vs3.gat") + "/30",0;end;}

 

 

i have this on my npc but it doesnt show the right numbers of players on the map its always 0/30

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Remove the file extension and I think it'll work c

waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;
Edited by pan

Share this post


Link to post
Share on other sites
  • 0

 

Remove the file extension and I think it'll work c

waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;

it worked, thanks!

 

EDIT: the pub doesnt change even when there's no player in the pvp room anymore

Edited by kerbiii

Share this post


Link to post
Share on other sites
  • 0

You could use instead of this loop a initnpctimer and a label, but I think it's simpler this way:

OnInit:	waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;	while(1)	{		delwaitingroom strnpcinfo(3);		waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;		sleep 1000; //Update rate (ms)	}	end;
Haven't tested it, but I hope it works c:

Share this post


Link to post
Share on other sites
  • 0

 

You could use instead of this loop a initnpctimer and a label, but I think it's simpler this way:

OnInit:	waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;	while(1)	{		delwaitingroom strnpcinfo(3);		waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;		sleep 1000; //Update rate (ms)	}	end;
Haven't tested it, but I hope it works c:

its not working the pub is always [0/30]

Share this post


Link to post
Share on other sites
  • 0

I just tested this code in Hercules' last revision and it's working fine, have you altered anything in it? You could post the snippet that you are using c:

Share this post


Link to post
Share on other sites
  • 0

I just tested this code in Hercules' last revision and it's working fine, have you altered anything in it? You could post the snippet that you are using c:

for got edit some line, its working now, does the sleep part really needed? because sometimes its giving the wrong numbers

Share this post


Link to post
Share on other sites
  • 0

Change it to :

sleep 100;

 

sleep is needed otherwise it will cause infinite loop :P

Edited by Patskie

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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