Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Question About Container

Ask for help
Post Reply
Ray
Neophyte
Neophyte
Posts: 28
Joined: 04.05.2012 7:13

Question About Container

Post by Ray »

I found that sometime the opened container will close.
how can i detect the container opened or not?
currently i use "use object(containerid)" to make sure the container opened.
But sometime it may fail because the use object delay time..
yuras
Novice
Novice
Posts: 142
Joined: 11.01.2011 10:34

Re: Question About Container

Post by yuras »

Ray wrote:I found that sometime the opened container will close.
how can i detect the container opened or not?
currently i use "use object(containerid)" to make sure the container opened.
But sometime it may fail because the use object delay time..
checklag for empty contaitner, check FindType($FFFF,container_id)>0 for others.
NoSilence
Novice
Novice
Posts: 94
Joined: 02.01.2010 13:55

Re: Question About Container

Post by NoSilence »

Code: Select all

procedure CloseContainer;
begin
UseObject(Backpack);
end;

function IsContainerOpened(Container: cardinal):boolean;
begin
result:= LastContainer = Container;
end;
My simple profit. It works after reconnection too.
///
Ray
Neophyte
Neophyte
Posts: 28
Joined: 04.05.2012 7:13

Re: Question About Container

Post by Ray »

Thanks all... :lol:
Post Reply