Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Saiyan Attack on Sep 14, 2017, 06:19 PM

Title: Positions For Race System
Post by: Saiyan Attack on Sep 14, 2017, 06:19 PM
Hello everyone !!

I need help for making position system in race i saw in gta vice city RC bandit Race that player can seen their position when someone left back .... is that possible that we can make the same position system in vcmp ?? if yes then how ?

sorry for my bad english :'(
Title: Re: Positions For Race System
Post by: Saiyan Attack on Sep 16, 2017, 05:38 AM
bump help please :'( !!
Title: Re: Positions For Race System
Post by: Mahmoud Tornado on Sep 16, 2017, 03:48 PM
Quote from: Saiyan Attack on Sep 14, 2017, 06:19 PMHello everyone !!

I need help for making position system in race i saw in gta vice city RC bandit Race that player can seen their position when someone left back .... is that possible that we can make the same position system in vcmp ?? if yes then how ?

sorry for my bad english :'(
you wanna Vectors ?
X=
Y=
Z=
??
Title: Re: Positions For Race System
Post by: Saiyan Attack on Sep 16, 2017, 05:23 PM
no buddy i want position system for racers which show you, your position from your opponents. and i only know that distance are require for this but i don't know how it works ! i try it but failed cause i don't know how to run distance minus direction
here is an example of positions ....
(https://i.solidfiles.com/YnnYqk34zv8De.jpg)
(https://i.solidfiles.com/V44n7kKYZKmdw.jpg)
Title: Re: Positions For Race System
Post by: Shadow on Sep 16, 2017, 10:43 PM
Here is how I do it in my plugin. Check out this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-396) function.

The most important lines are this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-420) and this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-433)
Title: Re: Positions For Race System
Post by: Mahmoud Tornado on Sep 17, 2017, 10:09 AM
Quote from: Saiyan Attack on Sep 16, 2017, 05:23 PMno buddy i want position system for racers which show you, your position from your opponents. and i only know that distance are require for this but i don't know how it works ! i try it but failed cause i don't know how to run distance minus direction
here is an example of positions ....
(https://i.solidfiles.com/YnnYqk34zv8De.jpg)
(https://i.solidfiles.com/V44n7kKYZKmdw.jpg)
sry i don't know how :( i am sry :(
Title: Re: Positions For Race System
Post by: Saiyan Attack on Sep 17, 2017, 11:27 AM
Quote from: Shadow on Sep 16, 2017, 10:43 PMHere is how I do it in my plugin. Check out this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-396) function.

The most important lines are this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-420) and this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-433)
Thanks @Shadow sir but will you explain me little bit about leftgap, heading, Vector3 ?
Quote from: Mahmoud Tornado on Sep 17, 2017, 10:09 AM
Quote from: Saiyan Attack on Sep 16, 2017, 05:23 PMno buddy i want position system for racers which show you, your position from your opponents. and i only know that distance are require for this but i don't know how it works ! i try it but failed cause i don't know how to run distance minus direction
here is an example of positions ....
(https://i.solidfiles.com/YnnYqk34zv8De.jpg)
(https://i.solidfiles.com/V44n7kKYZKmdw.jpg)
sry i don't know how :( i am sry :(
It's okay friend don't you worry about it !!
Title: Re: Positions For Race System
Post by: KAKAN on Sep 17, 2017, 01:32 PM
Quote from: Saiyan Attack on Sep 17, 2017, 11:27 AM
Quote from: Shadow on Sep 16, 2017, 10:43 PMHere is how I do it in my plugin. Check out this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-396) function.

The most important lines are this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-420) and this (https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4/src/547c3581ddf6ddc3d10867deba490d4d04d0c303/RaceSystem.cpp?at=master#RaceSystem.cpp-433)
Thanks @Shadow sir but will you explain me little bit about leftgap, heading, Vector3 ?
Shadow( to himself ): I shouldn't have said that, I shouldn't have said that.
Title: Re: Positions For Race System
Post by: Shadow on Sep 17, 2017, 03:04 PM
leftgap is a constant that acts as the distance between the left and the right columns of cars. heading is the vehicle angle by which you spawn the grid (the orientation of the first checkpoint is what I choose as heading for the generation) and I'll let you guess what Vector3 could be..

@KAKAN perhaps
Title: Re: Positions For Race System
Post by: Saiyan Attack on Sep 20, 2017, 06:59 PM
Thanks @Shadow I understand !!
topic locked !!