mSelection doesn't work all of the sudden.
#1

I have posted @ Twizted's thread about this issue (re-using his thread) but since it's being ignored, I have decided to create a separated one.

I am using mSelection on my RP script (which I worked on since April 2016). It was working fine until today, It stopped working. The textdraws aren't responding, and when I press ESC the menu closes (I have scripted it that when player pressed ESC the menu will pop-up again, Preventing the player from avoiding that menu). I have added something from the script that might have caused something from mSelection to stop working, though as far as I remember I never scripted any textdraw related functions so I don't think it was the cause of the problem.

Here is how I process and use mSelection on my RP script;

After selecting gender (DIALOG_STYLE_LIST), Player are proceeded to mSelection's menu (Skins, Depending on the gender. Male or Female) after choosing the skin, They are moved to the Origin's dialog (DIALOG_STYLE_INPUT).

Later on in the script, they are used again on buying clothes (/buyclothes).

Other than that, It wasn't used again.

How can I fix this? Is there any possible way to make mSelection work again?

Code:

PHP код:
new reg_male_skin mS_INVALID_LISTID
new 
reg_female_skin mS_INVALID_LISTID
new 
clothing_male_skin mS_INVALID_LISTID
new 
clothing_female_skin mS_INVALID_LISTID
// OnGameModeInit 
reg_male_skin LoadModelSelectionMenu("renegade/males.txt"); 
reg_female_skin LoadModelSelectionMenu("renegade/females.txt"); 
clothing_male_skin LoadModelSelectionMenu("renegade/clothing_males.txt"); 
clothing_female_skin LoadModelSelectionMenu("renegade/clothing_females.txt"); 
// Callback 
public OnPlayerModelSelection(playeridresponselistidmodelid

    new 
query[130]; 
    if(
listid == reg_male_skin
    { 
        if(
response
        { 
            
PlayerInfo[playerid][pModel] = modelid
            
format(querysizeof(query), "UPDATE `users` SET `model` = %d WHERE `username` = '%s'"PlayerInfo[playerid][pModel], DB_Escape(GetPlayersName(playerid))); 
            
db_query(databasequery); 
            
ClearChatbox(playerid); 
         
            
SendClientMessage(playerid, -1"* You have chosen your character's clothes."); 
            
SendClientMessage(playeridCOLOR_LIGHTRED"[ ! ] Type your character's origin (Birth Place)."); 
            
SendClientMessage(playeridCOLOR_CLIENT"Example;{FFFFFF} Origin is your character's birthplace - EX; Los Angeles, California"); 
            
ShowPlayerDialog(playeridDIALOG_RORIGINDIALOG_STYLE_INPUT"Character's Origin""Type in your character's origin (Birthplace)\n\n* Ex; Los Angeles, California\n\n* DO NOT troll with the origin.""Set"""); 
        } 
        else 
        { 
            
ShowModelSelectionMenu(playeridreg_male_skin"Character Clothes"); 
        } 
    } 
    else if(
listid == reg_female_skin
    { 
        if(
response
        { 
            
PlayerInfo[playerid][pModel] = modelid
            
format(querysizeof(query), "UPDATE `users` SET `model` = %d WHERE `username` = '%s'"PlayerInfo[playerid][pModel], DB_Escape(GetPlayersName(playerid))); 
            
db_query(databasequery); 
            
SendClientMessage(playerid, -1"* You have chosen your character's clothes."); 
            
SendClientMessage(playeridCOLOR_LIGHTRED"[ ! ] Type your character's origin (Birth Place)."); 
            
SendClientMessage(playeridCOLOR_CLIENT"Example;{FFFFFF} Origin is your character's birthplace - EX; Los Angeles, California"); 
            
ShowPlayerDialog(playeridDIALOG_RORIGINDIALOG_STYLE_INPUT"Character's Origin""Type in your character's origin (Birthplace)\n\n* Ex; Los Angeles, California\n\n* DO NOT troll with the origin.""Set"""); 
        } 
        else 
        { 
            
ShowModelSelectionMenu(playeridreg_female_skin"Character Clothes"); 
        } 
    } 
     else if(
listid == clothing_male_skin || listid == clothing_female_skin
    { 
        if(
response
        { 
            new 
                
bizid = -1
                
price
            if ((
bizid Biz_Inside(playerid)) == -|| BizInfo[bizid][bType] != 3
                return 
0
            if (
BizInfo[bizid][bProducts] < 1
                return 
SendError(playerid"This business is out of stock."); 
            
price BizInfo[bizid][bizPrice][0]; 
            if (
GetPlayerCash(playerid) < price
                return 
SendError(playerid"You have insufficient funds for to purchase this clothes."); 
            
GivePlayerCash(playerid, -price); 
            
BizInfo[bizid][bProducts]--; 
            
BizInfo[bizid][bVault] += Tax_Percent(price); 
            
Biz_Save(bizid); 
            
Tax_AddPercent(price); 
            
PlayerInfo[playerid][pModel] = modelid
            
SetPlayerSkin(playeridmodelid); 
            
format(querysizeof(query), "has paid $%s and received the clothes they bought."AddComma(price)); 
            
cmd_me(playeridquery); 
            
format(querysizeof(query), "~w~$%s~n~~g~Purchased!"AddComma(price)); 
            
GameTextForPlayer(playeridquery50001); 
            
PlayerPlaySound(playerid10520.00.00.0); 
        } 
    } 
    return 
1

Reply
#2

I have managed to fix it myself, I was too dumb to notice this but a Vehicle Object Editor FS is interfering with the mSelection. I have to unload it

~ Will be saving this thread for the future ~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)