• 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!

Player killed

Santi

Theres no way im stopping
Joined
Aug 29, 2010
Messages
1,975
Reaction score
152
Location
00
So, I need this:
If player A, kills player B, and player B has 'x' storageValue then
'y' Global storageValue does -1 (doesnt turn in -1, the number of that storage-1)
 
Last edited:
Lua:
local storage = 105
local value = 1
-------------------
local global = 106

function onKill(cid, target)
    if isPlayer(target) and getCreatureStorage(target, storage) == value then
        doSetStorage(global, getStorage(global)-1)
    end
    return true
end
 
Thanks bro, Ill only bother you in one thing more.
How to teleport all the players that are in an area?
 
Lua:
local players = getSpectators(centerPos, rangex, rangey)
for i = 1, #players do
    if isPlayer(players[i]) then
        doTeleportThing(players[i], {x=100,y=100,z=7})
    end
end
 
Back
Top