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

Make player look like dead body temporarily

Candlejack

Don't hug me I'm scared
Joined
Jun 20, 2012
Messages
87
Reaction score
38
Location
nowhere
I've been searching the forums for about 40 minutes and can't find help :(

All I want is to know the LUA function that can make a player look like a dead body and not be able to move for about 30 seconds then go back to normal.

Anyone got any ideas?

Thank you!
 
Something like this?

Code:
local config = {
    corpseId = 3058, -- Item Id
    time = 60 -- Seconds
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doSetItemOutfit(cid, config.corpseId, config.time)
    return true
end
 
Sweet! That works perfectly.
Thank you so much!!

Do you know of a function to make the player not move for a certain amount of time? While he's looking dead I don't want him to be able to glide around :) lol
 
Code:
local config = {
    corpseId = 3058, -- Item Id
    time = 60 -- Seconds
}

local function allowMovement(cid)
    if not isPlayer(cid) then
        return
    end
   
    doCreatureSetNoMove(cid, false)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doSetItemOutfit(cid, config.corpseId, config.time)
    doCreatureSetNoMove(cid, true)
    addEvent(allowMovement, config.time * 1000, cid)
    return true
end
 
Back
Top