Arrumado:
function onSay(cid, words, param) if getPlayerStorageValue(cid, 25001) <= 0 then local money = 1000000 local mana = 150000 local health = 300000 if doPlayerRemoveMoney(cid, money) then setCreatureMaxMana(cid, getCreatureMaxMana(cid) + mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + health) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Bem-vindo ao Detoned server.") doPlayerSetStorageValue(cid, 25001, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você nao tem a dinheiro necessário.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você só pode utilizar uma vez esse comando.") end return true end
O principal erro estava aqui:
doCreatureAddHealth(pid,9999999999999) doPlayerAddMana(pid,99999999999999)
Você não declarou a váriavel pid como fez com as váriaveis money, mana e health então quando o OT foi ler o script, ficou perdido, tipo "Que porra é esse pid?!" você poderia usar o pid aqui, se definisse-o como uma creatura, resumindo como não definiu, não pode, então substitui o pid pelo cid. Teve outros erros de lógica também.
Não quis ser chato nem nada, só tentando ajudar, continue treinando, é a melhor forma de aperfeiçoar-se.




info
Grupo: Artesão
Registrado: 19/05/11
Posts: 109
Reputação: +4
[19/05/2011 13:40:09] [Error - TalkAction Interface]
[19/05/2011 13:40:09] data/talkactions/scripts/newplayer.lua:onSay
{SCRIPT} Newplayer.lua
function onSay(cid, words, param)
if(getPlayerStorageValue(cid, 25001) <= 0) then
local money = 1000000
local mana = 150000
local health = 300000
if doPlayerRemoveMoney(cid, money) then
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + mana)
doCreatureAddHealth(pid,9999999999999)
doPlayerAddMana(pid,99999999999999)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + health)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Bem-vindo ao Detoned server.")
doPlayerSetStorageValue(cid, 25001, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você nao tem a dinheiro necessário.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você só pode utilizar uma vez esse comando.")
end
return true
end