mSelection not loading skins/vehicles list
#1

Yesterday I was adding some textdraws to my mode, and now mSelection.inc ( https://sampforum.blast.hk/showthread.php?tid=407045 ) is not working properly, this happens when I use cmd to show model selection:

sa-mp-165.jpg

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...
Reply
#2

Did you create any file in scriptfiles?
Reply
#3

Quote:
Originally Posted by TheToretto
View Post
Did you create any file in scriptfiles?
Yes, of course: scriptfiles > skins.txt
Code:
2
3
6
8
20
21
22
23
25
43
45
59
60
72
73
119
Reply
#4

Quote:
Originally Posted by TokicMajstor
View Post
Yes, of course: scriptfiles > skins.txt
Code:
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.
Reply
#5

Quote:
Originally Posted by TheToretto
View Post
Can you show the code? How you're oppening those files and displaying them.
Code:
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;
}
Reply
#6

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
Reply
#7

Quote:
Originally Posted by TheToretto
View Post
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
Reply
#8

Bump, I really need to fix this
Reply
#9

Explain me this:

pawn Code:
ShowModelSelectionMenu( playerid, skinlist, "Choose skin");
You can clearly see "Choose skin" but in the screen it's Select skin.


Try to replace the variable "skinlist" to something else.
Reply
#10

Quote:
Originally Posted by TheToretto
View Post
Explain me this:

pawn Code:
ShowModelSelectionMenu( playerid, skinlist, "Choose skin");
You can clearly see "Choose skin" but in the screen it's Select skin.


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
Reply
#11

Quote:
Originally Posted by TokicMajstor
View Post
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 @Y_Less said.
Reply
#12

Quote:
Originally Posted by Y_Less
View Post
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)