Dynamic items, easy but need help.
#1

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!
Reply
#2

Still need help, refresh.
Reply
#3

REFRESH
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)