• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Restrict Players from Areas + Notify.

Zero

Noble Member
Eh, not much to say really. Quite a simple script since I'm brand new to C++, purely did this for self education purposes.

Will restrict players from certain areas without any security clearance and will globally broadcast if a player without a GM rank steps foot on GM Island. (Odds are they can't without hacking on your server). Easily editable and self explanatory, newArea is areaID and security is the gmlevel for RBAC commands.

Tested and works, not sure if this is the most efficient way of doing it though, always willing to take constructive criticism from those with more experience!

 
Last edited:

Lstm

Respected Member
Tommy
I wanted to leave rather than gm level exchange for an item type
Only players who have such an item can stay in the desired place


-----
Edit
Like a vip key .. without putting sec_level 1/2/3/4 etc. ..
 

Zero

Noble Member
Tommy
I wanted to leave rather than gm level exchange for an item type
Only players who have such an item can stay in the desired place


-----
Edit
Like a vip key .. without putting sec_level 1/2/3/4 etc. ..


Replace
if (newArea == 876 && player->GetSession()->GetSecurity() == 0)

with

if (newArea == 876 && !player->HasItemCount(entry, amount, false))
 
Top