SA-MP Forums Archive
Help me in my mapping - 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: Help me in my mapping (/showthread.php?tid=626520)



Help me in my mapping - tharvin - 16.01.2017

Im having a dynamic mapping system in game..Whenever i add a object it will be normal and wont shows its id num..but when i restart my server it shows the object id and kinda messy..any way to prevent it?


Re: Help me in my mapping - XBrianX - 16.01.2017

Show us a video/screenshot of the issue and post some code


Re: Help me in my mapping - azzerking - 16.01.2017

How are you restarting your server? Manually, or GMX?

If it's GMX, then the problem is when your showing labels, your not updating the object to show the labels, your only applying it. As for when your server restarts, you haven't reset the enum / variable that holds the labels ability to show. So when the server restarts and the objects load in, its checking the variable holding the status of the showing label and showing it.

Simply reset your variables on OnGameModeExit, or what ever function you need to.


Re: Help me in my mapping - tharvin - 19.01.2017

Quote:
Originally Posted by azzerking
Посмотреть сообщение
How are you restarting your server? Manually, or GMX?

If it's GMX, then the problem is when your showing labels, your not updating the object to show the labels, your only applying it. As for when your server restarts, you haven't reset the enum / variable that holds the labels ability to show. So when the server restarts and the objects load in, its checking the variable holding the status of the showing label and showing it.

Simply reset your variables on OnGameModeExit, or what ever function you need to.
Im not tht pro in scripting..Yeah i use /gmx...Can u help me dude? What should i do now?


Re: Help me in my mapping - tharvin - 19.01.2017

Anyone can help me?


Re: Help me in my mapping - Rufio - 19.01.2017

Noone can "assume" what your problem is, post some screenshots/videos and codes. If you can't provide that, noone will or can provide help.


Re: Help me in my mapping - AndreiWow - 19.01.2017

Post your createobject command here in a [code] tag..

Also if you downloaded the Gamemode, link me it please and I'll look into it when I have time.


Re: Help me in my mapping - kelvinis - 19.01.2017

Maybe you're missing a plugin if you're using them. Or the plugin doesn't match with your includes(.inc).

If this is not the problem post your code down below.


Re: Help me in my mapping - NaS - 19.01.2017

Quote:
Originally Posted by azzerking
Посмотреть сообщение
How are you restarting your server? Manually, or GMX?

If it's GMX, then the problem is when your showing labels, your not updating the object to show the labels, your only applying it. As for when your server restarts, you haven't reset the enum / variable that holds the labels ability to show. So when the server restarts and the objects load in, its checking the variable holding the status of the showing label and showing it.

Simply reset your variables on OnGameModeExit, or what ever function you need to.
Just adding, this is not needed in gamemodes! The whole AMX gets reloaded, and all variables will revert to default. Simply because ALL variables ALWAYS have a default value when created (0 if nothing specified), they technically cannot keep their values.

Only Filterscripts do not get reloaded during a GMX. Saying so he doesn't have to do unneccessary work in case it was added in the gamemode.

Also, correct initialization is more clever, that has to be done anyway and makes most exiting code obsolete.