SA-MP Forums Archive
Dynamic items, easy but need help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dynamic items, easy but need help. (/showthread.php?tid=278555)



Dynamic items, easy but need help. - perki51 - 22.08.2011

Hi all!

It's my first post. I am from poland, sorry for my bad english

I do easy and amateurish script for my gamemod. It's dynamic items system.. But it doesn't work fine. When i put down more than two items i can't pick up any item.. It's my code:

Code:
new Float:Xitem1;
new Float:Yitem1;
new Float:Zitem1;
new podniesiony1; // it's mean pick up
Put down:

Code:
new Float:x, Float:y, Float:z, world;
GetPlayerPos(playerid, x, y, z);
world = GetPlayerVirtualWorld(playerid);
if(PlayerInfo[playerid][pItem1] == 1)
{
Xitem1 = x;
Yitem1 = y;
Zitem1 = z;
podniesiony1 = 0;
format(string, sizeof(string), "[1] Coffe");
Przedmiot1[playerid] = Create3DTextLabel(string, COLOR_WHITE, Xitem1, Yitem1, Zitem1 - 1, 20.0, world, 0);
PlayerInfo[playerid][pItem1] = 0;
}
Pick up:

Code:
if(PlayerToPoint(5.0, playerid, Xitem1, Yitem1, Zitem1) && podniesiony1 == 0 && PlayerInfo[playerid][pItem1] == 0)
{
PlayerInfo[playerid][pItem1] = 1;
podniesiony1 = 1;
Delete3DTextLabel(Przedmiot1[playerid]);
}
For next items i change

Code:
Xitem1
to

Code:
Xitem2
etc..

No errors or warnings here. It's only bug, like i wrote upstairs this message.

So just help me, please..
Greetings from poland user!


Re: Dynamic items, easy but need help. - perki51 - 23.08.2011

Still need help, refresh.


Re: Dynamic items, easy but need help. - perki51 - 24.08.2011

REFRESH