Postado Julho 24, 2014 10 anos Autor function onSay(cid, words, param) local t = string.explode(param, ",") if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Missing params.") return true end local accountName, balance = t[1], t[2] if t[2] == null then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Missing ammount of points.") return true end local accountPoints = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `name` = '" .. accountName .. "' LIMIT 1;") local points = tonumber(accountPoints:getDataInt("premium_points")) if(words == "/addpoints") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You added "..balance.." premium points to account "..t[1].." account.") points = (points+balance) db.query("UPDATE `accounts` SET `premium_points` = " .. points .. " WHERE `name`= '" .. accountName .. "' LIMIT 1;") elseif (words == "/removepoints") then points = (points-balance) if points < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You removed all "..t[1].." account premium points.") db.query("UPDATE `accounts` SET `premium_points` = '0' WHERE `name`='" .. accountName .. "' LIMIT 1;") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You removed "..balance.." premium points to "..t[1].." account.") db.query("UPDATE `accounts` SET `premium_points` = " .. points .. " WHERE `name`='" .. accountName .. "' LIMIT 1;") end end return true end STYLLER OT 2022
Postado Outubro 5, 2016 8 anos @luanluciano93 amigo, tem como vc modifica-lo para transferir pontos de players para players?
Postado Novembro 11, 2016 8 anos Como faço pra colocar diretamente na conta do player? esse script coloca só no char!
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.