Jump to content
  • 0

How to add get group id on this source?


Question

Posted (edited)

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

6 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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

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