Kafka Posted December 7, 2011 Share 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 Link to comment
12p Posted December 7, 2011 Share 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 ) Link to comment
Kafka Posted December 7, 2011 Author Share Posted December 7, 2011 Hmm.. It still doesn't work Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 Any error using "/debugscript 3"? Link to comment
Kafka Posted December 7, 2011 Author Share Posted December 7, 2011 I don't undestand... Line 5: exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0) Link to comment
12p Posted December 7, 2011 Share 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 Link to comment
Kafka Posted December 7, 2011 Author Share Posted December 7, 2011 BIG thanks It works! I'm gonna work on it now. Thanks again 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