Jump to content
  • 0

[HELP] Redis - Delete all m107, GM6, M320 LRR's


larsmos2011

Question

Hello, 

Does anyone have a redis statement to delete all the m107, GM6, M320 LRR's inside of  storage items or does someone know how to do it? As you maybe know I'm still a noob at redis.

I've been searching for this for a while now but I cant find an answer.

Greetz from Switzerland :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello, 

Does anyone have a redis statement to delete all the m107, GM6, M320 LRR's inside of  storage items or does someone know how to do it? As you maybe know I'm still a noob at redis.

I've been searching for this for a while now but I cant find an answer.

Greetz from Switzerland :)

Sorry mate no idea. This forum (and world at large) is redis-noobs club. Welcome to the club!

 

Perhaps look into temporary workaround option of magic-deleting these weapons (via a client script) when player switches to them.

This method surely sucks for immersion but could be a feasible (temporary measure) as it's better than nothing.

Link to comment
Share on other sites

  • 0

Got it to work. used a modified file from 

 

this solution will replace all the weapons with the Item here: 

valueitem = string.gsub(valueitem, SRIFLE_ARRAY[v], "sr25_epoch") 

clean_onehitsnipers.lua

local SRIFLE_ARRAY =	{"m107Tan_EPOCH","m107_EPOCH","srifle_GM6_F","srifle_LRR_F"}
	
local count = 0
local valuelist = redis.call('keys', 'Storage:1:*')
local valueitem
if valuelist then
    for i = 1, #valuelist do
		
		--Clean Vehicles which have been sold
		valueitem = redis.call('get',valuelist[i])
		
		for v = 1, #SRIFLE_ARRAY do
		
			valueitem = string.gsub(valueitem, SRIFLE_ARRAY[v], "sr25_epoch")		
		
		end
		
			  redis.call('set', valuelist[i], valueitem)
			  count = count + 1
		
        
    end
end
return count
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...