Large problem I need solved asap -
Tyler_Idy - 05.08.2010
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!!!
Re: Large problem I need solved asap -
Mr187 - 05.08.2010
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.
Re: Large problem I need solved asap -
Tyler_Idy - 05.08.2010
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.
Re: Large problem I need solved asap -
Mr187 - 05.08.2010
Quote:
Originally Posted by Tyler_Idy
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?
Re: Large problem I need solved asap -
Tyler_Idy - 05.08.2010
I made a timer to update the vehicle in my server, and I dont use OnPlayerUpdate yet.
Re: Large problem I need solved asap -
Mr187 - 05.08.2010
Quote:
Originally Posted by Tyler_Idy
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?.
Re: Large problem I need solved asap -
Tyler_Idy - 05.08.2010
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;
}
Re: Large problem I need solved asap -
marharth - 05.08.2010
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.
Re: Large problem I need solved asap -
Tyler_Idy - 05.08.2010
What are some more sucsessful ways of achiving this?
Re: Large problem I need solved asap -
Kar - 05.08.2010
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