Jump to content

#تصحيح


Recommended Posts

يعطيكم العافية ... بسأل اذا هاد الكود فيه خطأ ولا لا ؟؟

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...