Bad Textdraw after GMX
#1

I restarted my server by SendRconCommand("gmx");
But the server restart, then the textdraws appear badly, such as the opening textdraw when player connect will be shown when player enter vehicle. And the size irregular, such as bigger or smaller than the normal size.

But when I restarted the server by SendRconCommand("exit"); then run again the samp server
All goes normal...

So, here's my question:
1. Why does it happen?
2. Is there any way to start the server without that problem? (I mean by a cmd in the server, I can restart the whole server)

Additional Question:
Is there any plugin/include which can open a file from the script command?
EDIT: I mean, to run/execute an executable file.

Sorry if my english is bad...
Thanks for the answers.
Reply
#2

may we have a look on how you declare (create) the textdraws, i.e, where the returned ID of each textdraw gets saved? like
Код:
WelcomeTD[0]=CreateTextDraw(blabla)
make a command which pronts out all textdraws' id, and compare them again after a gmx. if the numbers (IDs) are messed up, you need to reconsider your textdraw stuff..

opening files is possible with the native samp functions, but i suggest you to have a look at the FileManager plugin
Reply
#3

Sorry, for the additional question, I mean to execute an executable file.
Reply
#4

The textdraw ID's are most probably messed up.

Define them like this:

pawn Код:
new Text:gMyText = Text:INVALID_TEXT_DRAW; // for  Global Textdraw
//and
new PlayerText:gMyPlayerText[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...}; //  Player Textdraw
This will solve your problem for sure

Quote:
Originally Posted by sampwiki
The textdraw variable also needs to be prefixed with the Text: tag and should be initialized with the value Text:INVALID_TEXT_DRAW. If you omit the initialization, the textdraw may conflict with others as you add more textdraws.
Reply
#5

if you want to run an executable, use the Execute plugin, iam using it to simply untar any of my uploaded files.
Reply
#6

You should not use gmx ever. Everyone knows GMX is bugged or causes bugs.
Reply
#7

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
You should not use gmx ever. Everyone knows GMX is bugged or causes bugs.
GMX isn't actually that bugged, it's just that people don't know what it actually does.

It actually only calls "OnGameModeExit" in your gamemode, reconnects all players, goes to the next gamemode in server.cfg (if there are multiple), opens the next or same gamemode and calls "OnGameModeInit". Things like destroying textdraws or removing vehicles have to be done by yourself in OnGameModeExit, if you want them to be removed. They will stay in your server otherwise. (Although, the variables where their IDs are saved, are reinitialized!)

Also, Filterscripts aren't touched when GMX-ing.
Reply
#8

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
GMX isn't actually that bugged, it's just that people don't know what it actually does.

It actually only calls "OnGameModeExit" in your gamemode, reconnects all players, goes to the next gamemode in server.cfg (if there are multiple), opens the next or same gamemode and calls "OnGameModeInit". Things like destroying textdraws or removing vehicles have to be done by yourself in OnGameModeExit, if you want them to be removed. They will stay in your server otherwise. (Although, the variables where their IDs are saved, are reinitialized!)

Also, Filterscripts aren't touched when GMX-ing.
Quote:
Originally Posted by Babul
Посмотреть сообщение
if you want to run an executable, use the Execute plugin, iam using it to simply untar any of my uploaded files.
Quote:
Originally Posted by Jikesh
Посмотреть сообщение
The textdraw ID's are most probably messed up.

Define them like this:

pawn Код:
new Text:gMyText = Text:INVALID_TEXT_DRAW; // for  Global Textdraw
//and
new PlayerText:gMyPlayerText[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...}; //  Player Textdraw
This will solve your problem for sure
Quote:
Originally Posted by Babul
Посмотреть сообщение
may we have a look on how you declare (create) the textdraws, i.e, where the returned ID of each textdraw gets saved? like
Код:
WelcomeTD[0]=CreateTextDraw(blabla)
make a command which pronts out all textdraws' id, and compare them again after a gmx. if the numbers (IDs) are messed up, you need to reconsider your textdraw stuff..

opening files is possible with the native samp functions, but i suggest you to have a look at the FileManager plugin
Thanks all, REP ++ for some...
Reply
#9

Well these two question is really interested , but still I couldn't got any suitable answer.

"1. Why does it happen?
2. Is there any way to start the server without that problem? (I mean by a cmd in the server, I can restart the whole server)"
Reply
#10

Quote:
Originally Posted by flake50
Посмотреть сообщение
Well these two question is really interested , but still I couldn't got any suitable answer.

"1. Why does it happen?
2. Is there any way to start the server without that problem? (I mean by a cmd in the server, I can restart the whole server)"
For your first question, you should read Basssiiie's post again. To answer your second question, there's no built-in restart cmd in sa-mp server.exe. You can shut down your server via /rcon exit and manually restart it again via nohup ./samp03svr & via SSH, or get a basic sa-mp control panel which gives the options to restart/stop/start via single click.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)