samuel157
/root
- Joined
- Mar 19, 2010
- Messages
- 447
- Solutions
- 3
- Reaction score
- 49
- Location
- São Paulo, Brazil
- GitHub
- Samuel10M
Lua:
function onSay(cid, words, param)
if words == "!desbug" then
local cap = getPlayerCap(cid) -- Supondo que essa função obtenha o valor atual da cap do jogador
if cap == 72442500 then
-- Defina o valor da cap diretamente para 9000000
setPlayerCap(cid, 9000000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua cap foi desbugada!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua cap não atende aos requisitos para desbugar.")
end
end
end
-- Função para definir o valor da cap do jogador
function setPlayerCap(cid, value)
-- Defina o valor da cap do jogador usando uma função apropriada do TFS
-- Por exemplo: player:setCap(value)
end
Lua:
[19/08/2023 09:32:31] sqlite3_step(): SQLITE ERROR: UPDATE on table "player_skills" violates foreign: "player_id"
[19/08/2023 09:32:31] sqlite3_step(): SQLITE ERROR: cannot rollback - no transaction is active
[19/08/2023 09:32:31] sqlite3_step(): SQLITE ERROR: UPDATE on table "player_skills" violates foreign: "player_id"
[19/08/2023 09:32:31] sqlite3_step(): SQLITE ERROR: cannot rollback - no transaction is active
[19/08/2023 09:32:36] [Error - TalkAction Interface]
[19/08/2023 09:32:36] data/talkactions/scripts/desbug.lua:onSay
[19/08/2023 09:32:36] Description:
[19/08/2023 09:32:36] data/talkactions/scripts/desbug.lua:3: attempt to call global 'getPlayerCap' (a nil value)
[19/08/2023 09:32:36] stack traceback:
[19/08/2023 09:32:36] data/talkactions/scripts/desbug.lua:3: in function <data/talkactions/scripts/desbug.lua:1>
[19/08/2023 09:32:56] > Broadcasted message: "O jogador "[VIP] Amped" tornou-se o novo Top Level. Parabens!".
[19/08/2023 09:33:01] sqlite3_step(): SQLITE ERROR: UPDATE on table "player_skills" violates foreign: "player_id"
[19/08/2023 09:33:01] sqlite3_step(): SQLITE ERROR: cannot rollback - no transaction is active