h1ama3d Posted April 6, 2011 Share Posted April 6, 2011 (edited) Hello, I making script, It works, but I have only one problem, What script? : Script that I work, you can make a road from vgncarshade1 You can choose the pieces, and the distance between each piece, I have made the script for editor This is the code: Removed This is the EDF file: Removed But when I am Typing '/c' to make the road This is what is happening:( This is the EDF Element http://store2.up-00.com/Mar11/fL100715.jpg This is the Road, http://store2.up-00.com/Mar11/8QM00715.jpg Under water! why ? pls help me sorry For my Bad English and sorry i'am noob Edited April 7, 2011 by Guest Link to comment
proracer Posted April 6, 2011 Share Posted April 6, 2011 I don't think you made it.You say that you're noob .. if so then you wouldn't make so much "advanced" script. /me thinks this is stolen Also you forgot comma on the line 20. Link to comment
h1ama3d Posted April 6, 2011 Author Share Posted April 6, 2011 stolen ?! I made this script If you want to make sure, search for it, you will not find: @ I hate steal: @ Line No. 20 I took him from ggloop only!! The rest that I made: @ If you do not want to help me, why comment? and if i put comma :20:Bad argument @ 'call' Link to comment
Moderators Citizen Posted April 6, 2011 Moderators Share Posted April 6, 2011 I think he means this: call(getResourceFromName("editor"),"import",thisResource) You making a very hard script, you are a noob, and you forgot the () at getResourceFromName ? that's strange At line 20: why getElementsByType ? It's not getElementsByName ? Maybe there is a bad setElementData( ..., "posZ" ) for the first Carshade ? Link to comment
Kenix Posted April 6, 2011 Share Posted April 6, 2011 try to check all elements of date and in general all over outputChatBox local thisResource = getThisResource() local thisResourceRoot = getResourceRootElement(thisResource) function create (cmd,thePlayer) carsh = getElementsByType ( "Carshade" ) for theKey,ca in ipairs(carsh) do x = getElementData(ca, "posX") y = getElementData(ca, "posY") z = getElementData(ca, "posZ") p = getElementData(ca, "pieces") yy = getElementData(ca, "between") outputChatBox("Check Elements: "..tostring(x).." , "..tostring(y).. " , "..tostring(z).." , "..tostring(p).." , "..tostring(yy).." , "..tostring(carsh)) -- Check Elements for i=0,p do y = y + yy vcs1 = createObject(3458, x, y, z) setElementData(vcs1, "posX", x or 0) setElementData(vcs1, "posY", y or 0) setElementData(vcs1, "posZ", z or 0) end end call(getResourceFromName("editor"),"import",thisResource) destroyElement(thisResourceRoot) end addCommandHandler ( "c", create ) Link to comment
h1ama3d Posted April 6, 2011 Author Share Posted April 6, 2011 Check Elements: 3349.6772460938 , -1925.2801513672 , -2.3275413513184 , 20 , 5 , table: 02A49C28 x = 3309.162109375 y = -2029.51171875 z = -18.611539840698 ---------------------------------------------------------- I think he means this: call(getResourceFromName("editor"),"import",thisResource) You making a very hard script, you are a noob, and you forgot the () at getResourceFromName ? that's strange At line 20: why getElementsByType ? It's not getElementsByName ? Maybe there is a bad setElementData( ..., "posZ" ) for the first Carshade ? very hard script yeah ,, i'am noob yeah ,, but i make it ! ,, i put() but it's Does not work also ! ----------- i don't understand what you mean >< sorry ,, in line 20 i put call(getResourceFromName("editor"),"import",thisResource) not getElementsByType() Link to comment
Kenix Posted April 6, 2011 Share Posted April 6, 2011 try instead of 0 put another number setElementData(vcs1, "posZ", z or 0) maybe it will help, I honestly do not know Link to comment
Moderators Citizen Posted April 6, 2011 Moderators Share Posted April 6, 2011 Sorry I wanted to say line 5 instead of 20 Link to comment
h1ama3d Posted April 7, 2011 Author Share Posted April 7, 2011 try instead of 0 put another number setElementData(vcs1, "posZ", z or 0) maybe it will help, I honestly do not know ok ,, i change it to setElementData(vcs1, "posZ", z or 100) and now over the EDF element I will try to make it tight EDF Element Sorry I wanted to say line 5 instead of 20 I have tried it, and I change it to carsh = getElementsByName ( "Carshade" ) but attempt to call global 'getElementsByName' (a nil value) Can you help me pls ? Or will lose hope: ( Link to comment
proracer Posted April 7, 2011 Share Posted April 7, 2011 Firstly, getElementsByName doesn't exist. Replace it again as you did in your first post with getElementsByType. Also it's weird that you didn't understood why it's a nil value... you could search easily for that function and you could see that it doesn't exist, so you seem very suspicious. There's an error with creating the objects in specified area, it's not error with the object. Link to comment
h1ama3d Posted April 7, 2011 Author Share Posted April 7, 2011 Thanks guys, I tried another way instead of the EDF I Make a GUI window and has already succeeded Now, do I am a Noob or not? LoL http://store2.up-00.com/Mar11/uhX88029.jpg http://store2.up-00.com/Mar11/uhX88029.jpg but can i create button to Select the settings from the selected object? Thx Again ^.^ Link to comment
Moderators Citizen Posted April 7, 2011 Moderators Share Posted April 7, 2011 Nice work ! but can i create button to Select the settings from the selected object? Yes but if you only can get the settings from the server, you have to create a triggerClient/ServerEvent Link to comment
h1ama3d Posted April 7, 2011 Author Share Posted April 7, 2011 I've done it, and the script is ready for use ^.^ thank you very much Citizen ! <3 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