dialog wont showing
#1

Код:
CMD:groupmember(playerid,params[])
{
	new gname[30],pname[MAX_PLAYER_NAME+1],str[1024],str2[128],id, query[256];
	if(sscanf(params,"s[30]",gname)) return SendClientMessage(playerid,-1,"/groupmember [group name]");
	if(strlen(gname) > 30)return SendClientMessage(playerid,-1,"Name of group max is 30 Char");
	new DBResult:result;
	id = DB_RetrieveKey(Group_Table,"GroupName",gname);
 	if(id != DB_INVALID_KEY)
  	{
	format(query, sizeof query, "SELECT * FROM `GroupMembers` WHERE `GroupName`='%s'", DB::Escape(gname));
	result = DB::Query(query);
	for(new a;a<db_num_rows(result);a++)
	{
	    db_get_field_assoc(result, "UserName", pname, sizeof pname);
		strcat(str,pname);
  		strcat(str,"\n");
		db_next_row(result);
	}
	format(str2,sizeof(str2),"Member Group : %s",gname);
	ShowPlayerDialog(playerid,DIALOG_GROUPMEMBER,DIALOG_STYLE_MSGBOX,str2,str,"Close","");
	}
	else SendClientMessage(playerid,-1,"Invalid Group name");
	return 1;
}
whats the problem?
Reply
#2

Did you make sure it even reaches that part of code? Try putting a print just a line before ShowPlayerDialog, see if it prints anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)