IsPlayerConnected <- Not working
#1

pawn Код:
if(dInfo[playerid][dVar1] == 0)
            {
                new pID = GetPlayerID(inputtext);
                if(IsPlayerConnected(pID)) // Not working as its suppose to
                {
                    new suspected[4];
                    new house = GetUserHouse(pID);
                    if(pInfo[pID][pWanteds] >= 1) { suspected="Yes"; } else { suspected="No"; }
                    new string[64];
                    format(string, sizeof(string), "Persons Name: %s\nSuspected: %d\nHouse: %d\n", inputtext, suspected, house);
                    ShowPlayerDialog(playerid, GUI_MDC, DIALOG_STYLE_MSGBOX, "MDC - Person Information", string, "Ok", "");
                }
                else {
                    new query[300];
                    format(query, sizeof(query), "SELECT * FROM %splayers WHERE name = '%s'", SQL_PREFIX, inputtext);
                    mysql_query(query);
                    new rows = strval(query);
                    if(rows == 1)
                    {
                        format(query, sizeof(query), "SELECT Wanteds FROM %splayers WHERE name = '%s'", SQL_PREFIX, inputtext);
                        mysql_query(query);
                        new wanteds = strval(query);
                        new string[64];
                        format(string, sizeof(string), "Persons Name: %s\nSuspected: %d", inputtext, wanteds);
                        ShowPlayerDialog(playerid, GUI_MDC, DIALOG_STYLE_MSGBOX, "MDC - Person Information", string, "Ok", "");
                    }
                    else {
                         ShowInfoDialog(playerid, "MDC - Error", "This name does not exist in the police database.");
                    }
                }
            }
IsPlayerConnected isnt working, GetPlayerID works as it returns the data correctly, but it doesnt check if the player is currently online. as it returns with this:

ShowInfoDialog(playerid, "MDC - Error", "This name does not exist in the police database.");
Reply


Messages In This Thread
IsPlayerConnected <- Not working - by Riddy - 14.12.2012, 21:32
Re: IsPlayerConnected <- Not working - by mastermax7777 - 14.12.2012, 21:42
Re: IsPlayerConnected <- Not working - by DrTHE - 14.12.2012, 21:42
Re: IsPlayerConnected <- Not working - by Riddy - 14.12.2012, 21:48
Re: IsPlayerConnected <- Not working - by DrTHE - 15.12.2012, 11:09
Re: IsPlayerConnected <- Not working - by Konstantinos - 15.12.2012, 11:19
Re : Re: IsPlayerConnected <- Not working - by scott1 - 15.12.2012, 11:41
Re: Re : Re: IsPlayerConnected <- Not working - by Konstantinos - 15.12.2012, 11:46
Re: IsPlayerConnected <- Not working - by Riddy - 15.12.2012, 12:18

Forum Jump:


Users browsing this thread: 1 Guest(s)