2017-03-14 18:33:33 -04:00
|
|
|
require ("global")
|
|
|
|
|
2016-03-12 02:54:03 -05:00
|
|
|
--[[
|
|
|
|
|
|
|
|
ActivateCommand Script
|
|
|
|
|
|
|
|
Switches between active and passive mode states
|
|
|
|
|
|
|
|
--]]
|
|
|
|
|
2017-03-19 11:40:41 -04:00
|
|
|
function onEventStarted(player, command, triggerName)
|
2016-04-14 08:31:39 -04:00
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
if (player:GetState() == 0) then
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeState(2);
|
2016-06-15 03:41:23 +01:00
|
|
|
elseif (player:GetState() == 2) then
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeState(0);
|
2017-03-19 11:40:41 -04:00
|
|
|
end
|
2017-03-07 08:32:57 -05:00
|
|
|
player:endEvent();
|
2017-03-19 11:40:41 -04:00
|
|
|
|
|
|
|
sendSignal("playerActive");
|
|
|
|
|
2016-03-12 02:54:03 -05:00
|
|
|
end
|