Jump to content

Simple Gamemode


ProfCube

Recommended Posts

This is a very simple gamemode skript, it will take no problem on the server at all 😄

This is a re-write to a skript i wrote months back, but i have hidden it XD so i can post this one lol,

Permission:
	gamemode.* - Give you all the permission needed to run command.
	gamemode - Give you access to change your gamemode.
	gamemode.other - Ability to change other players gamemode.
options:
	nopermission: &cYou currently don't have access to this permission!
	permission: gamemode
	s: "survival","s" or "0"
	c: "creative","c" or "1"
	a: "adventure","a" or "2"
	sp: "spectator" or "3"
	

function gamemode(p: player, gamemode: text):
	if {_gamemode} is {@s}:
		set gamemode of {_p} to survival
		send "&7Your gamemode has been changed to &eSurvival&7!" to {_p}
	if {_gamemode} is {@c}:
		set gamemode of {_p} to creative
		send "&7Your gamemode has been changed to &eCreative&7!" to {_p}
	if {_gamemode} is {@a}:
		set gamemode of {_p} to adventure
		send "&7Your gamemode has been changed to &eAdventure&7!" to {_p}
	if {_gamemode} is {@sp}:
		set gamemode of {_p} to spectator
		send "&7Your gamemode has been changed to &eSpectator&7!" to {_p}
		
		
command /gamemode [<text>] [<OfflinePlayer>]:
	permission: {@permission}.*
	permission message: {@nopermission}
	aliases: gm
	trigger:
		if arg 1 isn't set:
			send "&7/gamemode &e<text> <player>"
		if player has permission "{@permission}":
			arg 2 isn't set:
				gamemode(player, arg-1)
		if player has permission "{@permission}.other":
			arg 2 is set:
				gamemode(arg-2, arg-1)
Requirements:
	Skript

 

Edited by ProfCube
  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Ok one thing idk if its just me but wehn i do /gm s it shows "your gamemode is survival" the normal thing its suppost to show but it also shows "

"&7You have change &e<none> &7gamemode to &eSurvival!" obviously with color codes
Edited by Mr_pro68YT
adding something
Link to comment
Share on other sites

On 6/27/2020 at 12:16 AM, Mr_pro68YT said:

Ok one thing idk if its just me but wehn i do /gm s it shows "your gamemode is survival" the normal thing its suppost to show but it also shows "


"&7You have change &e<none> &7gamemode to &eSurvival!" obviously with color codes

Yea sorry I just fixed it, it was the last line of the code that was doing that, go a head and copy the code again.

Link to comment
Share on other sites

  • 1 year later...
  • 5 months later...
On 1/15/2020 at 6:35 PM, ProfCube said:

This is a very simple gamemode skript, it will take no problem on the server at all 😄

This is a re-write to a skript i wrote months back, but i have hidden it XD so i can post this one lol,

Permission:
	gamemode.* - Give you all the permission needed to run command.
	gamemode - Give you access to change your gamemode.
	gamemode.other - Ability to change other players gamemode.
options:
	nopermission: &cYou currently don't have access to this permission!
	permission: gamemode
	s: "survival","s" or "0"
	c: "creative","c" or "1"
	a: "adventure","a" or "2"
	sp: "spectator" or "3"
	

function gamemode(p: player, gamemode: text):
	if {_gamemode} is {@s}:
		set gamemode of {_p} to survival
		send "&7Your gamemode has been changed to &eSurvival&7!" to {_p}
	if {_gamemode} is {@c}:
		set gamemode of {_p} to creative
		send "&7Your gamemode has been changed to &eCreative&7!" to {_p}
	if {_gamemode} is {@a}:
		set gamemode of {_p} to adventure
		send "&7Your gamemode has been changed to &eAdventure&7!" to {_p}
	if {_gamemode} is {@sp}:
		set gamemode of {_p} to spectator
		send "&7Your gamemode has been changed to &eSpectator&7!" to {_p}
		
		
command /gamemode [<text>] [<OfflinePlayer>]:
	permission: {@permission}.*
	permission message: {@nopermission}
	aliases: gm
	trigger:
		if arg 1 isn't set:
			send "&7/gamemode &e<text> <player>"
		if player has permission "{@permission}":
			arg 2 isn't set:
				gamemode(player, arg-1)
		if player has permission "{@permission}.other":
			arg 2 is set:
				gamemode(arg-2, arg-1)
Requirements:
	Skript

 

A must for literally every server

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...