• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request] /addpremium command

Rodo

New Member
Joined
Oct 23, 2007
Messages
575
Solutions
1
Reaction score
3
Location
Mexico
I need it but give premium ever, doesn't matter if player is online or no, it is possible? :)
 
Lua:
-- Script By Shawak
-- Edited a little By AndresPro

  function onSay(cid, words, param)
        local t = string.explode(param, ",")
        if t[1] ~= nil and t[2] ~= nil then
                local result = db.getResult("SELECT `account_id` FROM `players` WHERE `name` = '"..t[1].."';")
                db.executeQuery("UPDATE `accounts` SET `premdays` = `premdays` + "..t[2].." WHERE `id` = '" ..result:getDataString("account_id").. "';")
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..t[1].." has received "..t[2].." premium days.")
                result:free()
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command Requires Two Params.")
        end
        return TRUE
end

Just say /addpremium NAME, DAYS to add DAYS premium days to NAME's account
 
Last edited:
Lua:
-- Script By Rizz
-- Edited a little By AndresPro

  function onSay(cid, words, param)
        local t = string.explode(param, ",")
        if t[1] ~= nil and t[2] ~= nil then
                local result = db.getResult("SELECT `account_id` FROM `players` WHERE `name` = '"..t[1].."';")
                db.executeQuery("UPDATE `accounts` SET `premdays` = `premdays` + "..t[2].." WHERE `id` = '" ..result:getDataString("account_id").. "';")
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..t[1].." has received "..t[2].." premium days.")
                result:free()
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command Requires Two Params.")
        end
        return TRUE
end

Just say /addpremium NAME, DAYS to add DAYS premium days to NAME's account

-- Script By Rizz :mad:

He only made this:
Lua:
...`id` = '" ..result:getDataString("account_id").. "';")
Why no credits to me? :mad:
 
Back
Top