Dialog not working
#1

Okay so I have a dialog that allows you to change the time and bail of a person in prison except it is not working. I am able to release the person but I am not able to change their bail or time. Anyone got any idea?

PHP код:
case EFactionsDialog_PMDC: {
            if(!
response)
            {
            new 
mdcs[256];
            
format(mdcs,sizeof(mdcs),"Police MDC System - Logged in: %s",GetPlayerNameEx(playeridENameType_RPName_NoMask));
            
ShowPlayerDialog(playeridEFactionDialog_MDCDIALOG_STYLE_LISTmdcs,"Name Search\nWanted\nSubmit Charges\nPlate Search((Plate))\nPrisoners Database\nRequest Backup\nAnswer Backup\nCancel Backup\nFind Business Address""Select""Cancel");
            }
            else if(
response) {
                new 
msg[128];
                if(
listitem == 0)
                {
                    
format(msgsizeof(msg), "Please type how long %s has left in jail"GetPlayerNameEx(Prisoners[listitem], ENameType_RPName_NoMask));
                    
ShowPlayerDialog(playerid,EFactionDialog_CTime,DIALOG_STYLE_INPUT,"MDC",msg,"Confirm","Go back");
                }
                else if(
listitem == 1)
                {
                    
format(msgsizeof(msg), "Please type how much %s bail should be"GetPlayerNameEx(Prisoners[listitem], ENameType_RPName_NoMask));
                    
ShowPlayerDialog(playerid,EFactionDialog_CBail,DIALOG_STYLE_INPUT,"MDC",msg,"Confirm","Go back");
                }
                else if(
listitem == 2)
                {
                    
format(msgsizeof(msg), "%s has released %s from prison."GetPlayerNameEx(playerid,ENameType_RPName), GetPlayerNameEx(Prisoners[listitem], ENameType_RPName_NoMask));
                    
SendCopMessage(TEAM_BLUE_COLORmsg);
                    
releaseFromJail(Prisoners[listitem]);                     
                    
DeletePVar(Prisoners[listitem], "ReleaseTime"); 
                }
            }
        }
        
/*This dialog*/case EFactionDialog_CTime: {
            if(
response) {
                new 
msg[128];
                new 
time GetPVarInt(Prisoners[listitem], "ReleaseTime");
                new 
ATime strval(inputtext);
                
format(msgsizeof(msg), "%s has changed %s prison time from %d to %d ."GetPlayerNameEx(playerid,ENameType_RPName), GetPlayerNameEx(Prisoners[listitem], ENameType_RPName_NoMask),time,ATime);
                
SendCopMessage(TEAM_BLUE_COLORmsg);
                
SetPVarInt(Prisoners[listitem], "ReleaseTime"ATime);
            }
        }
        
/*and this Dialog*/case EFactionDialog_CBail: {
            if(
response) {
                new 
msg[128];
                new 
bail GetPVarInt(Prisoners[listitem], "Bail");
                new 
ATime strval(inputtext);
                
format(msgsizeof(msg), "%s has changed %s bail from %d to %d ."GetPlayerNameEx(playerid,ENameType_RPName), GetPlayerNameEx(Prisoners[listitem], ENameType_RPName_NoMask),bail,ATime);
                
SendCopMessage(TEAM_BLUE_COLORmsg);
                
SetPVarInt(Prisoners[listitem], "Bail"ATime);
            }
        } 
Reply


Messages In This Thread
Dialog not working - by Alex_T - 07.03.2015, 01:22
Re : Dialog not working - by Golimad - 07.03.2015, 01:28
Re: Dialog not working - by Alex_T - 07.03.2015, 01:35
Re: Dialog not working - by SickAttack - 07.03.2015, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)