ajaytrix Posted September 8, 2013 Posted September 8, 2013 - 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. Quote
Patskie Posted September 8, 2013 Posted September 8, 2013 (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 September 8, 2013 by Patskie Quote
ajaytrix Posted September 8, 2013 Author Posted September 8, 2013 Tried it. Hmm. When I use @storage, message pop ups and still can use @storage inside that restricted map. Quote
Patskie Posted September 8, 2013 Posted September 8, 2013 Tried it. Hmm. When I use @storage, message pop ups and still can use @storage inside that restricted map. Edited my last post. Quote
ajaytrix Posted September 8, 2013 Author Posted September 8, 2013 Tried it. Hmm. When I use @storage, message pop ups and still can use @storage inside that restricted map. Edited my last post. hmm.. i can't warp sir. Quote
Patskie Posted September 8, 2013 Posted September 8, 2013 Warp? @_@ is my script will make you warp? Not it isn't, It only modifies a command. That is a different story Quote
ajaytrix Posted September 8, 2013 Author Posted September 8, 2013 Uhmm. Oh yeah, my fault sir Patskie. Your script is working fine. Sorry I restarted my server. XD works fine. Thank you again, and sorry! Quote
Question
ajaytrix
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.