• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Why does this script don't work?

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
I don't know why this script don't works, can someone help me?

LUA:
function onKill(cid, target)
 
local config = {
item = 6500, -- Demonic Essence
store = getPlayerStorageValue(cid, 6000),  -- storrage for Current frags
tstore = getPlayerStorageValue(cid, 7000), -- Total Storage value for kills
dstore = getPlayerStorageValue(cid, 8000),  -- Total Storage value for deaths 
rand = math.random(1,4),
pos = getPlayerPosition(cid)
}
	local table = {
	{"Smashed!", 189, 1},
	{"Dead!", 190, 2},
	{"Owned!", 18, 3},
	{"Pwnt!", 215, 4}
}
 
	if isPlayer(target) == true then
	setPlayerStorageValue(cid, 6000, (config.store+1))  
		setPlayerStorageValue(cid, 7000, (config.tstore+1))
            setPlayerStorageValue(target, 8000, (config.dstore+1))
              doPlayerSetRedSkullTicks(cid, 0)
 
local rand = math.random(1, #table)
doSendAnimatedText(config.pos, table[rand][1], tablica[rand][2])
 
 
        if(getPlayerStorageValue(cid, 6000) == 5) then
				broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 10) then
                broadcastMessage(getCreatureName(cid) .. " is dominating! He killed 10 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 25) then
			broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 25 players!")
			elseif(getPlayerStorageValue(cid, 6000) == 50) then
				broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 50 players! DO SOMETHING!")
			elseif(getPlayerStorageValue(cid, 6000) == 100) then
            	broadcastMessage("Bow down to your new god " ..getCreatureName(cid).. " has 100 frags!")
            end
            	return TRUE
               end	
                   end
 
No Tested

Code:
function onKill(cid, target)

-- Config
	storage = 10000  -- storrage for frags
-- Config

	if(isPlayer(target) == false) then
		return true
	end
	
	local table = {
	{"Smashed!", 189, 1},
	{"Dead!", 190, 2},
	{"Owned!", 18, 3},
	{"Pwnt!", 215, 4}}
 
	local rand = math.random(1, #table)
		doSendAnimatedText(getPlayerPosition(cid), table[rand][1], tablica[rand][2])
		setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage)+1)  
		doPlayerSetRedSkullTicks(cid, 0)
 
	if(getPlayerStorageValue(cid, storage) == 5) then
		broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
	elseif(getPlayerStorageValue(cid, storage) == 10) then
        broadcastMessage(getCreatureName(cid) .. " is dominating! He killed 10 players!")
	elseif(getPlayerStorageValue(cid, storage) == 25) then
		broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 25 players!")
	elseif(getPlayerStorageValue(cid, storage) == 50) then
		broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 50 players! DO SOMETHING!")
	elseif(getPlayerStorageValue(cid, storage) >= 100) then
        broadcastMessage("Bow down to your new god " ..getCreatureName(cid).. " has "..getPlayerStorageValue(cid, storage).." frags!")
    end
    return true
end
 
Last edited:
Back
Top