Jump to content
  • 0

edit bindatcmd


Question

Posted

-	script	storageohyeah	-1,{
OnInit:
bindatcmd "storage",strnpcinfo(3)+"::OnAtcommand";
end;
 
OnAtcommand:
setarray .Map$[0],"cell_game","aldeg_cas02","sec_pri","prtg_cast01";
if(strcharinfo(3) == .Map$[0] || strcharinfo(3) == .Map$[1]){
  message strcharinfo(0),"You can't open your storage here!";
end;
}
openstorage;
end;
 
}

Someone please help me to add multiple maps? Seems like I can only add two restricted @storage.

What will I edit so I can restrict using @storage on those 4 or more maps. Thank you.

6 answers to this question

Recommended Posts

Posted (edited)

Try :

-    script    storageohyeah    -1,{
OnInit:
    bindatcmd "storage",strnpcinfo(3)+"::OnAtcommand";
    setarray .Map$[0],"cell_game","aldeg_cas02","sec_pri","prtg_cast01";
    end;

OnAtcommand:
    for ( set .@i, 0; .@i < getarraysize(.Map$); set .@i, .@i + 1 ) {
        if( strcharinfo(3) == .Map$[.@i] ) {
            message strcharinfo(0),"You can't open your storage here!";
            end;
        }
    }
    openstorage;
    end;
}
Edited by Patskie

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