Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Kewun on Aug 21, 2016, 08:58 AM

Title: Few Suggetsions, yet again
Post by: Kewun on Aug 21, 2016, 08:58 AM
[Server] event onPlayerPassRedLightTrafficLight
[Server] function player.FadeCamera
[Server] event onPlayerPassGreenLightTrafficLight


would be cool to also see synced traffic lights. ( i think they are synced ? )

You know the idea, i want to add a rp  feature when player drives past red light, gets fined with $200 in game

plz add those events !!! :
Title: Re: Few Suggetsions, yet again
Post by: Xmair on Aug 21, 2016, 12:20 PM
This can be done with scripting.
Title: Re: Few Suggetsions, yet again
Post by: KAKAN on Aug 21, 2016, 12:29 PM
Quote from: Xmair on Aug 21, 2016, 12:20 PMThis can be done with scripting.
but not efficient and will consume much time. Synced traffic lights are something which is needed for a good racing/rpg server.
Title: Re: Few Suggetsions, yet again
Post by: DizzasTeR on Aug 21, 2016, 01:22 PM
The only thing needed is synced traffic lights and a function to set their state ( red/yellow/green ). If that's done then you can achieve what he wants.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 21, 2016, 01:23 PM
i just wish these functions and events get added 8) i want use them for my rp serv
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 21, 2016, 01:25 PM
Quote from: Xmair on Aug 21, 2016, 12:20 PMThis can be done with scripting.

done with scripting already??? impossible.

well possible, if using distance shits and saving and timers and shit but takes way too long time

but would be better to see those events functions
Title: Re: Few Suggetsions, yet again
Post by: Xmair on Aug 21, 2016, 03:42 PM
"Impossible" is "possible". A hint would be "objects".
http://viceunderdogs.com/index.php?topic=6718.0
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 21, 2016, 03:49 PM
lol ill have to try   laziness too much coding
Title: Re: Few Suggetsions, yet again
Post by: Murdock on Aug 21, 2016, 10:19 PM
Traffic lights are not synced. I suggest making a custom object with 2dfx to create a custom traffic light
Title: Re: Few Suggetsions, yet again
Post by: Stormeus on Aug 21, 2016, 10:52 PM
Quote from: KAKAN on Aug 21, 2016, 12:29 PM
Quote from: Xmair on Aug 21, 2016, 12:20 PMThis can be done with scripting.
but not efficient and will consume much time.

Hint: those functions wouldn't be efficient for us to implement in the client/server architecture either.

As far as synced traffic lights go, we already had an implementation for it done, but it's been disabled for now due to warping issues.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 22, 2016, 06:11 AM
Quote from: Stormeus on Aug 21, 2016, 10:52 PM
Quote from: KAKAN on Aug 21, 2016, 12:29 PM
Quote from: Xmair on Aug 21, 2016, 12:20 PMThis can be done with scripting.
but not efficient and will consume much time.

Hint: those functions wouldn't be efficient for us to implement in the client/server architecture either.

As far as synced traffic lights go, we already had an implementation for it done, but it's been disabled for now due to warping issues.

so will it be in future?
Title: Re: Few Suggetsions, yet again
Post by: Stormeus on Aug 22, 2016, 01:38 PM
Quote from: Kewun on Aug 22, 2016, 06:11 AM
Quote from: Stormeus on Aug 21, 2016, 10:52 PM
Quote from: KAKAN on Aug 21, 2016, 12:29 PM
Quote from: Xmair on Aug 21, 2016, 12:20 PMThis can be done with scripting.
but not efficient and will consume much time.

Hint: those functions wouldn't be efficient for us to implement in the client/server architecture either.

As far as synced traffic lights go, we already had an implementation for it done, but it's been disabled for now due to warping issues.

so will it be in future?

Yes.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 22, 2016, 02:19 PM
cool then, time to smoke patience.

edit: damn i want so super hardly those events ;v
Title: Re: Few Suggetsions, yet again
Post by: KAKAN on Aug 22, 2016, 06:26 PM
Quote from: Kewun on Aug 22, 2016, 02:19 PMedit: damn i want so super hardly those events ;v
Quote from: Murdock on Aug 21, 2016, 10:19 PMTraffic lights are not synced. I suggest making a custom object with 2dfx to create a custom traffic light
If you implement events, then it will be the same as onPlayerMove.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 22, 2016, 06:42 PM
then if i use onplayer move..

function onPlayerMove(player, .. other params 'n' shits )
{
if ( player.Pos.Distance(Vector(953,953,953) < 1 )
{
if ( FindObject(0).Model == redlight) {
MessagePlayer("you will be fined because you drived trought red light",player)
player.Cash -= 500;
}
}

and i get like 10 spam messages of this :/
Title: Re: Few Suggetsions, yet again
Post by: KAKAN on Aug 23, 2016, 08:32 AM
because the event is called even when your X, Y or Z has a change of value of 0.001
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Aug 23, 2016, 08:36 AM
so what

using 0.5 instead of 1 ?
Title: Re: Few Suggetsions, yet again
Post by: KAKAN on Aug 23, 2016, 09:14 AM
Quote from: Kewun on Aug 23, 2016, 08:36 AMso what

using 0.5 instead of 1 ?
lol no. Either take a array and set it to true when the player is near it else make it false.
Or
if the change in X, Y or Z is less than 0.9, stop the function.( return or break will do the work I think, but it might make the player unable to move ).
something like:-
isonred <- array( 100, false );
function onPlayerMove( player, X, Y, Z, oldX, oldY, oldZ ){
if( objectNearThePlayer ){
if( isonred[ player.ID ] ) break;
//your code.
isonred[ player.ID ] = true;
}
When your work is done, set that array to false.
And I suggest you to make a timer instead of using that command.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Sep 06, 2016, 05:51 PM
we need player.FadeCamera
Title: Re: Few Suggetsions, yet again
Post by: KAKAN on Sep 06, 2016, 05:56 PM
Quote from: Kewun on Sep 06, 2016, 05:51 PMwe need player.FadeCamera
wtf is that? And too, no one needs it.
Title: Re: Few Suggetsions, yet again
Post by: Kewun on Sep 06, 2016, 06:01 PM
for example fading a player's camera

like when you get shoot you can fade the camera with red for 500 miliseconds
Title: Re: Few Suggetsions, yet again
Post by: Shadow on Sep 06, 2016, 07:06 PM
Quote from: Kewun on Sep 06, 2016, 06:01 PMfor example fading a player's camera

like when you get shoot you can fade the camera with red for 500 miliseconds

...which can be achieved on clientside by gradually changing a window's transparency over time....