emery Posted March 11, 2012 Posted March 11, 2012 i want to disable @storage and @die in my pvp room thanks Quote
Legato Posted March 11, 2012 Posted March 11, 2012 if( map_flag_vs(sd->bl.m) ) { clif_displaymessage(fd,"Sorry, you can't use this command on a PvP map."); return -0; } Paste it under your @die and @storage command. Don't forget to recompile, though. Quote
tr0n Posted March 11, 2012 Posted March 11, 2012 @Legato, after that you can set a @die mapflag or what ? any explanation? Quote
Emistry Posted March 11, 2012 Posted March 11, 2012 @tr0n.... ...like title mentioned...those command will be disabled at pvp map.. when player use the command... a message of disabling they use the command will be shown to player.. ( just a 4 line code...how come you didnt saw the 2nd line ? ) "Sorry , you cant use this command at pvp map." @legato/.... there is a little typo mistake at your code.. return -0; -------> should be -1; anyway..if legato didnt work..maybe you can try this.. if( map[sd->bl.m].flag.pvp ){ clif_displaymessage(fd, "This Command is Disabled in PVP Map."); return -1; } Quote
tr0n Posted March 11, 2012 Posted March 11, 2012 I didn't understand this: if( map_flag_vs(sd->bl.m) ) { but yours I understand: if( map[sd->bl.m].flag.pvp ){ I'm not that dumb <.< Is mapflag VS same as PVP ? Quote
Emistry Posted March 11, 2012 Posted March 11, 2012 erm..ya...actually i feel the same as you... and i didnt found any example for map_flag_vs inside the src part.. >.< that's why i write 1 using the current exist mapflag checking code.. anyway..hope it work... Quote
Legato Posted March 11, 2012 Posted March 11, 2012 I wrote it that way, Emistry. Thanks for pointing it out, though. You can put either -0 or -1. Return -1 will show the @storage / @die failed message when a player tries to use any of these 2 commands inside a PvP map. While return -0 won't show any failed message. @Tr0n, you don't have to set any mapflag. With that piece of code, no one will be able to use the commands inside a pvp map(including WoE maps, and when you use @pvpon). And Emistry's code would only work on the maps that has a mapflag pvp enabled. Quote
Emistry Posted March 11, 2012 Posted March 11, 2012 owh..thx for the explaination legato xD it though it was wrong..coz i didnt found any sample with -0 and that map_flag_vs also haha and thx you teach me a great lesson on src Quote
xRyusuke Posted November 5, 2012 Posted November 5, 2012 I am sorry, but i cant follow, which file should I edit and add in that code? Quote
Question
emery
i want to disable @storage and @die in my pvp room thanks
9 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.