Abo-Al3ZaB Posted May 15, 2016 Share Posted May 15, 2016 يعطيكم العافية ... بسأل اذا هاد الكود فيه خطأ ولا لا ؟؟ addEventHandler("onPlayerLogin",root, setTimer ( function() if getElementData(source,"jailed") == true then randomJail = jTable[math.random(#jTable)] if randomJail then x,y,z = randomJail[2],randomJail[3],randomJail[4] int = randomJail[5] dim = randomJail[6] setElementInterior ( source, int ) setElementDimension(source,dim) setElementPosition (source,x,y,z ) end end end, 5000, 1 )) انا بدي الوظيفة تتطبق بعد 5 ثواني .... Link to comment
HassoN Posted May 15, 2016 Share Posted May 15, 2016 addEventHandler("onPlayerLogin",root, function() LoggedPlayer = source setTimer ( function() if getElementData(LoggedPlayer,"jailed") == true then randomJail = jTable[math.random(#jTable)] if randomJail then x,y,z = randomJail[2],randomJail[3],randomJail[4] int = randomJail[5] dim = randomJail[6] setElementInterior ( LoggedPlayer, int ) setElementDimension(LoggedPlayer,dim) setElementPosition (LoggedPlayer,x,y,z ) end end end, 5000, 1 ) end) Link to comment
Abo-Al3ZaB Posted May 17, 2016 Author Share Posted May 17, 2016 addEventHandler ( "onPlayerLogin",root, function ( ) setTimer ( function ( source ) if ( getElementData ( source, "jailed" ) == true ) then randomJail = jTable[math.random(#jTable)] if ( randomJail ) then x,y,z = randomJail[2],randomJail[3],randomJail[4] int = randomJail[5] dim = randomJail[6] setElementInterior ( source, int ) setElementDimension ( source, dim ) setElementPosition ( source, x,y,z ) end end end, 15000, 1, source ) end ) طب في مشكلة بالكود حاليا لما اعمل الحدث onPlayerWasted الكود يشتغل واللاعب يروح للإحداثيات بس لما اعمله onPlayerLogin ما يروح للإحداثيات المطلوبة ايش الحل ؟ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now