Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use Functions [Skript]
When you make a function remember to add a name next to function you need a name and arguments which goes between the two ()

PHP Code:
function Fly(pplayer
p: = player which is why you need player

next if you wanted to make a broadcast with a set message in a function you would make it like this

PHP Code:
function Broadcast(pplayer)
   broadcast "Hello world!" 

or if you wanted to add a player name in it you would do this

PHP Code:
function Broadcast(pplayer)
   broadcast "Hello world! %{_p}%" 

_p means player

we will move on to making a GUI with a function in the next post/tutorial

Forum Jump:

Users browsing this thread: 1 Guest(s)