Kafka Posted December 7, 2011 Posted December 7, 2011 Hello, I've got a problem. I downloaded "bone_attach" resource, and i wanted to do little script, which will attach item when I type a command "/przyczep". I created a script, but it doesn't work. Please, help me (and don't say, that I'm noob, I'm not experienced scripter. Remember your first problem.) meta.xml: "Kafka" version="1.0.0" name="Przedmioty" description="Przyczepianie przedmiotow" type="script" /> przedmioty.lua local przedmiot = createObject( 1210,0,0,0 ) local gracz = getLocalPlayer function przyczepPrzedmiot exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0) end addCommandHandler ( "przyczep", przyczepPrzedmiot ) And one thing more, I DON'T want attach script from "briefcaserace". Thanks
12p Posted December 7, 2011 Posted December 7, 2011 (and don't say, that I'm noob, I'm not experienced scripter. Remember your first problem.) Only the real noob, childish scripters do that. Relax przedmioty.lua local przedmiot = createObject( 1210,0,0,0 ) local gracz = getLocalPlayer () --You forgot parenthesis function przyczepPrzedmiot exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0) end addCommandHandler ( "przyczep", przyczepPrzedmiot )
Kafka Posted December 7, 2011 Author Posted December 7, 2011 I don't undestand... Line 5: exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0)
12p Posted December 7, 2011 Posted December 7, 2011 That means there are parenthesis BEFORE exports. local przedmiot = createObject( 1210,0,0,0 ) local gracz = getLocalPlayer () --You forgot parenthesis function przyczepPrzedmiot () --Parenthesis here exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0) end addCommandHandler ( "przyczep", przyczepPrzedmiot ) Lol, my bad
Kafka Posted December 7, 2011 Author Posted December 7, 2011 BIG thanks It works! I'm gonna work on it now. Thanks again
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