SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds.
#3

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)
Reply


Messages In This Thread
SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. - by mFather - 09.01.2015, 16:36
Re: SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. - by RedFusion - 09.01.2015, 16:49
Re: SAMP Players, Vehicles, Pickups, DynamicObjects disappears for few seconds. - by mFather - 09.01.2015, 17:37

Forum Jump:


Users browsing this thread: 2 Guest(s)