Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Luis_Labarca on Mar 17, 2017, 02:56 AM

Title: Object in Client-Side
Post by: Luis_Labarca on Mar 17, 2017, 02:56 AM
Hi guys, is there any way to tell if I'm near an object on the client side

I saw these functions but I do not know if you can
Property Type (read-only)
Type: int
The type of this entity, always OBJ_BUILDING.

Property ModelIndex (read-only)
Type: int

Property Position (read-only)
Type: Vector
Title: Re: Object in Client-Side
Post by: EK.IceFlake on Mar 17, 2017, 04:02 AM
1. Write a distance function using the Pythagorean theorem.
2. Compare World.FindLocalPlayer().Position with object.Position.
Title: Re: Object in Client-Side
Post by: vito on Mar 17, 2017, 05:54 AM
Well if you shoot an object it may be used to get model ID (useful for map editing/debugging). No any more cases to using that. Client side has no functions to do what you want (I hope - yet). So currently you need to transfer tons of data from/to server to make clientside powerful.
Title: Re: Object in Client-Side
Post by: Luis_Labarca on Mar 17, 2017, 12:51 PM
Quote from: EK.IceFlake on Mar 17, 2017, 04:02 AM1. Write a distance function using the Pythagorean theorem.
2. Compare World.FindLocalPlayer().Position with object.Position.
thanks bro
Title: Re: Object in Client-Side
Post by: Luis_Labarca on Mar 17, 2017, 12:51 PM
Quote from: vito on Mar 17, 2017, 05:54 AMWell if you shoot an object it may be used to get model ID (useful for map editing/debugging). No any more cases to using that. Client side has no functions to do what you want (I hope - yet). So currently you need to transfer tons of data from/to server to make clientside powerful.
Not only I need is what of object.pos and I will try to do what I think to see rsi me works
Title: Re: Object in Client-Side
Post by: Luis_Labarca on Mar 17, 2017, 01:47 PM
Quote from: EK.IceFlake on Mar 17, 2017, 04:02 AM1. Write a distance function using the Pythagorean theorem.
2. Compare World.FindLocalPlayer().Position with object.Position.
Gg I do not know how to identify an object from client-side and how the distance could give me an example
Title: Re: Object in Client-Side
Post by: vito on Mar 17, 2017, 05:51 PM
well It's not possible to get object ID in client side, only model ID and only via shooting (as i know)
Title: Re: Object in Client-Side
Post by: Luis_Labarca on Mar 18, 2017, 12:48 AM
Quote from: vito on Mar 17, 2017, 05:51 PMwell It's not possible to get object ID in client side, only model ID and only via shooting (as i know)
ok thanks bro
Title: Re: Object in Client-Side
Post by: kennedyarz on Mar 18, 2017, 11:45 PM
Quote from: vito on Mar 17, 2017, 05:51 PMwell It's not possible to get object ID in client side, only model ID and only via shooting (as i know)

Or set as constant const table = "500";

Oks No xD