-.Savage.-
New Member
- Joined
- Jul 2, 2008
- Messages
- 32
- Reaction score
- 2
i been trying to get this script to work but i cant figure out
why it isnt working this script is suppose to
remove the door to a safe house, if some1 can fix the script
id be greatful thanks alot. and its suppose to broadcast
to the whole server but i dont know the function so its the orange message lol
why it isnt working this script is suppose to
remove the door to a safe house, if some1 can fix the script
id be greatful thanks alot. and its suppose to broadcast
to the whole server but i dont know the function so its the orange message lol
Lua:
local monsters = {
--name = storage
["Orshabaal"] = 35950,
}
doorpos = {x=1051, y=1088, z=7, stackpos=1}
function onKill(cid, target)
if(isMonster(target) == TRUE) then
local name = getCreatureName(target)
getdoor = getThingfromPos(doorpos)
local monster = monsters[string.lower(name)]
if(monster) then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters == -1) then
killedMonsters = 1
end
doRemoveItem(getdoor)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Black Teams Safe House Is Now Open")
setPlayerStorageValue(cid, monster, killedMonsters + 1)
end
end
return TRUE
end