29.01.2011, 17:42
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");
}