04.07.2012, 10:03
Parameter order in ShowPlayerDialog is not right. dialogid comes before style
and this should work
pawn Код:
command(show,playerid,params[])
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Enter a description","enter the players description to get the name","ok","cancel");
return 1;
}
pawn Код:
case 1:
{
for(new i=0;i<MAX_PLAYERS;i++) //loop for all players
{
if(!strcmp(Player[i][description],inputtext,true) || !strcmp(Player[i][description2],inputtext,true))
{
SendClientMessage(playerid,WHITE,GetName(i));
return 1;
}
}
SendClientMessage(playerid,WHITE,"nothing was found");
}