Blueman Posted May 2, 2011 Posted May 2, 2011 Hello I am having problems with my custom game mode I built. When I die I don't respawn, But the other day I respawned just fine. My lua code. function joinHandler() local x = 2026.935668953 local y = 1008.9664306641 local z = 14.663164138794 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function playerDied(totalAmmo, killer, killerWeapon, bodypart) outputChatBox(getPlayerName(source).." died!") end addEventHandler("onPlayerWasted",getRootElement(),playerDied) My meta.xml <meta> <info author="Neko^-^" type="gamemode" name="DragonDM" description="DagonDM Mode" /> <include resource="helpmanager" /> <script src="script.lua" Type="Client" /> <map src="Dragon.map" /> <config src="help.xml" type="client"/> </meta> My help.xml <help> Welcome to the DragonDM Type /createvehicle car name/id to spawn vehicles. Made by Neko^-^ </help> I hope that's enough info I havn't made any changes at all since yesterday. It's amazing what people will sell nowadays $500 for an animated gif
Castillo Posted May 2, 2011 Posted May 2, 2011 Well, you are obiously lying, because it could never respawn because there's no code for that. local x = 2026.935668953 local y = 1008.9664306641 local z = 14.663164138794 function joinHandler() spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function playerDied(totalAmmo, killer, killerWeapon, bodypart) outputChatBox(getPlayerName(source).." died!") setTimer(spawnPlayer,1000,1,source, x, y, z) setTimer(fadeCamera,1000,1,source, true) setTimer(setCameraTarget,1000,1,source, source) end addEventHandler("onPlayerWasted",getRootElement(),playerDied) Btw, the meta.xml is also wrong. <meta> <info author="Neko^-^" type="gamemode" name="DragonDM" description="DagonDM Mode" /> <include resource="helpmanager" /> <script src="script.lua" Type="server" /> <map src="Dragon.map" /> <config src="help.xml" type="client"/> </meta> It should work. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Blueman Posted May 2, 2011 Author Posted May 2, 2011 Well, you are obiously lying, because it could never respawn because there's no code for that. local x = 2026.935668953 local y = 1008.9664306641 local z = 14.663164138794 function joinHandler() spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function playerDied(totalAmmo, killer, killerWeapon, bodypart) outputChatBox(getPlayerName(source).." died!") setTimer(spawnPlayer,1000,1,source, x, y, z) setTimer(fadeCamera,1000,1,source, true) setTimer(setCameraTarget,1000,1,source, source) end addEventHandler("onPlayerWasted",getRootElement(),playerDied) Btw, the meta.xml is also wrong. <meta> <info author="Neko^-^" type="gamemode" name="DragonDM" description="DagonDM Mode" /> <include resource="helpmanager" /> <script src="script.lua" Type="server" /> <map src="Dragon.map" /> <config src="help.xml" type="client"/> </meta> It should work. I wasn't lying but thanks, I probrably had something else running that might have to do with respawning. It's amazing what people will sell nowadays $500 for an animated gif
Castillo Posted May 2, 2011 Posted May 2, 2011 This script never worked, because the meta.xml was wrong. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Blueman Posted May 2, 2011 Author Posted May 2, 2011 This script never worked, because the meta.xml was wrong. Ok I owe you remember that. It's amazing what people will sell nowadays $500 for an animated gif
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