Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Block warp to a map to a certain type of players


diegorifu22

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/23/20
  • Last Seen:  

How to allow all players type (1 and 99 for example, super players and GMs) to a certain map, but not normal players (0)?

 

Edited by diegorifu22
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1859
  • Reputation:   298
  • Joined:  08/03/12
  • Last Seen:  

I think you can use getgroupid script commands.

*getgroupid({<char_id>})

This function will return the group id to which the invoking player belongs.
-    script    Sample    -1,{
    
    OnPCLoginEvent:
        if ( getgroupid() > 0 && strcharinfo(3) == "mapname") end;
        atcommand "@kick " +strcharinfo(0); //or change to warp ?
        end;
}
Edited by Chaos92
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2373
  • Joined:  10/28/11
  • Last Seen:  

-	script	Sample	-1,{
	OnInit:
		.map$ = "prontera";
		setmapflag, .map$, mf_loadevent;
		end;
		
	OnPCLoadMapEvent:
		if (strcharinfo(3) == .map$) {
			if (getgroupid() <= 0) 
				warp "SavePoint", 0, 0;
		}
		end;
}

using OnPCLoadMapEvent are more appropriate, it triggered everytime you teleport or enter the map.

Link to comment
Share on other sites

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.

×
×
  • Create New...