[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 !!! :
This can be done with scripting.
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.
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.
i just wish these functions and events get added 8) i want use them for my rp serv
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
"Impossible" is "possible". A hint would be "objects".
http://viceunderdogs.com/index.php?topic=6718.0
lol ill have to try laziness too much coding
Traffic lights are not synced. I suggest making a custom object with 2dfx to create a custom traffic light
Quote from: KAKAN on Aug 21, 2016, 12:29 PMQuote 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.
Quote from: Stormeus on Aug 21, 2016, 10:52 PMQuote from: KAKAN on Aug 21, 2016, 12:29 PMQuote 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?
Quote from: Kewun on Aug 22, 2016, 06:11 AMQuote from: Stormeus on Aug 21, 2016, 10:52 PMQuote from: KAKAN on Aug 21, 2016, 12:29 PMQuote 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.
cool then, time to smoke patience.
edit: damn i want so super hardly those events ;v
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.
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 :/
because the event is called even when your X, Y or Z has a change of value of 0.001
so what
using 0.5 instead of 1 ?
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.
we need player.FadeCamera
Quote from: Kewun on Sep 06, 2016, 05:51 PMwe need player.FadeCamera
wtf is that? And too, no one needs it.
for example fading a player's camera
like when you get shoot you can fade the camera with red for 500 miliseconds
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....