warlitsh Posted July 18, 2013 Share Posted July 18, 2013 Hi ! i need help for respawn in Arena in death. And not with the respawn map...(Sorry for my bad english) Script DeathMatch : matchmarker = createMarker(-2171.1999511719, 251.80000305176, 34.299999237061, "cylinder", 1.5) matchblip = createBlip(-2171.1999511719, 251.80000305176, 35.299999237061, 20) function info (thePlayer) outputChatBox("/godm pour entrer dans l'Arene!", thePlayer, 0, 255, 0) end addEventHandler("onMarkerHit", matchmarker, info) function start (thePlayer) local x, y, z = getElementPosition(thePlayer) local spawn = math.random(1, 3) if (getDistanceBetweenPoints3D(x, y, z, -2171.1999511719, 251.80000305176, 35.299999237061)) < 5 then if spawn == 1 then outputChatBox("Tuer les autres joueurs", thePlayer, 0, 255, 0) outputChatBox("Pour quitter l'arène utiliser /tpdm", 0, 255, 0) setElementInterior(thePlayer, 2) setElementPosition(thePlayer, 2531.8000488281, -1282.3000488281, 1031.4000244141) giveWeapon(thePlayer, 24, 100) giveWeapon(thePlayer, 27, 100) giveWeapon(thePlayer, 30, 100) end if spawn == 2 then outputChatBox("Tuer les autres joueurs", thePlayer, 255, 255, 0) outputChatBox("Pour quitter l'arène utiliser /tpdm", thePlayer, 0, 255, 0) setElementInterior(thePlayer, 2) setElementPosition(thePlayer, 2562.3999023438, -1303.3000488281, 1054.5999755859) giveWeapon(thePlayer, 24, 100) giveWeapon(thePlayer, 27, 100) giveWeapon(thePlayer, 30, 100) end if spawn == 3 then outputChatBox("Tuer les autres joueurs", thePlayer, 255, 100, 255) outputChatBox("Pour quitter l'arène utiliser /tpdm", 0, 255, 0) setElementInterior(thePlayer, 2) setElementPosition(thePlayer, 2567.3999023438, -1282.8000488281, 1031.4000244141) giveWeapon(thePlayer, 24, 100) giveWeapon(thePlayer, 27, 100) giveWeapon(thePlayer, 30, 100) end else outputChatBox("Vous êtes trop loin", thePlayer, 255, 0, 0) end end addCommandHandler("godm", start) function back (thePlayer) takeAllWeapons ( getRootElement() ) --remove all the weapons setElementInterior(thePlayer, 0) setElementPosition(thePlayer, -2171.1999511719, 251.80000305176, 35.299999237061) end addCommandHandler("tpdm", back) Link to comment
Castillo Posted July 18, 2013 Share Posted July 18, 2013 You must use the event onPlayerWasted along with the spawnPlayer function. 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