PDA

View Full Version : mSelection not loading skins/vehicles list


TokicMajstor
26/03/2019, 12:32 PM
Yesterday I was adding some textdraws to my mode, and now mSelection.inc ( https://forum.sa-mp.com/showthread.php?t=407045 ) is not working properly, this happens when I use cmd to show model selection:

12356

Everything I set up correctly, I tried with the example code from the guy who made this include, and same thing happens, anybody konws why? I haven`t changed anything connected with that thing, I just added some textdraws for wanted level. There is no warining, that the file is not loaded, it is loaded upon OnGameModeInit, and it seems like it loads, but it doesn`t show the models. Yes I have just updated include, still same. Appreciate help...

TheToretto
26/03/2019, 01:27 PM
Did you create any file in scriptfiles?

TokicMajstor
26/03/2019, 01:36 PM
Did you create any file in scriptfiles?

Yes, of course: scriptfiles > skins.txt

2
3
6
8
20
21
22
23
25
43
45
59
60
72
73
119

TheToretto
26/03/2019, 01:45 PM
Yes, of course: scriptfiles > skins.txt

2
3
6
8
20
21
22
23
25
43
45
59
60
72
73
119


Can you show the code? How you're oppening those files and displaying them.

TokicMajstor
26/03/2019, 05:19 PM
Can you show the code? How you're oppening those files and displaying them.


new skinlist = mS_INVALID_LISTID;
public OnGameModeInit()
{
skinlist = LoadModelSelectionMenu("skins.txt");
return 1;
}
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if( listid == skinlist )
{

if( response )
{
SCM(playerid,-1, "Kupio si odecu/skin za 10$.");
PlayerInfo[ playerid ][ pSkin ] = modelid;
SetPlayerSkin( playerid, modelid );
SavePlayer( playerid );
g_MoneyMinus( playerid, 10 );
}
else SCM(playerid,-1,"You canceled the skin selection.");
return 1;
}
return 1;
}
YCMD:vipskin(playerid, params[], help)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
{
ShowModelSelectionMenu( playerid, skinlist, "Choose skin");
}
else
{
SCM(playerid, 1, "You`re not allowed to use this command.");
}
}
return 1;
}

TheToretto
26/03/2019, 06:23 PM
Does it show on the server's logs that it is loaded successfully? It should print something, either loaded or a warning. Are you using it as a filterscript? Because if so, and you load the script throught the console or ingame it won't work, if what I said is true, change OnGameModeInit to OnFilterScriptInit

TokicMajstor
27/03/2019, 02:29 PM
Does it show on the server's logs that it is loaded successfully? It should print something, either loaded or a warning. Are you using it as a filterscript? Because if so, and you load the script throught the console or ingame it won't work, if what I said is true, change OnGameModeInit to OnFilterScriptInit

No Iam not using FS. When I try to put invalid file to load, it shows error in server log, but when Iam loading this, nothing shows up, and that means it is loaded. But it is not showed in menu

TokicMajstor
28/03/2019, 01:47 PM
Bump, I really need to fix this

TheToretto
28/03/2019, 02:30 PM
Explain me this:

ShowModelSelectionMenu( playerid, skinlist, "Choose skin");

You can clearly see "Choose skin" but in the screen it's Select skin.
https://forum.sa-mp.com/attachment.php?attachmentid=12356&d=1553603334

Try to replace the variable "skinlist" to something else.

TokicMajstor
28/03/2019, 10:41 PM
Explain me this:

ShowModelSelectionMenu( playerid, skinlist, "Choose skin");

You can clearly see "Choose skin" but in the screen it's Select skin.
https://forum.sa-mp.com/attachment.php?attachmentid=12356&d=1553603334

Try to replace the variable "skinlist" to something else.

It is not the same because later I changed it, it's not matter. Not just skinlist, all of this menus are like that

TheToretto
28/03/2019, 10:42 PM
It is not the same because later I changed it, it's not matter. Not just skinlist, all of this menus are like that

I can't see a cancel button, probably what @****** said.

TokicMajstor
28/03/2019, 10:45 PM
How many text draws did you add? More to the point, how many do you have in total? There's a global limit, so there's a good chance you've gone over that.

Oh very interesting. I added like 18, not sure, but yeah there are actually a lot of them, which are not needed. They are all player textdraws. So is there limit for player td or global or both. Anyway I'll try to remove some, thank you