kecskebeka Posted October 28, 2016 Share Posted October 28, 2016 Hello, please help me. :) login/sourceS.lua:101: attempt to compare number with nil addEvent("Login->Try-Spawn",true) addEventHandler("Login->Try-Spawn",getRootElement(),function(Jatekos,X,Y,Z,SKIN,Interior,Dimenzio) spawnPlayer(Jatekos,X,Y,Z) setElementModel(Jatekos, SKIN) setElementInterior(Jatekos,Interior) setElementDimension(Jatekos,Dimenzio) exports['mx_achievement']:givePlayerAchievement(Jatekos,2) setElementData(Jatekos, "loggedIn", true) setTimer(function() if (tonumber(getElementData(Jatekos,"jail->Time")) > 0 ) then setElementDimension(Jatekos, 65400+getElementData(Jatekos, "acc.accountID")) setElementInterior(Jatekos, 6) setCameraInterior(Jatekos, 6) setElementPosition(Jatekos, 263.821807, 77.848365, 1001.0390625) setPedRotation(Jatekos, 267.438446) local jailTimer = setTimer(function() exports['mx_admin']:timerUnjailPlayer(Jatekos) end, 1000*60,getElementData(Jatekos,"jail->Time")) setElementData(Jatekos, "jail->Timer", jailTimer) setElementData(Jatekos, "jail->Time", getElementData(Jatekos,"jail->Time")) setElementData(Jatekos, "jail->Jailtime", getElementData(Jatekos,"jail->Time")) toggleControl(Jatekos,'next_weapon',false) toggleControl(Jatekos,'previous_weapon',false) toggleControl(Jatekos,'fire',false) toggleControl(Jatekos,'aim_weapon',false) setPedWeaponSlot(Jatekos,0) end end,2000,1) end) Thanx Link to comment
GTX Posted October 28, 2016 Share Posted October 28, 2016 Try this: addEvent("Login->Try-Spawn",true) addEventHandler("Login->Try-Spawn",getRootElement(),function(Jatekos,X,Y,Z,SKIN,Interior,Dimenzio) spawnPlayer(Jatekos,X,Y,Z) setElementModel(Jatekos, SKIN) setElementInterior(Jatekos,Interior) setElementDimension(Jatekos,Dimenzio) exports['mx_achievement']:givePlayerAchievement(Jatekos,2) setElementData(Jatekos, "loggedIn", true) setTimer(function() if (tonumber(getElementData(Jatekos,"jail->Time") or 0) > 0 ) then setElementDimension(Jatekos, 65400+getElementData(Jatekos, "acc.accountID")) setElementInterior(Jatekos, 6) setCameraInterior(Jatekos, 6) setElementPosition(Jatekos, 263.821807, 77.848365, 1001.0390625) setPedRotation(Jatekos, 267.438446) local jailTimer = setTimer(function() exports['mx_admin']:timerUnjailPlayer(Jatekos) end, 1000*60,getElementData(Jatekos,"jail->Time")) setElementData(Jatekos, "jail->Timer", jailTimer) setElementData(Jatekos, "jail->Time", getElementData(Jatekos,"jail->Time")) setElementData(Jatekos, "jail->Jailtime", getElementData(Jatekos,"jail->Time")) toggleControl(Jatekos,'next_weapon',false) toggleControl(Jatekos,'previous_weapon',false) toggleControl(Jatekos,'fire',false) toggleControl(Jatekos,'aim_weapon',false) setPedWeaponSlot(Jatekos,0) end end,2000,1) end) 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