Jump to content
  • 0

How to add get group id on this source?


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

ACMD_FUNC(storage)
{
if(map[sd->bl.m].flag.nostorage || pc_get_group_level < 2) {
clif_displaymessage(sd->fd, msg_txt(527));
return -1;
} else {
nullpo_retr(-1, sd); }

it doesn't recognize the group id when admin use @storage command he/she can't use the command. Can someone fix this? Thanks!

Edited by emong
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you mean this ?

pc_get_group_level(sd)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

you mean this ?

pc_get_group_level(sd)

Yeah. But didn't work when trying the command. Even my admin account can't use @storage command at a particular map where mapflag nostorage is issued. How to solve it?

Here's my current code..

ACMD_FUNC(storage)
{
if(map[sd->bl.m].flag.nostorage || pc_get_group_id(sd) < 2) {
clif_displaymessage(sd->fd, msg_txt(527));
return -1;
} else {

still my admin account can't use storage at a particular map..

Edited by emong
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  87
  • Reputation:   13
  • Joined:  02/15/12
  • Last Seen:  

ACMD_FUNC(storage)
{
if(map[sd->bl.m].flag.nostorage || pc_get_group_level < 2) {
clif_displaymessage(sd->fd, msg_txt(527));
return -1;
} else {
nullpo_retr(-1, sd); }

Into

ACMD_FUNC(storage)
{
if(map[sd->bl.m].flag.nostorage && pc_get_group_level < 2) {
clif_displaymessage(sd->fd, msg_txt(527));
return -1;
} else {
nullpo_retr(-1, sd); }

Your script issues all users on maps with no storage flag to block storage access...

OR if group_id is lower than 2. So no player but the ones group_id higher than 2 can open it IN GENERAL

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Geez! Thanks man! Noob me! I declared it as || :((

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  87
  • Reputation:   13
  • Joined:  02/15/12
  • Last Seen:  

np mate, happens to everyone xD

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Thanks again!

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...