SA-MP Forums Archive
SetObjectMaterial after GMX on console - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: SetObjectMaterial after GMX on console (/showthread.php?tid=451766)



SetObjectMaterial after GMX on console - Mishima - 18.07.2013

Hi guys I'm currently using these objects

sfcenterzone[0] = CreateObject(11340, -2079.9531, 159.2031, 30.8672, 0.00, 0.00, 0.00, 400.0);
sfcenterzone[1] = CreateObject(10983, -2076.6484, 222.8516, 31.2188, 0.00, 0.00, 0.00, 400.0);
sfcenterzone[2] = CreateObject(11387, -2038.7500, 150.7109, 31.1953, 0.00, 0.00, 0.00, 400.0);
SetObjectMaterial(sfcenterzone[0], 0, 10972, "groundbit_sfse", "desgreengrass", 0);//grassdry_128HV
SetObjectMaterial(sfcenterzone[1], 1, 10972, "groundbit_sfse", "desgreengrass", 0);
SetObjectMaterial(sfcenterzone[2], 0, 3845, "boxhses_sfsx", "shingles1", 0);
SetObjectMaterial(sfcenterzone[2], 6, 11139, "firehouse_sfse", "ws_tunnelwall2", 0);
SetObjectMaterial(sfcenterzone[2], 11, 5848, "mainlcawn", "fakestone1_LA", 0);
SetObjectMaterial(sfcenterzone[2], 12, 3845, "boxhses_sfsx", "shingles1", 0);

Everything works okay in the server, then when I do "gmx" on console and I go back in game, those objects aren't there anymore, they just disappeared.
It only works again if I close the server and open it again. Anyone have any idea why this could be happening?
I'm also not using DestroyObject, also tried to do that but doesn't help with anything at all.


Re: SetObjectMaterial after GMX on console - Libra_PL - 19.07.2013

Because OnPlayerDisconnect is called after GMX, so every objects, vehicles, pickups etc. disappear for everyone. Only PlayerPlaySound and audio streams still work, unless you add code to prevent it.


Re: SetObjectMaterial after GMX on console - RajatPawar - 19.07.2013

Use either <fixes.inc> OR create a command that sets a timer for everything to occur before GMX.


Re: SetObjectMaterial after GMX on console - Mishima - 19.07.2013

Oh I forgot to mention I'm using the code above in OnGameModeInit.
And the only objects that disappear are those with the materials, the rest of the objects that don't use materials are working correctly Libra_PL.
Rajat_Pawar, as far as I know there are no fixes for this in fixes.inc, At least shown in the topic.
Thank you for replying to my topic!
Please help guys.


Re: SetObjectMaterial after GMX on console - Mishima - 20.07.2013

Bump..


Re: SetObjectMaterial after GMX on console - Mishima - 22.07.2013

bump


Re: SetObjectMaterial after GMX on console - Pottus - 22.07.2013

GMX causes client bugs galore it's really a waste of time just restart your sever and force clients to reconnect it's better that way.


Re: SetObjectMaterial after GMX on console - cyber_punk - 22.07.2013

And for people who use round based games?

Its an issue that needs to be addressed internally. People should not have to spend tons of time finding work arounds for things that can be fixed rather easily via sa-mp source.


Re: SetObjectMaterial after GMX on console - Pottus - 22.07.2013

Quote:
Originally Posted by cyber_punk
Посмотреть сообщение
And for people who use round based games?

Its an issue that needs to be addressed internally. People should not have to spend tons of time finding work arounds for things that can be fixed rather easily via sa-mp source.
Create dynamic round changing


Re: SetObjectMaterial after GMX on console - Mishima - 22.07.2013

I guess there's no fix for this. Oh well guys, thank you for the replies at least now I know I can't do anything about it, gotta love these bugs, I mean... features. Lol.

EDIT: It's also funny that it works perfectly with CreatePlayerObject and SetPlayerObjectMaterial. Oh well.