SA-MP Forums Archive
DEBUG Lag [+Reps For each help] - 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: DEBUG Lag [+Reps For each help] (/showthread.php?tid=514840)



DEBUG Lag [+Reps For each help] - SPA - 23.05.2014

Hello,
I v maked a video , which present some of objects which cause the lag as i think in my server, Some people saied that this objects are Too heavy that's why when someone spawn there they will lag for 2-5 seconds , I'v tried to change the host , but it's same , I'm using MYSQL admin system R6 Currently , but even thought that R6 it's must not lag , but my question that , does this objects really the main cause for lag , is it too heavy? , thanks for reading ! here is the video of the spawn place :-

CLICK HERE TO WATCh!


EDIT: Im using also "SetObjectMaterial" as object EXAMPLE CODE:
Код:
    //objects texturizer1 - Stryker420
    aerolv = CreateObject(8357, 1348.66309, 1389.34070, 9.93694,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(aerolv, 0, 18930, "matclothes", "BandanaRedish", 0);
    SetObjectMaterial(aerolv, 1, 18930, "matclothes", "BandanaRedish", 0);
    aerolv2 = CreateObject(8357, 1309.22986, 1389.32495, 9.93694,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(aerolv2, 0, 18930, "matclothes", "BandanaRedish", 0);
    SetObjectMaterial(aerolv2, 1, 18930, "matclothes", "BandanaRedish", 0);
    ramp9 = CreateObject(1655, -1723.83875, -429.83600, 17.91971,   18.00000, 0.00000, 133.00000);
    SetObjectMaterial(ramp9, 9, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp9, 5, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp9, 6, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp9, 2, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp9, 0, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    ramp10 = CreateObject(1655, -1719.38892, -425.59326, 14.05601,   0.00000, 0.00000, 133.31604);
    SetObjectMaterial(ramp10, 9, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp10, 5, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp10, 6, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp10, 2, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    SetObjectMaterial(ramp10, 0, 18937, "matclothes", "mp_bobbie_pompom2", 0);
    ramp3 = CreateObject(1655, -1597.98682, -2723.00610, 48.31440,   0.00000, 0.00000, 51.00000);
    SetObjectMaterial(ramp3, 9, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp3, 5, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp3, 6, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp3, 2, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp3, 0, 19055, "xmasboxes", "WrappingPaper1", 0);
    ramp4 = CreateObject(1655, -1603.06250, -2718.94116, 52.01933,   14.00000, 0.00000, 51.00000);
    SetObjectMaterial(ramp4, 9, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp4, 5, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp4, 6, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp4, 2, 19055, "xmasboxes", "WrappingPaper1", 0);
    SetObjectMaterial(ramp4, 0, 19055, "xmasboxes", "WrappingPaper1", 0);
    //objects texturizer2 - stryker420
    volcan = CreateObject(18752, -2878.34595, -480.73743, -15.67397,   0.00000, 0.00000, 349.52893);
    SetObjectMaterial(volcan, 0, 18782, "cookieramp1", "cookie", 0);
    spawn2 = CreateObject(9241, 2931.32202, -601.73492, 7.30632,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(spawn2, 1, 18971, "matclothes", "HatMap1", 0);
    SetObjectMaterial(spawn2, 2, 18971, "matclothes", "HatMap1", 0);
    SetObjectMaterial(spawn2, 3, 18971, "matclothes", "HatMap1", 0);
    casa = CreateObject(10300, -526.23840, 1932.64880, -0.05461,   0.00000, 0.00000, 165.96553);
    SetObjectMaterial(casa, 4, 19056, "xmasboxes", "WrappingPaper16", 0);
    ramp = CreateObject(1655, -1269.18433, 11.61099, 14.17218,   0.00000, 0.00000, -45.00000);
    SetObjectMaterial(ramp, 9, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp, 5, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp, 6, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp, 2, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp, 0, 18844, "mattextures", "waterclear256", 0);
    ramp1 = CreateObject(1655, -1265.01379, 15.74875, 17.56304,   14.00000, 0.00000, -45.00000);
    SetObjectMaterial(ramp1, 9, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp1, 5, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp1, 6, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp1, 2, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp1, 0, 18844, "mattextures", "waterclear256", 0);
    ramp2 = CreateObject(1655, -1261.27429, 19.52609, 22.59591,   28.00000, 0.00000, 315.00000);
    SetObjectMaterial(ramp2, 9, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp2, 5, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp2, 6, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp2, 2, 18844, "mattextures", "waterclear256", 0);
    SetObjectMaterial(ramp2, 0, 18844, "mattextures", "waterclear256", 0);
    stryker = CreateObject(9241, 543.17596, -1916.99561, 1.94547,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(stryker, 1, 18966, "matclothes", "BandanaCloth1", 0);
    SetObjectMaterial(stryker, 2, 18966, "matclothes", "BandanaCloth1", 0);
    aa = CreateObject(17031, 246.85843, 2547.27954, 13.27128,   0.00000, 0.00000, 268.49649);
    SetObjectMaterial(aa, 0, 18935, "matclothes", "BandanaCheese", 0);
    SetObjectMaterial(aa, 1, 18935, "matclothes", "BandanaCheese", 0);
    formula = CreateObject(1655, 361.57574, 2481.75684, 16.49494,   0.00000, 0.00000, 249.02979);
    SetObjectMaterial(formula, 9, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula, 5, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula, 6, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula, 2, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula, 0, 18957, "matclothes", "BandanaThingy", 0);
    formula1 = CreateObject(1655, 366.70047, 2479.81250, 19.84340,   16.00000, 0.00000, 249.00000);
    SetObjectMaterial(formula1, 9, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula1, 5, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula1, 6, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula1, 2, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula1, 0, 18957, "matclothes", "BandanaThingy", 0);
    formula2 = CreateObject(1655, 366.70047, 2479.81250, 19.84340,   16.00000, 0.00000, 249.00000);
    SetObjectMaterial(formula2, 9, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula2, 5, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula2, 6, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula2, 2, 18957, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(formula2, 0, 18957, "matclothes", "BandanaThingy", 0);
    spawn = CreateObject(9241, 381.84216, 2550.28345, 17.01521,   0.00000, 0.00000, 1.05567);
    SetObjectMaterial(spawn, 1, 18931, "matclothes", "BandanaElec", 0);
    SetObjectMaterial(spawn, 2, 18931, "matclothes", "BandanaElec", 0);
    spawn1 = CreateObject(9241, -1185.60010, 26.27995, 14.70642,   0.00000, 0.00000, 314.82858);
    SetObjectMaterial(spawn1, 1, 18940, "matclothes", "BandanaThingy", 0);
    SetObjectMaterial(spawn1, 2, 18940, "matclothes", "BandanaThingy", 0);
Another question what is the different between:
CreateDynamicObject(3509, -5818.08154, -1069.65662, 6.19940, 0.00000, 0.00000, 0.00000);
and
CreateDynamicObject(3509, -311.63, 1509.42, 74.35, 0.00, 0.00, 0.00);



Re: DEBUG Lag [+Reps For each help] - Youssef214 - 23.05.2014

Not A Lot,But More Objects = More Lag,Try To Decrease Your Objects,and 0.000000 = 0


Re: DEBUG Lag [+Reps For each help] - iFiras - 23.05.2014

That's really weird, I expect it is a script bug.


Re: DEBUG Lag [+Reps For each help] - Youssef214 - 23.05.2014

If you use many "SetTimer" Functions,This will cause lag too,and If you use "OnPlayerUpdate" in a lot of functions,it will cause lag, too.


Re: DEBUG Lag [+Reps For each help] - SPA - 23.05.2014

I do not use more than 5 lines in onplayerupdate, also i dont have many timers (4 MAX) .


Re: DEBUG Lag [+Reps For each help] - Youssef214 - 23.05.2014

then maybe you using many objects,see how many objects you got..


Re: DEBUG Lag [+Reps For each help] - SPA - 23.05.2014

CreateDynamicObject can use +100000 , iv approx 30000


Re: DEBUG Lag [+Reps For each help] - SPA - 23.05.2014

Bump


Re: DEBUG Lag [+Reps For each help] - Le3aT - 23.05.2014

You can't solve this issue. If you are running dm server, Put your maps above the water, Away from each other, For stunts and so.. All the servers would lag FOR SURE, Because of the objects.


Re: DEBUG Lag [+Reps For each help] - SPA - 24.05.2014

Not all servers lag , there are something to do :/