Jump to content

server-side createObject


Fury

Recommended Posts

Posted

hey guys, i have a problem with createObject. i have a moving object which players can move it by touching with car. my problem is every player has a different object. i mean there is one object created by createObject function, but movement of the object is different for every player. how can i make a "object with a server-side movement"? i hope you get what i am saying.

thanks :P

Destruction Derby

Posted

I don't really understand what do you mean, how could the movement be different if the object is server side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
I don't really understand what do you mean, how could the movement be different if the object is server side?

well i dont know too but it is. by the way im not using any function to move the object.

edit: if i can use moveObject(server-side) when car touches the object it can be the same movement for every player. am i right?

Edited by Guest

Destruction Derby

Posted
I don't really understand what do you mean, how could the movement be different if the object is server side?

well i dont know too but it is. by the way im not using any function to move the object.

edit: if i can use moveObject when car touches the object it can be the same movement for every player. am i right?

Put your script.

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

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

Posted
I don't really understand what do you mean, how could the movement be different if the object is server side?

well i dont know too but it is. by the way im not using any function to move the object.

edit: if i can use moveObject when car touches the object it can be the same movement for every player. am i right?

Put your script.

i know its not usable but the idea of moving object in server-side seems to workable:

top = createObject ( 1222, 66, -4038.732421875, 21) 
top_arena = createColRectangle ( 66, -4038.732421875, 1, 50 ) 
function onPlayerTouchesTheBall(source) 
    local x,y,z = getElementPosition( top ) 
    moveObject ( top, 1000, x+10, y+10, z+2 ) 
end 
addEventHandler ( "onColShapeHit", top_arena, onPlayerTouchesTheBall ) 

is there a any function that detects when one object touches another object?

Destruction Derby

  • Moderators
Posted

Not really, but there is something called:

https://wiki.multitheftauto.com/wiki/ProcessLineOfSight

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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...