Dialog not responding + some questions.
#1

Hi,

I have a dialog to pay the police ticket, everything works fine but its not responding when player click "Pay" button. But its responding when they click "Cancel" button. I made a test FS to check if other dialogs aren't responding as well or not and they too didn't respond. I am pretty sure its not the script fault cause some old dialogs that i had scripted in the same way are working fine but its not working for newly added dialogs. If i make a /pay command with the same scripts, it works fine.

pawn Код:
if(dialogid == DIALOG_TICKET)
{
    new
        str[100],
        Fines
    ;
   
    if(!response)
    {
        format(str, sizeof(str), "Suspect %s did not pay the ticket. You can jail him now.", GetName(playerid));
        SendClientMessage(pInfo[playerid][TicketingID], RED, str);
        SendClientMessage(playerid, RED, "You didn't pay the fine, police are able to jail you!");
        KillTimer(pInfo[playerid][Timer_PoliceCanJailMe]);
        pInfo[playerid][Ticketed] = false;
        pInfo[playerid][PoliceWarnedMe] = false;
        SetJobText(playerid);
        pInfo[playerid][PoliceCanJailMe] = true;
    }
    if(response)
    {
        if(pInfo[playerid][Ticketed] == true)
        {
            Fines = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
            RewardPlayer(pInfo[playerid][TicketingID], Fines, GetPlayerWantedLevel(playerid));
            format(str, 80, "%s has paid the ticket of $%i", GetName(playerid), Fines);
            SendClientMessage(pInfo[playerid][TicketingID], BLUE, str);
            RewardPlayer(playerid, -Fines, 0);
            RewardPlayer(pInfo[playerid][TicketingID], Fines, 0);
            format(str, 80, "You have paid the ticket of $%i to Officer %s", Fines, GetName(pInfo[playerid][TicketingID]));
            SendClientMessage(playerid, RED, str);
            SetJobText(playerid);
            pInfo[pInfo[playerid][TicketingID]][StatsPoliceFined]++;
            SetPlayerWantedLevel(playerid, 0);
            if(pInfo[playerid][WantedID] == playerid)
            {
                pInfo[playerid][TicketingID] = 0;
                pInfo[playerid][WantedID] = 0;
            }
            pInfo[playerid][Ticketed] = false;
            pInfo[playerid][PoliceWarnedMe] = false;
            KillTimer(pInfo[playerid][Timer_PoliceCanJailMe]);
            PlayerFile_Save(pInfo[playerid][TicketingID]);
            PlayerFile_Save(playerid);
        }
    }
    return 1;
}
Dialog is defined as #define DIALOG_TICKET 742

And another problem is, i have set
pawn Код:
if(IsPlayerConnected(targetid))
{
    //do stuffs here
}
else
    return SendClientMessage(playerid, 0xFF0000FF, "Player is not connected1");
in all of my commands and sometimes when player reconnects to the server it says "Player is not connected" even if they are, while using all the commands on the selected players. I have latest version of sscanf so what else could be the reason?
Reply


Messages In This Thread
Dialog not responding + some questions. - by iOxide - 13.07.2014, 18:05
Re: Dialog not responding + some questions. - by iOxide - 14.07.2014, 06:48
Re: Dialog not responding + some questions. - by BroZeus - 14.07.2014, 10:13
Re: Dialog not responding + some questions. - by iOxide - 14.07.2014, 10:16
Re: Dialog not responding + some questions. - by BroZeus - 14.07.2014, 10:21
Re: Dialog not responding + some questions. - by greentarch - 14.07.2014, 10:21
Re: Dialog not responding + some questions. - by iOxide - 14.07.2014, 12:47

Forum Jump:


Users browsing this thread: 1 Guest(s)