Jaysds1 Posted June 19, 2011 Share Posted June 19, 2011 I want to make a kill script, if the player tries to kill them selves again, they have to wait 3mins until it automatically kills them. here's what I got already: local player = getlocalPlayer() function kill() if (player) then killPlayer(source) setTimer(30000, 0) else isTimer(kill) killPlayer(source) end end Link to comment
will briggs Posted June 19, 2011 Share Posted June 19, 2011 Kill player is not a mta funstion, u need to set play health... Link to comment
Kenix Posted June 19, 2011 Share Posted June 19, 2011 Maybe you mean this ? local player = getlocalPlayer() function kill() if (player) then killTime = setTimer(function() setElementHealth(player,0) end,30000, 0) elseif isTimer(kill) then killTimer(killTime) end end Link to comment
JR10 Posted June 19, 2011 Share Posted June 19, 2011 He mean's this: (client side) local player = getlocalPlayer() function kill() if getElementData(player, 'canKillHimself') then killPed(player, player) setElementData(player, 'canKillHimself', false) setTimer(setElementData, 180000, 1, player, 'canKillHimself', true) else outputChatBox('You must wait 3 minutes before using /kill again', player) end end Link to comment
Jaysds1 Posted June 19, 2011 Author Share Posted June 19, 2011 Thanks everyone for helping. 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