[Plugin] [PLUGIN] SA-MP inventory system
#1

SA-MP inventory system

Read the ReadMe for installing.
Report any bug you find.

Features
Code:
IsBagFull(bagid);
Return 1 if the bag is full and null if is not.
Code:
AddBagItem(bagid,itemid);
Adds a item to the bag.
Return null if the bag is full.
Code:
GetSlotItem(bagid,slot);
Get the itemid from the given slot.
Code:
IsItemInBag(bagid,itemid);
Check if there is an item in the bag.
Code:
RemoveItem(bagid,itemid);
Removes a item from the bag.
If there are same items it will remove only one.

I made this for my gamemod but i think it will help you guys too!
Enjoy!

Download
Mirror 1 (Provided by Nitroray)
Reply
#2

Quote:
Originally Posted by shusta
SA-MP inventory system

Read the ReadMe for installing.
Report any bug you find.

Features
Code:
IsBagFull(bagid);
Return 1 if the bag is full and null if is not.
Code:
AddBagItem(bagid,itemid);
Adds a item to the bag.
Return null if the bag is full.
Code:
GetSlotItem(bagid,slot);
Get the itemid from the given slot.
Code:
IsItemInBag(bagid,itemid);
Check if there is an item in the bag.
Code:
RemoveItem(bagid,itemid);
Removes a item from the bag.
If there are same items it will remove only one.

I made this for my gamemod but i think it will help you guys too!
Enjoy!

Download
It look intresting, but please can you give us an example of it?
Reply
#3

Quote:
Originally Posted by Fire_in_the_hole
It look intresting, but please can you give us an example of it?
Ok a fast example :P
Code:
#define DRIVER_LICENSE 1
#define COLOR_RED 0xAA3333AA
...

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  	if(!IsItemInBag(playerid,DRIVER_LICENSE)) SendClientMessage(playerid,COLOR_RED,"Driing without license");
	return 1;
}
Reply
#4

Quote:
Originally Posted by shusta
Quote:
Originally Posted by Fire_in_the_hole
It look intresting, but please can you give us an example of it?
Ok a fast example :P
Code:
#define DRIVER_LICENSE 1
#define COLOR_RED 0xAA3333AA
...

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  	if(!IsItemInBag(playerid,DRIVER_LICENSE)) SendClientMessage(playerid,COLOR_RED,"Driing without license");
	return 1;
}
Very Usefull especially for roleplay Servers!
Reply
#5

picture please
Reply
#6

Quote:
Originally Posted by bluepower
picture please
For what you need a picture ...
The source is included,you can compile it by you own with Dev-Cpp
Reply
#7

whow thats what I needed. Nice done

btw could anyone upload this again. Rapidshare sucks without premium
Reply
#8

Quote:
Originally Posted by Sebihunter
whow thats what I needed. Nice done

btw could anyone upload this again. Rapidshare sucks without premium
Yes, but is faster to download without premium rather than wait someone to upload it....
Reply
#9

yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Reply
#10

Quote:
Originally Posted by Sebihunter
yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Okay, 80 minutes, what have you downloaded the last time from rapidshare?
Reply
#11

Can you tell me why a plugin for this? Sorry but this can be done in pawno
Reply
#12

Quote:
Originally Posted by [X2G
Sneaky! ]
Can you tell me why a plugin for this? Sorry but this can be done in pawno
This include also a #include....
But everyone aggre that it is very but very usefull especially for Roleplays Servers!
Reply
#13

Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Okay, 80 minutes, what have you downloaded the last time from rapidshare?
I downloaded nothing. Thats the strange thing

Edit: Someone sent it me. Bad that there isnt a linux version
Reply
#14

Quote:
Originally Posted by Sebihunter
Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Okay, 80 minutes, what have you downloaded the last time from rapidshare?
I downloaded nothing. Thats the strange thing
Try this http://www.rapidshare.com/files/1033...ntory.rar.html
Reply
#15

Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Okay, 80 minutes, what have you downloaded the last time from rapidshare?
I downloaded nothing. Thats the strange thing
Try this http://www.rapidshare.com/files/1033...ntory.rar.html
Thanks, I got it by a friend in ICQ
Reply
#16

Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
Quote:
Originally Posted by Fire_in_the_hole
Quote:
Originally Posted by Sebihunter
yea. I downloaded nothing and need to wait 80 minutes. So uploading is faster
Okay, 80 minutes, what have you downloaded the last time from rapidshare?
I downloaded nothing. Thats the strange thing
Try this http://www.rapidshare.com/files/1033...ntory.rar.html
thats rapidshare too....

and i uploaded it again,Here

EDIT: damn,oh well - for everyone else :P lol
Reply
#17

Quote:
Originally Posted by blewert
and i uploaded it again,Here
I uploaded it on RS because it uploads it faster,but anyway next time i will use an other upload site :P
Reply
#18

Quote:
Originally Posted by WeGoneNutz
Quote:
Originally Posted by blewert
and i uploaded it again,Here
I uploaded it on RS because it uploads it faster,but anyway next time i will use an other upload site :P
ok

PS: i only reuploaded because sebihunter had trouble getting it (waiting 50 hours lol)
Reply
#19

thanks blewert. Maybe others need it
Reply
#20

Nice plugin, although you didn't need to write a plugin to do this.. could've easily been done in PAWN.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)