HOW TO ADD CUSTOM CHATBOX TEXT WHEN A PLAYER LIKES/DISLIKES YOUR MAP
So the following script will make players receive a chatbox message when they type /like or /dislike.
Put this code into a rate.lua file :
function like (player)
outputChatBox("this text shows when a player likes your map",player,255,255,255,true)
end
addCommandHandler ( "like", like )
function dislike (player)
outputChatBox("and this shows when a player dislikes your map",player,255,255,255,true)
end
addCommandHandler ( "dislike", dislike )
Move the rate.lua file into your map's main folder
Now add this line in your map's meta.xml and save it
<script src="rate.lua" type="server" />
That's it! Now when a player rates your map he'll receive the custom message from the rank.lua file!