10.02.2011, 03:06
ok heres what i want todo. i have an org script so when a player enters hisorgs checkpoint it should display the names of members in his org. i use mysql so how do i do it so that the names come as a list (dialog_style_list)
heres my try which failed =( :
pls help me
heres my try which failed =( :
Код:
if(dialogid == 28) { new p[256]; p=LoadMem(playerid); ShowPlayerDialog(playerid, 29,DIALOG_STYLE_LIST,"Members",p,"Ok","Cancel"); }
Код:
LoadMem(playerid) { new q[128],mem[256]; format(q,128,"SELECT * FROM ostats WHERE org=%d",org[playerid]); mysql_query(q); mysql_store_result(); for(new i=0;i<mysql_num_rows();mysql_retrieve_row()) { new tmp[32],s[128],field[3][32]; mysql_fetch_row_format(q, "|"); explode(q, field, "|"); format(tmp,32,"%s",field[1]); format(s,128,"%s\n%s",s,tmp); format(mem,256,"s",s); } return mem; }