Jump to content

A little help :D


Recommended Posts

Hey, so i have this /kill command, how do i make so every 1 second ? the killSeconds will be -1

exports["TopBarChat"]:sendClientMessage("#FF0000You will die in #00FF00"..tonumber(killSeconds-1).."#FF0000 seconds",255,255,255,true) 

Link to comment
killSecondTimer = setTimer(function() if killSeconds = 1 then killTimer(killSecondTimer) return end killSeconds = tonumber(killSeconds)-1 exports["TopBarChat"]:sendClientMessage("#FF0000You will die in #00FF00"..killSeconds.."#FF0000 seconds", 255, 255, 255, true) end, 1000, 0) 

Try that, didn't test it though.

Link to comment
local seconds = 6 
    seconds = seconds-1 
    exports["TopBarChat"]:sendClientMessage(string.format("#FF0000You will die in #00FF00%d#FF0000 seconds",seconds),255,255,255,true) 
    if seconds<=0 then 
        -- kill the ped 

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