Help with pickup - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with pickup (
/showthread.php?tid=655562)
Help with pickup -
,TomY' - 24.06.2018
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;
}
Re: Help with pickup -
Mike861 - 24.06.2018
Try replacing this
Код:
gdb [i][gPickup] = CreatePickupA(1254, 2, gdb [i][gPos][0], gdb [i][gPos][1], gdb [i][gPos][2]);
Re: Help with pickup -
,TomY' - 24.06.2018
I know, that i should replace this line..
I tryed CreatePickup, CreateDynamicPickup and nothing...
Re: Help with pickup -
Sew_Sumi - 24.06.2018
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.
Re: Help with pickup -
,TomY' - 24.06.2018
Ouch.... My bad.. Now working good
Thanks alot.
Re: Help with pickup -
Mike861 - 24.06.2018
Quote:
Originally Posted by ,TomY'
Ouch.... My bad.. Now working good Thanks alot.
|
No problem.