AUTO Add Table When Dropped and Remove Table when
10 replies



29.11.21 03:47:09 pm
FULL TITLE: how to make AUTO Added Table when drop and remove when Collect weapon
so i want make table that can Backup all of this {weapon id, tile x, tile y, WEAPON[player id][weapon id][5]} for all dropped weapon
this example i make this only Backup {weapon id, tile x, tile y, WEAPON[player id][weapon id][5]} for 1 weapon
and this full code
sorry for my bad england
so i want make table that can Backup all of this {weapon id, tile x, tile y, WEAPON[player id][weapon id][5]} for all dropped weapon
this example i make this only Backup {weapon id, tile x, tile y, WEAPON[player id][weapon id][5]} for 1 weapon
and this full code
sorry for my bad england
2084729947754920835
I don't know what it is that you're making, or what it is that you wish for us to help you with.
But I do know that you're probably making this overly complicated, since the code has little to no documentation and seems to do a lot of redundant things.
Please don't use a translator, as it's quite obvious that you are, and it makes us unable to understand you, or what you need.
But I do know that you're probably making this overly complicated, since the code has little to no documentation and seems to do a lot of redundant things.
Please don't use a translator, as it's quite obvious that you are, and it makes us unable to understand you, or what you need.
It's hard being the best girl in the whole entire world
my script work fine sir, i only want to know how to add table when player drop and remove the table when player collect
example:
understand? if still no
what can i do
edit:
example:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
BACKUP_DROP = {}
and player1 drop M4A1 then
BACKUP_DROP = {
[1] = {32}
}
and then player2 drop USP then
BACKUP_DROP = {
[1] = {32};
[2] = {1}
}
and if player1 collect M4A1 that has dropped before then
BACKUP_DROP = {
[2] = {1}
}
aaaaannnnndddd if player1 collect USP that has dropped by player2 before then
BACKUP_DROP = {}
and player1 drop M4A1 then
BACKUP_DROP = {
[1] = {32}
}
and then player2 drop USP then
BACKUP_DROP = {
[1] = {32};
[2] = {1}
}
and if player1 collect M4A1 that has dropped before then
BACKUP_DROP = {
[2] = {1}
}
aaaaannnnndddd if player1 collect USP that has dropped by player2 before then
BACKUP_DROP = {}
understand? if still no
what can i do

edit:
edited 1×, last 30.11.21 01:05:06 am
2084729947754920835
So you want to have a table that simply contains the dropped items as their IDs. In fact, couldn't be easier! Your best friend for this is going to be
drop where you get the ID of the dropped weapon and insert it to the aforementioned table, then
collect comes into action! That's where you remove the particular item ID from the table by basically finding its table key.
Although this is how you would make it, make sure to tell us what you are planning to do with it.


Although this is how you would make it, make sure to tell us what you are planning to do with it.
Shit your pants:
Outlast II Mod (29) | Create your UI faster: CS2D UI Framework


Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- UNTESTED
addhook("drop","drop")
function (id,iid,type,ain, a, mode)
local temp = {}
temp.Id = id;
temp.Iid = iid;
temp.Type = type;
temp.Ain = ain;
temp.A = a;
temp.Mode = mode;
table.insert(BACKUP_DROP,temp)
end
addhook("drop","drop")
function (id,iid,type,ain, a, mode)
local temp = {}
temp.Id = id;
temp.Iid = iid;
temp.Type = type;
temp.Ain = ain;
temp.A = a;
temp.Mode = mode;
table.insert(BACKUP_DROP,temp)
end
https://www.lua.org/pil/19.2.html
Share time limited free games here

If you having enough experience and patience to read my coffee, you may find in my file archive stalker mood, where I made such system. Free for use and edit everything what your need in there, you can cut and edit needed parts from it
thanks for all who replies and super thanks to @
Bowlinghead and @
Mora and @
Masea it help me a lot



edited 2×, last 04.12.21 06:32:03 pm
2084729947754920835

thanks for all who replies and super thanks to @
Bowlinghead and @
Mora it help me a lot



Shit your pants:
Outlast II Mod (29) | Create your UI faster: CS2D UI Framework





