SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 22/08/2011, 09:13 PM   #1
perki51
Little Clucker
 
Join Date: Sep 2009
Posts: 3
Reputation: 0
Default Dynamic items, easy but need help.

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!
perki51 is offline  
Old 23/08/2011, 09:52 AM   #2
perki51
Little Clucker
 
Join Date: Sep 2009
Posts: 3
Reputation: 0
Default Re: Dynamic items, easy but need help.

Still need help, refresh.
perki51 is offline  
Old 24/08/2011, 09:58 AM   #3
perki51
Little Clucker
 
Join Date: Sep 2009
Posts: 3
Reputation: 0
Default Re: Dynamic items, easy but need help.

REFRESH
perki51 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
where to put these items in pawno? manunited1878 Help Archive 12 29/07/2011 01:06 AM
New items, please answer? BurgessGaming Help Archive 3 04/03/2011 10:21 PM
Items(sorta) luigifan9 Help Archive 2 24/04/2010 10:09 PM
Dynamic Dialog Items help Norn Help Archive 10 25/01/2010 10:52 PM


All times are GMT. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.