Jump to content

Invisible Objects


BabY

Recommended Posts

Posted

Hi all Guys, Plesae Listen Carefully ...

When I Tried to add Collision Object in my Map ...

I Found a Problem ... the Object isn't Collisioned ... It's Regular and Hit Able ...

and I Made the "client.lua" File ...

Take a Look :

function startclient () 
  
  
    setElementCollisionsEnabled (vgncarshade1 (81), true) 
     
     
     
end 
  
addEventHandler( "onClientResourceStart", resourceRoot, startclient ) 
  

I Realy Don't know what is the Problem in my File ..

Plesae Help me Fast :D

[DMC]MI550 ;)

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

you can't do it this way. this is totally wrong

"vgncarshade1 (81)" is invalid reference to object, it's not even string

true means rather enabled than disabled :P

and im not sure if resourceRoot is hardcoded value

also explain exactly what you need to do?

disable collisions on all objects of one type?

or just disable on one specific object from map?

if 2nd:

  
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() 
  setElementCollisionsEnabled (getElementByID("vgncarshade1 (81)"), true) 
end) 
  

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

This Object only, "no. 81" :D

btw :-/

It is ...

NOT WORKING .

But, May I Ask a Qustion ?

I Have a Bug when I Test my map i RACE mod ... This Effect in Some scripts I Attached to the Map ?

and Thank you.

MI550

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

explain EXACTLY what do you want to achieve

And explain EXACTLY what bug are you getting. I can't understand you with your english..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Look

I Want to Make an Object in my RACE map to be Visible BUT ! I Can't Hit it ...

so ...

Help me :-[

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

Client-Side

addEventHandler('onClientResourceStart', resourceRoot,  
function () 
    Object1 = createObject ( objectID, x, y, z, 0, 0, 0 ) 
    setElementCollisionsEnabled (Object1, false) 
  
end 
) 

if im not wrong this should work

and if you want a vgncarshade it will be

    Object1 = createObject ( 3458, x, y, z, 0, 0, 0 )

at object1: you put the coordinates

at x, y, z

( in the map you dont add the object, the script will make it :D createObject

-----------------------------------------------------------------------------------------------------------------------------------------------

And your first code,

tell me how were u going to get the location and id of the object you want? :roll:

logo_left.png
Posted (edited)

lol

Iam tring it ...

Edited by Guest

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

Not Working ^^

This

Look at my FUCKIN Script File ...

addEventHandler('onClientResourceStart', resourceRoot,  
function () 
    Object1 = createObject ( 13647, 4170.9091796875, -446.18707275391, 2.7261011600494, 0, 180, 261.99096679688 ) 
    setElementCollisionsEnabled (Object1, false) 
  
end 
) 

I HATE MY SELF .

What I Made :

* Put the Line in meta.xml

* Made the Sript File

* Fucked by my self

...

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

Posted

is it creating that object or not?

because im not sure if resourceRoot is hardcoded variable, use getResourceRootElement(getThisResource()) instead.

and if its creating element but it's collidable - then idk whats wrong, never played with setElementCollisionsEnabled

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
istockphoto_5569062-angry-childish-face.jpg

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

  • Moderators
Posted (edited)

resourceRoot is hardcoded variable

but -

it takes a bit time for MTA to create object, so set a timer on like 100ms to apply the non colliding stuff

Edited by Guest
Posted

thanks zango.

MI550:

dont go offtopic, also stop using bad words please.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
thanks zango.

MI550:

dont go offtopic, also stop using bad words please.

I'am Sorry ...

resourceRoot is hardcoded variable

but -

it takes a bit time for MTA to create object, so set a timer on like 100ms to apply the non colliding stuff

How to Make this ? lol

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

  • Moderators
Posted
addEventHandler('onClientResourceStart', resourceRoot, 
function () 
    Object1 = createObject ( 13647, 4170.9091796875, -446.18707275391, 2.7261011600494, 0, 180, 261.99096679688 ) 
        setTimer ( 
            function () 
                setElementCollisionsEnabled (Object1, false) 
            end, 400, 1 
        ) 
end 
) 

Posted

Thank you Very Much !

It's Working and Cool 8)

I Realy, REALY Don't know How to Thank you :D

Thanks dzek for bearing my stupid questions as a noob. You helped me become a better programmer.

Now I understand how important it is to help those who SUCK at programming.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...