drax skylon
o.O DrAx O.o
- Joined
- Sep 9, 2008
- Messages
- 225
- Reaction score
- 3
Hello
since yesterday I was working in this script but I don't know why this isn't working
PS: When I changed "skulltime" to "0" manually in my database the character still do not lose his frags :blink:
Please help me!
since yesterday I was working in this script but I don't know why this isn't working
Code:
function onSay(cid, words, param)
local config =
{
playerIsFighting = hasCondition(cid, CONDITION_INFIGHT),
cost = 100000,
pname = getPlayerGUID(cid)
}
if config.playerIsFighting == FALSE then
if(doPlayerRemoveMoney(cid, config.cost) == TRUE) then
doCreatureSetSkullType(cid, SKULL_NONE)
db.executeQuery("UPDATE `players` SET `skulltime` = '0' WHERE `id` = " .. config.pname .. " LIMIT 1;")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doRemoveCreature(cid)
else
doPlayerSendCancel(cid, "You do not have enough money. To remove your frags you have to pay 100000 gold coins.")
end
else
doPlayerSendCancel(cid, "Sorry, you can not remove your frags during a fight.")
end
return TRUE
end
PS: When I changed "skulltime" to "0" manually in my database the character still do not lose his frags :blink:
Please help me!