Strickenkid function in BlueG mysql [SHORT QUESTION]
#1

______
Reply
#2

What ?
Reply
#3

OK here the full version:

see this
Код:
       	if(mysql_fetch_row(query,"|"))
        {
this is only for strickenkids but I need it for BlueGґs Plugin
Any Idea?


Код:
Everything else is ok
public LoadHouses(houses)
{
	new count = 0;
	new query[200];
	for(new i = 1; i<houses; i++)
	{
	    format(query, sizeof(query),"SELECT * FROM `houses` WHERE `ID` = '%d'", i);
	    mysql_query(query);
	    mysql_store_result();
        if(mysql_num_rows())
       	if(mysql_fetch_row(query,"|"))
        {
            printf("Attempt loading house ID %d",i);
            new field[22][MAX_PLAYER_NAME];
	    	new hlabel[300];
	    	explode(query, field, "|");
	    	mysql_free_result();
	    	count++;
	    	HouseInfo	[i]	[Owner] 		= 	field[1];
	    	HouseInfo	[i]	[x] 			= 	floatstr(field[2]);
	    	HouseInfo	[i]	[y] 			= 	floatstr(field[3]);
	    	HouseInfo	[i]	[z] 			= 	floatstr(field[4]);
	    	HouseInfo	[i]	[ix]			= 	floatstr(field[5]);
	    	HouseInfo	[i]	[iy] 			= 	floatstr(field[6]);
	    	HouseInfo	[i]	[iz]		 	= 	floatstr(field[7]);
	   	 	HouseInfo	[i]	[interior]		= 	strval(field[8]);
	    	HouseInfo	[i]	[vm]			= 	strval(field[9]);
	    	HouseInfo	[i]	[coast] 		= 	strval(field[10]);
	    	HouseInfo	[i]	[score] 		= 	strval(field[11]);
	    	HouseInfo	[i]	[not_sellable] 	= 	strval(field[12]);
	    	HouseInfo	[i]	[locked]		= 	strval(field[13]);
	    	HouseInfo	[i]	[label] 		= 	Create3DTextLabel(hlabel,(!HouseInfo[houseid][not_sellable]) ? (0xFF0000FF) : (0x00FF00FF),HouseInfo[houseid][x],HouseInfo[houseid][y],HouseInfo[houseid][z],10.0,0,0);
	    	HouseInfo	[i]	[pickid] 		= 	CreatePickup((!HouseInfo[houseid][not_sellable]) ? (1273) : (1272),1,HouseInfo[houseid][x],HouseInfo[houseid][y],HouseInfo[houseid][z],0);
	    	HouseInfo	[i]	[icon_id] 		= 	CreateDynamicMapIcon(HouseInfo[houseid][x],HouseInfo[houseid][y],(!HouseInfo[houseid][not_sellable]) ? (31) : (32), -1, -1, -1, 100.0);
	    	format(hlabel,sizeof(hlabel),"Owner: %s\nScore: %d\ncoast: $%d$", HouseInfo[houseid][Owner],HouseInfo[houseid][score],HouseInfo[houseid][coast]);
	    	houseid++;
		}
	}
	return 1;
}
Reply
#4

pawn Код:
mysql_fetch_row_format(query, "|");
Reply
#5

Wow works Thanks dude!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)