Nich Posted October 18, 2009 Share Posted October 18, 2009 Hello! I made a suicide script and want to toggle action cmd /me every time some one commits a suicide. E.g, /me commited a suicide - every one sees "John_Doe commited a suicide" How could i do that? And second thing I wanted to ask if it is possible to make the time between deaths and spawning longer? Like in SP, camera moves away from the player and then respawns. ATM, my man respawns with like milliseconds. Link to comment
robhol Posted October 18, 2009 Share Posted October 18, 2009 Simple answer: yes, you can. Add an outputChatBox line to the command handler function for your command. You can look up its parameters on the wiki. The second is also perfectly possible; unfortunately, it's really difficult to say how, when you give no info at all about which scripts you're actually using. Link to comment
Nich Posted October 18, 2009 Author Share Posted October 18, 2009 There's nothing much to say, because I just started scripting it. So, there's pretty much nothing related to deaths, exept for /suicide.(setElementHealth 0.. is there a better function for that?) It would be a great addition, but I'm making a hospital system anyways.. Link to comment
50p Posted October 18, 2009 Share Posted October 18, 2009 Hello!I made a suicide script and want to toggle action cmd /me every time some one commits a suicide. E.g, /me commited a suicide - every one sees "John_Doe commited a suicide" How could i do that? And second thing I wanted to ask if it is possible to make the time between deaths and spawning longer? Like in SP, camera moves away from the player and then respawns. ATM, my man respawns with like milliseconds. 1. There are 2 ways. a) Make a command /me and than use executeCommandHandler in onPlayerWasted event handler. b) outputChatBox ( getPlayerName( source ) .. " committed a suicide" ); in onPlayerWasted event handler. 2. Add a timer in onPlayerWasted event handler: setTimer( spawnPlayer, 5000, 1, source, X, Y, Z ); -- where X, Y, Z is spawn position. 5000 = seconds Make sure other resources don't spawn players when they die. 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