Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gmap account restriction? (https://forums.graalonline.com/forums/showthread.php?t=134267242)

Ducati_Link 10-12-2012 03:30 PM

Gmap account restriction?
 
Is there a way to account restrict a gmap area? And not talking like 'staff only'.. Have multiple gmaps, and certain people can only access certain ones?

fowlplay4 10-12-2012 03:50 PM

You can setup a class script like this:

level_denyunawesomepeople

PHP Code:

function onPlayerEnters() {
  if (
cantAccess()) {
    
warpAway();
  }
}

function 
cantAccess() {
  if (
player.isawesome) {
    return 
false;
  } else {
    return 
true;
  }
}

function 
warpAway() {
  
player.setlevel2("onlinestartlocal.nw"3030);


then in your levels

PHP Code:

function onCreated() {
  
join("level_denyunawesomepeople");



Ducati_Link 10-12-2012 03:52 PM

Excellent - Thank you very much Fowl ^^


All times are GMT +2. The time now is 10:07 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.