Help please.
#2

Your code doesn't make any sense anyway, you're storing the entered ID before even splitting the string to get the ID! In fact I don't know why you're even splitting the string using strtok because you never even use another part of it! I would instead suggest merely converting the string straight to an integer and checking if the player is connected:

pawn Код:
if (dialogid == 21)
{
    new
        string[128],
        id = strval(inputtext);

    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,"[ERROR]: Player is not connected!");
    GetPlayerName(id, playername, sizeof(playername));
       
    format(string,sizeof(string),"Name: %s\nWanted Level: %d",playername,GetPlayerWantedLevel(id));
    ShowPlayerDialog(playerid,22,DIALOG_STYLE_MSGBOX,"Info",string,"Ok","Cancel");
}
Reply


Messages In This Thread
Help please. - by bartje01 - 29.01.2011, 17:38
Re: Help please. - by JaTochNietDan - 29.01.2011, 17:42
Re: Help please. - by bartje01 - 29.01.2011, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)