Jaysds1 Posted June 19, 2011 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
will briggs Posted June 19, 2011 Posted June 19, 2011 Kill player is not a mta funstion, u need to set play health...
Kenix Posted June 19, 2011 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
JR10 Posted June 19, 2011 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
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