SA-MP Forums

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

Thread Tools Display Modes
Old 19/07/2016, 02:35 PM   #1
Little Clucker
VincenzoDrift's Avatar
Join Date: Jun 2014
Posts: 47
Reputation: 3
Default Drop System idea help

Hi, I made a basic drop system that works perfectly. Now I want a system that sets a maximum of dropped items (DEFINE MAX_DROP_ITEM 50). I wish that when an item is dropped halfway, the oldest item is deleted, so do remain a number of items on the server. Any of you have an idea on how to do it?
Sorry for my bad english
VincenzoDrift is offline   Reply With Quote
Old 19/07/2016, 03:05 PM   #2
Little Clucker
Join Date: Jan 2013
Posts: 30
Reputation: 3
Default Re: Drop System idea help

Some pseudo-code of what I thought of:
#define MAX_DROPPED_ITEMS = 50
new lastDroppedItemIndex = 0
new droppedItems[MAX_DROPPED_ITEMS]

function DropItem(item) {
if lastDroppedItemIndex == 50 then
  lastDroppedItemIndex = 0

droppedItems[lastDroppedItemIndex] = item
Full-Time Software Engineer
GuyB790 is offline   Reply With Quote

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
Help regarding drop gun system ChristofferHoffmann Scripting Help 5 26/07/2013 07:09 AM
[FilterScript] Vehicle Barrel Drop System [SF]OutLawZ Filterscripts 3 29/03/2013 01:08 AM
Drop Weapon System ! dorperez Help Archive 1 12/11/2010 03:23 PM

All times are GMT. The time now is 04:15 PM.

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