Help with pickup
#1

Hi all. I have problem with pickups... I don't know why, but pickup does not appear.. I also created 3dtextlabel and 3dtextlabel working good I see it, but pickup - no.

My code:
Код:
enum _gangs{
	gID,
	gOwner [MAX_PLAYER_NAME + 1],
	gName [100],
	bool:gOficiali,
	Float:gPos[3],
	Text3D:gLabel,
	gPickup,
	gRep,
	gMembers,
	gMembersLimit,
	gSkin,
	gFond,
	gVW
};
Код:
public LoadGangs (){
	new 
		str [256]
	;
	for (new i, j = cache_get_row_count (); i < j; i++){

		gdb [i][gID] = gauju;
		cache_get_field_content(i, "gName", gdb [i][gName], MysqlConnection, 100);
		cache_get_field_content(i, "gOwner", gdb [i][gOwner], MysqlConnection, MAX_PLAYER_NAME);
		gdb [i][gPos][0] = cache_get_field_content_float (i, "gX");
		gdb [i][gPos][1] = cache_get_field_content_float (i, "gY");
		gdb [i][gPos][2] = cache_get_field_content_float (i, "gZ");
		gdb [i][gOficiali] =!! cache_get_field_content_int(i, "gOficiali");
		gdb [i][gRep] = cache_get_field_content_int (i, "gRep");
		gdb [i][gMembers] = cache_get_field_content_int (i, "gMembers");
		gdb [i][gMembersLimit] = cache_get_field_content_int (i, "gMembersLimit");
		gdb [i][gSkin] = cache_get_field_content_int (i, "gSkin");
		gdb [i][gFondas] = cache_get_field_content_int (i, "gFondas");
		gdb [i][gVW] = cache_get_field_content_int (i, "gVW");

		format(str, 256, "Gang name: {FFCC00}%s\n{FFFFFF}Owner: {FFCC00}%s\n{FFFFFF}Type: {33CC33}Official\n \n{FFFFFF}Press - {FFCC00}ENTER", gdb [i][gName], gdb [i][gOwner], gdb [i][gName]);
		gdb [i][gLabel] = Create3DTextLabel (str, -1, gdb [i][gPos][0], gdb [i][gPos][1], gdb [i][gPos][2], 5.0, gdb [i][gVW], 0);
		gdb [i][gPickup] = CreatePickupA(1254, 2, gdb [i][gPos][0], gdb [i][gPos][2], gdb [i][gPos][2]);

		gauju++;
	}
	return 1;
}
Reply
#2

Try replacing this
Код:
gdb [i][gPickup] = CreatePickupA(1254, 2, gdb [i][gPos][0], gdb [i][gPos][1], gdb [i][gPos][2]);
Reply
#3

I know, that i should replace this line.. I tryed CreatePickup, CreateDynamicPickup and nothing...
Reply
#4

Mike should actually mention what it is that's the issue...

Код:
gdb [i][gPickup] = CreatePickupA(1254, 2, gdb [i][gPos][0], gdb [i][gPos][2], gdb [i][gPos][2]);
You reference 0, 2, 2... You should be referencing 0, 1, 2.... That's why your pickup isn't appearing, as it's not in the same position due to this typo.
Reply
#5

Ouch.... My bad.. Now working good Thanks alot.
Reply
#6

Quote:
Originally Posted by ,TomY'
Посмотреть сообщение
Ouch.... My bad.. Now working good Thanks alot.
No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)