Large problem I need solved asap
#1

Im trying to script but I cant because my server is desynced so I cant work with my partner, you can talk, but you cant see the other person move or anything, it updates their position anywhere from 5 minutes to 40 minutes...

PLEASE HELP ME!!!
Reply
#2

Either your server is a piece of crap or the script is, If it takes 5 - 40 minutes for it to update that must be some major lag problems.
Reply
#3

Thanks for the constructive feedback, but it was working fine till today. I must have made some kind of ajustment to the script to make this happen, Im just asking if anyone has any idea why this may happen. I have great internet too. So its not that. I also have a very good computer. So its the script.
Reply
#4

Quote:
Originally Posted by Tyler_Idy
View Post
Thanks for the constructive feedback, but it was working fine till today. I must have made some kind of ajustment to the script to make this happen, Im just asking if anyone has any idea why this may happen. I have great internet too. So its not that. I also have a very good computer. So its the script.
Well its likely something to do with timers or OnPlayerUpdate, Have you done anything with either of the 2 lately?
Reply
#5

I made a timer to update the vehicle in my server, and I dont use OnPlayerUpdate yet.
Reply
#6

Quote:
Originally Posted by Tyler_Idy
View Post
I made a timer to update the vehicle in my server, and I dont use OnPlayerUpdate yet.
"update the vehicle", Can you be more clear about this?.
Reply
#7

Every second it checks the vehicle.

Here is the code:

Code:
public UpdateCars()
{
    new i,c,close;
    new Float:X,Float:Y,Float:Z;
	CheckLockedCars();
	car:
	if(c<800)
	{
	    if(CarDestroy[c] == 1)
	    {
	    	iplayers:
	    	if(i<MAX_PLAYERS)
	    	{
	    	    if(IsPlayerConnected(i))
	    		{
	    	    	GetVehiclePos(c,X,Y,Z);
	    	    	if(IsPlayerInRangeOfPoint(i,70,X,Y,Z))
	    	    	{
	    	    	    close++;
					}
				}
				i++;
				goto iplayers;
			}
			if(close==0)
			{
			    if(CarDestroy[c] == 1)
			    {
			        DestroyVehicle©;
			        CarDestroy[c] = 0;
				}
			}
		}
		c++;
		close=0;
		goto car;
	}
	return 1;
}
Reply
#8

Well updating every vehicle every second might be a bitting laggy...

Might want to remove that unless its completely necessary...

There are most likely better options then that anyways.
Reply
#9

What are some more sucsessful ways of achiving this?
Reply
#10

if(IsPlayerInRangeOfPoint(i,70,X,Y,Z))?

well.. like every 30 sec -1 min cus 70 is really far.. thats almost like whole of ls lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)