|
发表于 2009-1-25 03:23:59
|
显示全部楼层
引用第1楼kook于2009-01-12 09:02发表的 :
太古老的东西请搜索之
globals
gamecache CheckCache=InitGameCachmmm("lalala")
trigger EverySecond=CreateTrigger()
boolean array MHmark
endglobals
function docheck takes nothing returns nothing
local integer i=0
local lightning l=AddLightning("CLPB",true,999999,999999,999999,999999)
loop
exitwhen i==11
set MHmark=GetStoredBoolean(CheckCache,"player",I2S(i))
set i=i+1
endloop
if l!=null and IsVisibleToPlayer(999999,999999,GetLocalPlayer())==false then
call StoreBoolean(CheckCache,"player",I2S(GetPlayerId(GetLocalPlayer())),true)
call SyncStoredBoolean(CheckCache,"player",I2S(GetPlayerId(GetLocalPlayer())))
endif
call DestroyLightning (l)
set l=null
endfunction
function Init takes nothing returns nothing
local integer i=0
loop
exitwhen i==11
call StoreBoolean(CheckCache,"player",I2S(i),false)
set MHmark=false
set i=i+1
endloop
call TriggerRegisterTimerEvent(EverySecond,1,true)
call TriggerAddAction(EverySecond,function docheck)
endfunction
.......
……… |
|