Postado Maio 26, 2016 8 anos Galera eu tenho um script preciso fazer uma alteração nele. O Script é assim: Caso o Jogador mate MC, ele perderá uma quantidade de XP(configuravel). Como eu pretendia: Caso o Jogador mate MC, ele perderá a XP que recebeu(Ou nao ganhará XP). Lembrando que: Meu servidor é de War. Obs: Esse script eu peguei aqui no forum, ele era para remover o item recebido e enviar a mensagem: "Foi detectado o uso de MC", porem ele nao remove e nem envia a mensagem, mas isso é oque menos importa, o mais importante é o jogador nao ganhar a xp. Script: Citar local exp = 2000000 local item = 2152,5 function onKill(cid, target, damage, flags) if isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExp(cid, -exp) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Foi detectado o uso de MC você perderá "..exp.." de exp") return true end doPlayerAddItem(cid, item, quant) return true end return true end
Postado Maio 26, 2016 8 anos local function isMC (cid) for _, pid in ipairs(getPlayersOnline()) do if cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid) then return true end end return false end local exp = 2000000 local item, quant = 2152, 5 function onKill(cid, target, damage, flags) if isPlayer (cid) and isPlayer(target) then if isMC (cid) then doPlayerAddExp(cid, -exp) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Foi detectado o uso de MC você perderá "..exp.." de exp") end doPlayerAddItem(cid, item, quant) end return true end
Postado Maio 26, 2016 8 anos Autor Em 26/05/2016 em 02:52, Talesigorvr disse: local function isMC (cid) for _, pid in ipairs(getPlayersOnline()) do if cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid) then return true end end return false end local exp = 2000000 local item, quant = 2152, 5 function onKill(cid, target, damage, flags) if isPlayer (cid) and isPlayer(target) then if isMC (cid) then doPlayerAddExp(cid, -exp) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Foi detectado o uso de MC você perderá "..exp.." de exp") end doPlayerAddItem(cid, item, quant) end return true end @Talesigorvr ficou bom, mas tem 1 detalhe que eu acho que vc deixou passar. Em vez de add item, seria para retirar o item.
Postado Maio 26, 2016 8 anos Autor Em 26/05/2016 em 03:07, Talesigorvr disse: Era como estava no script. Só trocar a função ali. No caso onde tem "Cid, item, quant" eu colocaria "Cid, -item, quant" . end doPlayerAddItem(cid, item, quant) end return true end
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.