Делай циклом для всех игроков.Добавлено (16-01-2011, 12:15)
---------------------------------------------
Создай триггер Time и вставь в него этот код.
Code
function Trig_Time_Actions takes nothing returns nothing
local player p = Player(0)
local integer minutes = GetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER) + 1
local integer seconds = GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_USED) + 1
local integer i = 0
if seconds >= 60 then
loop
call SetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_USED, 0)
call SetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER, minutes)
exitwhen i == 11
set i = i + 1
set p = Player(i)
endloop
else
loop
call SetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_USED, seconds)
exitwhen i == 11
set i = i + 1
set p = Player(i)
endloop
endif
set p = null
endfunction
//===========================================================================
function InitTrig_Time takes nothing returns nothing
call TimerStart(CreateTimer(), 1., true, function Trig_Time_Actions)
endfunction