Problem with mSelection
#1

When mSelection menu pops up and player choose any char or Cancel Next Prev td, it don't response

OnDialogResponse
PHP код:
if(dialogid==DIALOG_POLICELOCKER){
        if(
response){
            switch(
listitem){
                case 
0:{
                    if(
PlayerInfo[playerid][pFDuty]==1){
                        
PlayerInfo[playerid][pFDuty]=0;
                        
SetPlayerColor(playeridCOLOR_WHITE);
                    }else{
                        
PlayerInfo[playerid][pFDuty]=1;
                        
SetPlayerColor(playeridCOLOR_LIGHTBLUE);
                    }
                }
                case 
1:{
                    
ShowModelSelectionMenu(playeridpoliceskins"Select Skin"); //mSelection Menu
                
}
                case 
2:{
                    
PlayerInfo[playerid][pRadio]=1;
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"** You have taken a radio from locker.");
                }
                case 
3:{
                    
ShowPlayerDialog(playeridDIALOG_POLICEWEAPONDIALOG_STYLE_LIST"Available Weapons""Nightstick\t\t\tFree\nDesert Eagle\t\t\t$500\nShotgun\t\t\t$700\nAK-47\t\t\t\t$1000\nMP-5\t\t\t$850\nCountry Rifle\t\t\t$600\nNight Vis. Goggles\t\tFree\nThermal Goggles\t\tFree\nPortable MDC\t\t\tFree""Select""Cancel");
                }
                case 
4:{
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"You have taken a medic kit.");
                    
SetPlayerHealth(playerid100.00);
                }
                case 
5:{
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"You have taken a Kevlar.");
                    
SetPlayerArmour(playerid100.00);
                }
            }
        }
        return 
1;
    } 
OnPlayerModelSelection
PHP код:
public OnPlayerModelSelection(playeridresponselistidmodelid)
{
    print(
"Called");
    if(
listid == policeskins)
    {
        print(
"Responsed");
        if(
response)
        {
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"** You have changed your uniform.");
            
SetPlayerSkin(playeridmodelid);
        }else{
            return 
1;
        }
        return 
1;
    }
    return 
1;

Reply
#2

use ShowModelSelectionMenuEx and it's unique ID (extraid).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)