AlphaMark Posted September 16, 2013 Share Posted September 16, 2013 Why wont the cooldown work? function createExplosionForPlayer(client, command) local cooldown = 300 local commandname = "jihad" local note_info = "You need to wait 5 minutes before you can do this again." local note_active = "Cooldown is still active, please wait." local timer = getElementData(client, "jihad.cooldown") if not timer then if (isPedInVehicle(client)) then outputChatBox("You can't commit a Jihad in a vehicle!", client) return end setTimer(createJihadForPlayer, 2500, 1, client, x, y, z) triggerClientEvent("playTheSound", root, client) setPedAnimation(client, "BOMBER", "BOM_Plant") end end addCommandHandler("jihad", createExplosionForPlayer) function createJihadForPlayer(client, x, y, z) if (isPedInVehicle(client)) then outputChatBox("You can't commit a Jihad in a vehicle!", client) return end local x, y, z = getElementPosition(client) createExplosion(x, y, z, 2) createExplosion(x, y, z, 3) createExplosion(x, y, z, 10) outputChatBox(getPlayerName(client) .. " committed a Jihad!", root) end addCommandHandler("c2", createJihadForPlayer) Link to comment
EstrategiaGTA Posted September 16, 2013 Share Posted September 16, 2013 What does /debugscript 3 say? What's the problem with the script? 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