SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. -
mFather - 09.01.2015
Hello, i have one problem, when i was in server with few playaers in server going strange things. Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. Also when (this things disappears and in few seconds appears if i in vehicle re-work OnPlayerStateChange callback, i see it because i was be in vehicle, i dont know for other callbacks.)
You can see photos when in server all fine, and when starting disappears magic.
This is when i see play and car(all cars you can see in minimap):

This is when player, car disappears (all cars you can see in minimap)(objects was in place, i dont know why, but sometimes and objects disappears):
ITS NOT ONLY FOR ME, ITS FOR ALL SERVER PLAYERS.
Thanx all for help, and sorry for my bad english.
Re: SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. -
RedFusion - 09.01.2015
Maybe you're being set to another virtual world?
Or maybe you're returning 0 in your OnPlayerUpdate callback at some point, that might cause this.
I'm not sure though.
Re: SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. -
mFather - 09.01.2015
Quote:
Originally Posted by RedFusion
Maybe you're being set to another virtual world?
Or maybe you're returning 0 in your OnPlayerUpdate callback at some point, that might cause this.
I'm not sure though.
|
Virtual World is good, same for all. OnPlayerUpdate i have this code
Код:
public OnPlayerUpdate(playerid)
{
SpeedoUpdate(playerid);
static s_iVehicle;
if(g_fSpeedCap[playerid] != 0.0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
s_iVehicle = GetPlayerVehicleID(playerid);
if (s_iVehicle)
{
static Float:s_fX, Float:s_fY, Float:s_fZ, Float:s_fVX, Float:s_fVY, Float:s_fVZ;
GetVehiclePos(s_iVehicle, s_fX, s_fY, s_fZ);
GetVehicleVelocity(s_iVehicle, s_fVX, s_fVY, s_fVZ);
if(!IsPlayerInRangeOfPoint(playerid, g_fSpeedCap[playerid] + 0.05, s_fX + s_fVX, s_fY + s_fVY, s_fZ + s_fVZ))
{
static Float:s_fLength;
s_fLength = floatsqroot((s_fVX * s_fVX) + (s_fVY * s_fVY) + (s_fVZ * s_fVZ));
s_fVX = (s_fVX / s_fLength) * g_fSpeedCap[playerid];
s_fVY = (s_fVY / s_fLength) * g_fSpeedCap[playerid];
s_fVZ = (s_fVZ / s_fLength) * g_fSpeedCap[playerid];
if(s_iVehicle)
{
SetVehicleVelocity(s_iVehicle, s_fVX, s_fVY, s_fVZ);
}
else
{
SetPlayerVelocity(playerid, s_fVX, s_fVY, s_fVZ);
}
}
}
}
return 1;
}
stock SpeedoUpdate(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid), msg[40], Float:vHP,;
if(vehicleid == 0) return 1;
format(msg, 40, "~w~Bukle: ~g~~h~%.1f%~w~%%", vHP);
PlayerTextDrawSetString(playerid, SpidometroPlayerTD[playerid][5], msg);
}
In server i have 13.000 Objects (300 Original CreateObjects), but I do not think that problem here.(In Objects)