Nicolas ECM Posted February 17, 2014 Posted February 17, 2014 Hi I want to make a respawn, where they have 2 locations where it can appear so far but I'm taking this cast does not serve anyone can tell me it lacks to serve? Sitios = { [1] = (source, 459.77969360352, -1968.7708740234, 8.6134691238403, 0, 71), [2] = (source, -2533.9658203125, -1618.890625, 526.56469726563, 0, 71) } function respawn (source, cmd) resultado = math.random (1, 2) s, x, y, z, r, s = unpack (Sitios[resultado]) nardis = spawnPlayer ( source, x, y, z, 0, math.random(0, 200) ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), respawn)
MTA Team 0xCiBeR Posted February 17, 2014 MTA Team Posted February 17, 2014 Sitios = { [1] = (source, 459.77969360352, -1968.7708740234, 8.6134691238403, 0, 71), [2] = (source, -2533.9658203125, -1618.890625, 526.56469726563, 0, 71) } function respawn () resultado = math.random (1, 2) s, x, y, z, r, s = unpack (Sitios[resultado]) nardis = spawnPlayer ( source, x, y, z, 0, math.random(0, 200) ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), respawn) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted February 17, 2014 Posted February 17, 2014 What is "source" doing in the table? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Nicolas ECM Posted February 17, 2014 Author Posted February 17, 2014 I thought it was so and .:CiBeR:. did not help me to do?
MTA Team 0xCiBeR Posted February 17, 2014 MTA Team Posted February 17, 2014 Don't understand you, Did it get Fixed? DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
AboShanab Posted February 18, 2014 Posted February 18, 2014 Sitios = { {459.77969360352, -1968.7708740234, 8.6134691238403}, {-2533.9658203125, -1618.890625, 526.56469726563}, } function respawn (source, cmd) local x,y,z = unpack(Sitios[math.random(#Sitios)]) nardis = spawnPlayer ( source, x, y, z, 0, math.random(0, 200) ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), respawn) Skype : aboshanab_
MTA Team 0xCiBeR Posted February 18, 2014 MTA Team Posted February 18, 2014 That's not going to work. Please read the event parameters before posting: int totalAmmo, element killer, int killerWeapon, int bodypart, bool stealth Should be: Sitios = { {459.77969360352, -1968.7708740234, 8.6134691238403}, {-2533.9658203125, -1618.890625, 526.56469726563}, } function respawn () local x,y,z = unpack(Sitios[math.random(#Sitios)]) nardis = spawnPlayer ( source, x, y, z, 0, math.random(0, 200) ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), respawn) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Nicolas ECM Posted February 18, 2014 Author Posted February 18, 2014 I have another problem when I die do not appear in the position indicated, respawning in the hospital help
MTA Team 0xCiBeR Posted February 18, 2014 MTA Team Posted February 18, 2014 Do you have any other resources Running such as Play or Similar? DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Nicolas ECM Posted February 18, 2014 Author Posted February 18, 2014 thanks and helped me, now I have a question could you tell me how to do that when I die and if skin changed eh aparesca before with this skin
MTA Team 0xCiBeR Posted February 19, 2014 MTA Team Posted February 19, 2014 This should do the trick: Sitios = { {459.77969360352, -1968.7708740234, 8.6134691238403}, {-2533.9658203125, -1618.890625, 526.56469726563}, } function respawn () local x,y,z = unpack(Sitios[math.random(#Sitios)]) local skin = getElementModel ( source ) nardis = spawnPlayer ( source, x, y, z, 0, skin ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), respawn) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted February 19, 2014 MTA Team Posted February 19, 2014 Did you replace the code with the one i gave you? DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted February 19, 2014 MTA Team Posted February 19, 2014 Well...It should work, i'm going to test it when i can and see if it doesn't work. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
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