Вот код когда игрок ливает с его героя падают вещи и сам герой удаляется
Code:
Quote
function LiversFunc takes nothing returns nothing
local integer LN = 0
local real x = GetLocationX(GetUnitLoc(GetEnumUnit()))
local real y = GetLocationY(GetUnitLoc(GetEnumUnit()))
call PingMinimap( x, y, 1.00 )
set LN = 1
loop
exitwhen LN > 6
call UnitRemoveItemFromSlot( GetEnumUnit(), LN )
set LN = LN + 1
endloop
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Livers_Actions takes nothing returns nothing
local player p = GetTriggerPlayer()
local group g = CreateGroup()
set udg_PlayersName[GetPlayerId(p)] = ( "|c00959697" + ( GetPlayerName(p) + "|r" ) )
set udg_IconsMultiboard[GetPlayerId(p)] = "UI\\Widgets\\Console\\Human\\human-inventory-slotfiller.blp"
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, ( udg_PlayersName[GetPlayerId(p)] + " |cFFFF0000покинул игру|r!!!" ) )
set g = GroupEnumUnitsOfPlayer(g, p, )
call DestroyBoolExpr(filter)
call ForGroup( g, function LiversFunc )
call DestroyGroup (g)
endfunction
//===========================================================================
function InitTrig_Livers takes nothing returns nothing
local trigger Liver = CreateTrigger( )
local integer Liver2 = 0
loop
call TriggerRegisterPlayerEvent( Liver, Player(Liver2) ,EVENT_PLAYER_LEAVE )
set Liver2 = Liver2 + 1
exitwhen Liver2 == 12
endloop
call TriggerAddAction( Liver, function Trig_Livers_Actions )
endfunction
Что здесь нужно вставить
Quote
set g = GroupEnumUnitsOfPlayer(g, p, filter )
call DestroyBoolExpr(filter)
??