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

Lua Darkhaos function

Parameters are cid (Player ID) and creature ID (monster which should follow).
Not player position.
 
Code:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type target name.")
        return true
    end   
local player = getPlayerByName(param)
doCreatureFollowPlayer(player, Wolf)

end
i edit script but still not work :(
 
Wolf is not defined so it is nil.
You can get the target of the player with getPlayerTarget(player), be sure to check whether the target exists.
 
I'm not really sure if this code will even work .. I really don't think this will apply to all wolves. I think you have to define a certain wolf. But I think this is what Summ meant.

Code:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type target name.")
        return true
    end

    local player = getPlayerByName(param)
    doCreatureFollowPlayer(player, string.lower("wolf"))
    return true
end
 
Replace the doCreatureFollowPlayer line with:

Code:
local target = getCreatureTarget(player)
if isCreature(target) then
    doCreatureFollowPlayer(player, target)
end
 
Back
Top