Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Pessoal to fazendo um ot com o mapa do Baiak Zik  Vip 18 que tem aqui na tk, O que ta me ocorrendo é que eu configurei tudo certinho abri o servidor etc.. Mas quando vou dar o /addpoints Fulano, 10 os pontos não chegam.. tenho o talkaction e o script.. estes aqui.  

<talkaction words="!points;!rankpoints;/addpoints;/delpoints;/setpoints" script="systempoints.lua"/>   <--- ela está localizada na aba <!-- Gods --> Mas acho que não faz muita diferença. 

E o script é este.. 

 

function onSay(cid, words, param)
if(words == "!points") then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem "..getPoints(cid).." Points.")
elseif(words == "!rankpoints") then
local max_players,str = 20,""
str = "--[ RANK POINTS ]--\n\n"
query = db.getResult("SELECT `name`, `points` FROM `players` WHERE `points` > -1 AND `id` > 6 AND `group_id` < 2 ORDER BY `points` DESC, `name` ASC;")
if (query:getID() ~= -1) then k = 1 while true do
str = str .. "\n " .. k .. ". " .. query:getDataString("name") .. " - [" .. query:getDataInt("points") .. "]"
k = k + 1
if not(query:next()) or k > max_players then break end end query:free()end
if str ~= "" then doShowTextDialog(cid,6500, str) end
elseif(words == "/addpoints") then 
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",") 
if not t[1] or not t[2] then return TRUE,doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end
local player = getPlayerByName(t[1]) 
local points = tonumber(t[2]) or 1
local pid = getPlayerByNameWildcard(t[1]) 
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then 
db.executeQuery("UPDATE players SET `points` = `points` + ".. points .." WHERE `name` = ".. db.escapeString(t[1]) ..";")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você adicionou "..points.." Points do jogador "..t[1]) 
return true
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você adicionou "..points.." Points do jogador "..t[1]) 
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..points.." Points no seu character.") 
addPoints(player,points)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você agora tem "..getPoints(player).." Points.") 
end
elseif(words == "/delpoints") then
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",") 
if not t[1] or not t[2] then return TRUE,doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end
local player = getPlayerByName(t[1]) 
local points = tonumber(t[2]) or 1 
local pid = getPlayerByNameWildcard(t[1]) 
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then 
db.executeQuery("UPDATE players SET `points` = `points` - ".. points .." WHERE `name` = ".. db.escapeString(t[1]) ..";")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você removeu "..points.." Points do jogador "..t[1])
return true
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você removeu "..points.." Points do jogador "..t[1]) 
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram removidos "..points.." Points do seu character.") 
removePoints(player,points)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você agora tem "..getPoints(player).." Points.") 
end
elseif(words == "/setpoints") then
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",") 
if not t[1] or not t[2] then return TRUE,doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end
local player = getPlayerByName(t[1]) 
local points = t[2] 
local pid = getPlayerByNameWildcard(t[1]) 
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then 
return TRUE,doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Agora o jogador "..t[1].." tem "..points.." Points no seu character.") 
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "agora você tem "..points.." Points do seu character.") 
setPoints(player,points)
end
end
return TRUE
end

 

E sim eu estou de god "group 6" e sim eu tentei /addpoints tanto como no nome da conta ou no nome do character. Quem poder me socorrer ficaria feliz !

up

up

up

up

  • Respostas 5
  • Visualizações 527
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • esse é um sistema de pontos diferentes, o que você quer que adicione é 'premium_points'    

Posted Images

Postado
  • Autor
Quote

o foda é que só da pra add os pontos, nesse script ai não tem o sistema de (balance) ou /points pra ver quantos pontos eu possuo. 

2 hours ago, Vodkart said:

esse é um sistema de pontos diferentes, o que você quer que adicione é 'premium_points'

 

 

Acabei de ver esse erro como você pode ver na imagem.. Eu coloco os pontos mas mesmo assim ele diz que não possuo os pontos.

Sem título.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo