zocken212 Posted July 28, 2013 Posted July 28, 2013 Hey, I have a problem with createObject.I don't know why it doesn't work in this script, but in all other scripts it works.. lolwut function onResourceStartDoThis() local leadShader = createObject(8838,2948.1564941406,-3046.544921875,-10.287460327148,0,0,91.007263183594) local shipParts1 = createObject(5167,2954.525390625,-3013.8371582031,8.9695568084717,0,0,90) local shipParts2 = createObject(5160,2954.525390625,-3015.7006835938,8.9695568084717,0,0,90) local shipParts3 = createObject(5166,2954.5446777344,-3015.7026367188,8.9695568084717,0,0,90) local shipParts4 = createObject(5158,2946.6257324219,-3159.0061035156,15.628360748291,0,0,180) local shipParts5 = createObject(5155,2946.4465332031,-3135.0407714844,24.955896377563,0,0,90) local shipParts6 = createObject(5156,2946.4440917969,-3071.3764648438,14.663120269775,0,0,90) local shipParts7 = createObject(5154,2946.544921875,-3046.2358398438,19.418611526489,0,0,90) local shipParts8 = createObject(5157,2946.4467773438,-2962.5090332031,20.719650268555,0,0,90) attachElements(shipParts1,leadShader) attachElements(shipParts2,leadShader) attachElements(shipParts3,leadShader) attachElements(shipParts4,leadShader) attachElements(shipParts5,leadShader) attachElements(shipParts6,leadShader) attachElements(shipParts7,leadShader) attachElements(shipParts8,leadShader) end addEventHandler("onResourceStart",getResourceRootElement(),onResourceStartDoThis) That's the current script, serverside.
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 function onResourceStartDoThis() local leadShader = createObject(8838,2948.1564941406,-3046.544921875,-10.287460327148,0,0,91.007263183594) local shipParts1 = createObject(5167,2954.525390625,-3013.8371582031,8.9695568084717,0,0,90) local shipParts2 = createObject(5160,2954.525390625,-3015.7006835938,8.9695568084717,0,0,90) local shipParts3 = createObject(5166,2954.5446777344,-3015.7026367188,8.9695568084717,0,0,90) local shipParts4 = createObject(5158,2946.6257324219,-3159.0061035156,15.628360748291,0,0,180) local shipParts5 = createObject(5155,2946.4465332031,-3135.0407714844,24.955896377563,0,0,90) local shipParts6 = createObject(5156,2946.4440917969,-3071.3764648438,14.663120269775,0,0,90) local shipParts7 = createObject(5154,2946.544921875,-3046.2358398438,19.418611526489,0,0,90) local shipParts8 = createObject(5157,2946.4467773438,-2962.5090332031,20.719650268555,0,0,90) attachElements(shipParts1,leadShader) attachElements(shipParts2,leadShader) attachElements(shipParts3,leadShader) attachElements(shipParts4,leadShader) attachElements(shipParts5,leadShader) attachElements(shipParts6,leadShader) attachElements(shipParts7,leadShader) attachElements(shipParts8,leadShader) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),onResourceStartDoThis)
zocken212 Posted July 28, 2013 Author Posted July 28, 2013 Debugscript 3 says nothing... No error, forgotten ( or )...
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 Ship is still not appearing The ship or the parts.
zocken212 Posted July 28, 2013 Author Posted July 28, 2013 Yea, I mean the shipparts. Also the shader is not appearing.
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 That because you attached them, try to remove all attachElement.
zocken212 Posted July 28, 2013 Author Posted July 28, 2013 I removed that attachElements, but still no object is appearing...
HunT Posted July 28, 2013 Posted July 28, 2013 The script work but u can't view the objects if not u press "test" or F5 F5 or Test + /start "name resource" function onResourceStartDoThis() local leadShader = createObject(8838,2948.1564941406,-3046.544921875,-10.287460327148,0,0,91.007263183594) local shipParts1 = createObject(5167,2954.525390625,-3013.8371582031,8.9695568084717,0,0,90) local shipParts2 = createObject(5160,2954.525390625,-3015.7006835938,8.9695568084717,0,0,90) local shipParts3 = createObject(5166,2954.5446777344,-3015.7026367188,8.9695568084717,0,0,90) local shipParts4 = createObject(5158,2946.6257324219,-3159.0061035156,15.628360748291,0,0,180) local shipParts5 = createObject(5155,2946.4465332031,-3135.0407714844,24.955896377563,0,0,90) local shipParts6 = createObject(5156,2946.4440917969,-3071.3764648438,14.663120269775,0,0,90) local shipParts7 = createObject(5154,2946.544921875,-3046.2358398438,19.418611526489,0,0,90) local shipParts8 = createObject(5157,2946.4467773438,-2962.5090332031,20.719650268555,0,0,90) attachElements(shipParts1,leadShader) attachElements(shipParts2,leadShader) attachElements(shipParts3,leadShader) attachElements(shipParts4,leadShader) attachElements(shipParts5,leadShader) attachElements(shipParts6,leadShader) attachElements(shipParts7,leadShader) attachElements(shipParts8,leadShader) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),onResourceStartDoThis)
zocken212 Posted July 28, 2013 Author Posted July 28, 2013 Thank you, it works. But the ship looks somehow not like it should be. The end is at the front, all parts are almost under the water and so on???
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