A simple intro script using new SPEC osd

Forum Archive - from http://theuniversal.net
Locked
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

A simple intro script using new SPEC osd

Post by Mit »

Added in 0.65.1 were a few commands to put players in spec and allow OSD to be shown to them there :

Code: Select all

*speclock [player] [time (secs)] [target_player]
*specleave [player]
new OSD types : OSDSPEC and OSDSPECLOWER
Note for *speclock, missing out the time and target params, or using a time of 0, means the player is locked in spec until you chose to release them.

Heres a quick example showing how you can use that for a world where users are put in spec when they join and leave spec only when they select an option :

Code: Select all

Event( "OSDSelect", "SpecOSD:Join" )
{
	*specleave %PLAYER%
}

Event( "PlayerLoginComplete", "" )
{
	*speclock %PLAYER%

	osdcreate(OSDSPECLOWER, "SpecOSD", "Welcome" )
	osdSet( "BlockEscape" )
	osdadditem(OSDMINHEIGHT, "", "200" ) 
	osdaddat(OSDTEXT, 10, 0, 580,70, "", "Welcome to the world") 
	osdaddat(OSDTEXT, 10, 30,580,30, "", "Here we might give you options to do things like choose your character or whatever") 
	osdaddat(OSDEXITBUTTON, 150, 90,300,30, "Join", "Join Game") 
	osdactivate() 
}
Locked