18.05.2018, 16:07
(
Последний раз редактировалось DeNCHiK01; 21.05.2018 в 22:27.
)
Hello everyone!
I have interesting system behaviour on my server:
I have this server.cfg: https://pastebin.com/7UydPmM2
And when I'm connecting and pressing Spawn, this guy comes at the scene:
ID 48 skin becomes the default skin instead of CJ.
Finding the reason
Firstly, I thought it's cause of some includes. No.
Secondly, my gamemode, I made it empty (just a_samp.inc and main()), and that gave me no changes.
Plugins, I thought it's because of YSF: When I removed it from server.cfg CJ came back.
Also renaming the gamemode to the name with bigger amount of symbols helped too.
I didn't get why these things affects on it, but had started to write this topic.
The main reason
While I was writing this topic, I've tried to change the encoding of the config file from UTF8+BOM to Windows1251 and found that the problem is in the total amount of symbols in my server.cfg. Not the plugins, not the mode. Just the amount of symbols.
It sounds like magic, but this is how it is.
If config will be changed with any symbol(s), adding or removing, 48th skin would disappear.
How to simply reproduce it (if you think it's cause of my scripts or something else):
1) Download sa-mp server for windows from sa-mp.com and unzip it
2) Download my config from Pastebin and save it to "UTF8 with BOM" encoding (it's important!). Replace server config with mine.
3) Open new.pwn from /pawno and make it as empty as possible and as you wish. Save it with name test48skin.pwn and compile it. Move amx to gamemodes directory.
4) Launch the server, join it with password written in config and press spawn.
OS on the computer is Windows 7 x64.
I have interesting system behaviour on my server:
I have this server.cfg: https://pastebin.com/7UydPmM2
And when I'm connecting and pressing Spawn, this guy comes at the scene:
ID 48 skin becomes the default skin instead of CJ.
Finding the reason
Firstly, I thought it's cause of some includes. No.
Secondly, my gamemode, I made it empty (just a_samp.inc and main()), and that gave me no changes.
Plugins, I thought it's because of YSF: When I removed it from server.cfg CJ came back.
Also renaming the gamemode to the name with bigger amount of symbols helped too.
I didn't get why these things affects on it, but had started to write this topic.
The main reason
While I was writing this topic, I've tried to change the encoding of the config file from UTF8+BOM to Windows1251 and found that the problem is in the total amount of symbols in my server.cfg. Not the plugins, not the mode. Just the amount of symbols.
It sounds like magic, but this is how it is.
If config will be changed with any symbol(s), adding or removing, 48th skin would disappear.
How to simply reproduce it (if you think it's cause of my scripts or something else):
1) Download sa-mp server for windows from sa-mp.com and unzip it
2) Download my config from Pastebin and save it to "UTF8 with BOM" encoding (it's important!). Replace server config with mine.
3) Open new.pwn from /pawno and make it as empty as possible and as you wish. Save it with name test48skin.pwn and compile it. Move amx to gamemodes directory.
4) Launch the server, join it with password written in config and press spawn.
OS on the computer is Windows 7 x64.