Code: Select all
EVENT("accessbuilding", "8")
{
if ( $gBuildingOwnerID != $gPlayerID )
{
osdcreate(OSDBUILDING, "Statusgate", "sysGetBuildingName")
osdadditem(OSDBIGTEXT, " ", "You must be the owner to get access")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON, "exit", "OK")
osdactivate()
}
Else if ( $gBuildingOwnerID = $gPlayerID ) )
{
osdcreate(OSDBUILDING, "Statusgate", "GATE")
osdadditem(OSDBIGTEXT, "", "Choose Here the Gate Status")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON,"1", "OPEN")
osdadditem(OSDEXITBUTTON,"2", "CLOSE")
osdactivate()
}
}
EVENT("OSDSELECT", "Statusgate:1")
{
EVENT("&command","Animation")
{
*changebuilding $gBuildingAccessNum,13
sleep(80)
*changebuilding $gBuildingAccessNum,12
}
}
EVENT("accessbuilding", "12")
{
$GA = sysPlayerInventory("Gate Pass")
If ($GA < 1)
{
osdcreate(OSDBUILDING, "Statusgate", "GATE")
osdadditem(OSDBIGTEXT, " ", "You need a Gate Pass to get access")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON, "exit", "OK")
osdactivate()
}
ELSE IF ($GA = 1)
{
osdcreate(OSDBUILDING, "Statusgate", "GATE")
osdadditem(OSDBIGTEXT, "", "Choose Here the Gate Status")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDBIGTEXT, " ", "")
osdadditem(OSDEXITBUTTON,"1", "OPEN")
osdadditem(OSDEXITBUTTON,"2", "CLOSE")
osdactivate()
}
}
EVENT("OSDSELECT", "Statusgate:2")
{
EVENT("&command","Animation")
{
*changebuilding $gBuildingAccessNum,14
sleep(80)
*changebuilding $gBuildingAccessNum,8
}
}