31.03.2015, 14:14
Use R33 mysql plugin
I've tried to put my row count i get from my Loadfunction in a variable
so
Which gives me in a print, which is correct since there is 3 rows.
That prints when i type this command
I can get it to show 1 row but not all of them at once
I've never used that strcat function.
I don't wanna have to fetch the data that has already been fetched with my loadfunction
I've tried to put my row count i get from my Loadfunction in a variable
so
pawn Code:
cache_get_data(rows, fields, dbHandle);
BuildingRows = rows;
Code:
Building 1 Building 2 Building 3
pawn Code:
YCMD:test(playerid, params[], help)
{
#pragma unused params
new str[128];
if(PLogged[playerid] == 0) return
SendClientMessage(playerid, ERROR_COLOR, NOT_LOGGED);
if(PlayerInfo[playerid][pAdmin] < 9 && !IsPlayerAdmin(playerid)) return
SendClientMessage(playerid, COLOR_GREY, ADMIN_CMD_ERROR);
if (help) return
SendClientMessage(playerid, COMMAND_HELP_COLOR, "Test command");
for (new i = 0; i < BuildingRows; i++)
{
printf("Building Rows %d", i+1);
format(str, sizeof(str), "%d %s\n", BuildingInfo[i][buMysqlId],BuildingInfo[i][buName]);
ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"Test",str,"Select","");
}
return 1;
}
I've never used that strcat function.
I don't wanna have to fetch the data that has already been fetched with my loadfunction