• 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] Premium,Nick,Days

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I wanted a scripter, you speak /premium name,days
and the player earns premium account.

rep + :thumbup:
 
LUA:
function onSay(cid, words, param)
local param = string.explode(param, ",")
local player = getPlayerByNameWildcard(param[1])
local days = tonumber(param[2])
        if isPlayer(player) and days then
                doPlayerAddPremiumDays(player, param[2])
                doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You have just received ".. days .." premium days. Please re-login for the premium account to take effect.")
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player ".. param[1] .." received ".. days .." premium days.")
        else
                doPlayerSendCancel(cid, "Either the first param isn't an online player or the second param isn't a number.")
        end
return true
end

Code:
        <talkaction words="/prem" access="4" event="script" value="premmy.lua"/>
 
Back
Top