DhrJay Posted December 22, 2012 Share Posted December 22, 2012 Hi! I want to add dimention and interiour to this script... I made it like this: What did I do wrong? function changePos( attacker, weapon, bodypart, loss ) if (weapon == 5) then setElementPosition(source, -2616.5964, -2823.8984, 5.7695) interior=0 dimention=0 end end addEventHandler("onPlayerDamage", root, changePos) Link to comment
uhm Posted December 22, 2012 Share Posted December 22, 2012 you can't just set some variable, you need to use functions for that check out the wiki to find out which function you need function changePos( attacker, weapon, bodypart, loss ) if (weapon == 5) then setElementPosition(source, -2616.5964, -2823.8984, 5.7695) setElementInterior (source, 0 ) --interior=0 setElementDimension (source, 0 ) --dimention=0 end end addEventHandler("onPlayerDamage", root, changePos) Link to comment
DhrJay Posted December 22, 2012 Author Share Posted December 22, 2012 you can't just set some variable, you need to use functions for thatcheck out the wiki to find out which function you need function changePos( attacker, weapon, bodypart, loss ) if (weapon == 5) then setElementPosition(source, -2616.5964, -2823.8984, 5.7695) setElementInterior (source, 0 ) --interior=0 setElementDimension (source, 0 ) --dimention=0 end end addEventHandler("onPlayerDamage", root, changePos) Hi! Yeah, I really am trying to learn from the Wiki... I just don't know where everything should be in the script... Tnks anyways! You're awesome! 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