MatiasRuff Posted February 24, 2011 Share Posted February 24, 2011 I have a BaseMode and I would like to die a player, then respawn. Not that way I can do, please help Link to comment
Dev Posted February 25, 2011 Share Posted February 25, 2011 (edited) Uhm.. I guess you want to make it like.. after a player dies he can spawn at a hospital or something, try this: function spawnOnDeath( ) outputChatBox("You died, wait 10 seconds until you respawn at the Hospital", source, 255, 255, 0) -- send the notification setTimer(function() -- set the timer for spawning cost = math.random(100, 300) -- cost could be anything from 100 to 300 spawnPlayer(source, 1187.5576171875, -1326.41015625, 13.559711456299, 271, getElementModel(source), 0, 0, getPlayerTeam" class="kw2">getPlayerTeam(source)) -- spawn the player at LS Hospital outputChatBox("The Doctors have treated you, be careful next time. Treatment Cost: ".. tonumber(cost) .. "$", source, 255, 255, 0) -- Money has been taken takePlayerMoney(source, tonumber(cost)) -- take the money end, 10000, 1) end addEventHandler("onPlayerWasted", getRootElement(), spawnOnDeath) Edited February 25, 2011 by Guest Link to comment
Castillo Posted February 25, 2011 Share Posted February 25, 2011 He's asking for something that can be used on Basemode game mode not on a Roleplay Link to comment
Dev Posted February 25, 2011 Share Posted February 25, 2011 Solidsnake14 said: He's asking for something that can be used on Basemode game mode not on a Roleplay Atleast he'll get the idea of how to do it? 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