Jump to content
  • 0

GM ignored in getmapusers?


Lord Ganja

Question


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

is it possible for the script getmapusers to ignore the gm inside the map?

it will only count the players who's gm level is 0 inside the map.

anyone could give me a script or idea to do it?

thanks in advance.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

In script.c, change your getmapusers function with this one.

/*==========================================
* ƒ}ƒbƒvŽw’胆[ƒU[”Š“¾
*------------------------------------------*/
BUILDIN_FUNC(getmapusers)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
const char *str;
int m, count = 0;

str=script_getstr(st,2);
if( (m=map_mapname2mapid(str))< 0){
 script_pushint(st,-1);
 return 0;
}


for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
 if (m == pl_sd->bl.m && pc_get_group_level(pl_sd) < 1)
 {
  ++count;
 }
}


script_pushint(st,count);
return 0;
}

Edited by MarkZD
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...