SA-MP Forums Archive
Lag - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Lag (/showthread.php?tid=575721)



Lag - NoDi522 - 29.05.2015

Okay so i just have one little question. Today I've made some Player3DTexts and when i enter the bank and turn around i get lag and about 5 fps because of 3d texts. There is 4 3D texts for /bank,/credit,/creditcarts,/makeaccount.
++ I know its because 3DTexts because when i removed them there was no lag

Any solutions? Thanks

PHOTO:

http://i.imgur.com/HeSznOc.jpg


Re: Lag - hossa - 29.05.2015

Does it lag for a few seconds or lag always ?

If it lags for few seconds, I usually freeze the player then move him to interior and wait few seconds then unfreeze him to avoid some fps drops.

If it lags always, Then try using streamer plugin and streamer callbacks.


Re: Lag - NoDi522 - 29.05.2015

It lags always. ++ I am using streamer plugin for objects and so on...


Re: Lag - Konverse - 29.05.2015

What version of windows did you use?


Re: Lag - NoDi522 - 03.06.2015

I am using windows 8. ? Does it matter?


AW: Lag - Kaliber - 03.06.2015

Are you sure you don't Create them in an Loop or rekursiv?

If not, then maybe use CreateDynamic3DTextLabel


Re: Lag - NoDi522 - 03.06.2015

I changed my code a bit and now it has just 2 texts and 2 pickups and it lags as before.

PHP код:
    new world GetPlayerVirtualWorld(playerid);
    if(
pWirtualWorld[playerid] != world)
    {
        
pWirtualWorld[playerid] = world;
    }
    if(
pWirtualWorld[playerid] == 1)
    {
        
Text[0] = CreatePlayer3DTextLabel(playerid,""COLOR_ZUTA"[BANK]\n\n{FFFFFF}OPCIJA: /banka",-1,1447.2296,-1004.8912,1301.5193,30.0);
        
Pickup[0] = CreatePickup(1239,1,1447.2296,-1004.8912,1301.5193,1);
        
Text[1] = CreatePlayer3DTextLabel(playerid,""COLOR_ZUTA"[BANK]\n\n{FFFFFF}OPCIJA: /kredit",-1,1441.5874,-1004.8845,1301.5193,30.0);
        
Pickup[1] = CreatePickup(1239,1,1441.5874,-1004.8845,1301.5193,1);
    }
    else
    {
        
DestroyPickup(Pickup[0]);
        
DestroyPickup(Pickup[1]);
        
DeletePlayer3DTextLabel(playerid,Text[0]);
        
DeletePlayer3DTextLabel(playerid,Text[1]);
    } 



Re: Lag - NoDi522 - 03.06.2015

NVM guys i fixed it. So i just removed from "createplayerd3dtextlabel" player. That was causing lag