Jump to content

Help With ( LUA Code )


Recommended Posts

Hello Every one ~

i'v done a Jail Script .. Every thing is OK !

unless The Time

i'm done with every thing in the jail ( No free roam , the prisoner cant leave the jail any way ..

i want an example for 1 minute and ill continue for other ..

my code ( Server Side ) * the client is Okey ..

addEvent("onJail",true) 
addEventHandler("onJail",root, 
    function (player,time) 
        local player = getPlayerFromName(player) 
if time == "1 min" then 
if getElementData( player, "jailed") then  return outputChatBox("The player Is ALREADY in Jail !!",player,255,0,0) end  
fadeCamera(player,false) 
setTimer(function()  
fadeCamera(player,true) 
setElementPosition ( player,646.57916, -7659.33105, 12.86875) 
end,4000,1) 
setElementData(player,"jailed",true) 
setElementData(player,"noJet",true) 
        toggleControl (player, "fire", false) 
        toggleControl (player, "aim_weapon", false) 
        toggleControl (player, "weapon", false) 
        toggleControl (player, "vehicle_fire", false) 
        toggleControl (player, "vehicle_secondary_fire", false)  
        outputChatBox(getPlayerName(player).." have Been Jailed By " .. getPlayerName(source),root,255,0,0,false) -- 
    end 
end 
) 

So .. I Need Help with Timer ( 1 min ) please .. and ThanQ > :fadein:

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