Jump to content
  • 0

Get party member count


Question

4 answers to this question

Recommended Posts

Posted (edited)

Create a variable of type struct party_data;

Sample:

struct party_data *party;

Use party_search function:

party_search(party_id);

Sample:

party = party_search(party_id);

Use a counter(You'll need to create some int vars before, which will be used in the loop[MAX_PARTY is a constant, and already exists]):

if(party!=NULL){
 for(i=0;i<MAX_PARTY;i++){
  if(p->party.member[i].account_id)
j++;
 }
}

j will be the number of party members.

Of course, it'll depends on how u know the code.

it'd be better you u told exactly what you want to do, maybe there're other way of doing it without changing mob.c.

Edited by MarkZD

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...