• 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!

Lua Remove premium on this script >.<

bolero

MikeHere
Joined
Apr 13, 2009
Messages
1,146
Reaction score
12
Location
Venezuela
How I can put all players can use this command (free and premmys?)


Lua:
function onSay(cid, words, param, channel)
	local cfg = {
		full = 42 * 60 * 1000,
		price = 100000
	}
	if(words == "!stamina") then
		if(getPlayerStamina(cid) >= cfg.full) then
			doPlayerSendCancel(cid, "Tu stamina esta full.")
		elseif(getPlayerMoney(cid) < cfg.price) then
			doPlayerSendCancel(cid, "Tu no tienes dinero, para recargarla vale 100k.")
		elseif(not isPremium(cid)) then
			doPlayerSendCancel(cid, "Tu no eres premium account.")
		else
			doPlayerSetStamina(cid, cfg.full)
			doPlayerRemoveMoney(cid, cfg.price)
			doCreatureSay(cid, "Tu stamina fue recuperada!", TALKTYPE_ORANGE_1)
		end
		return true
	end
end
 
Not tested:

Lua:
  function onSay(cid, words, param, channel)
        local cfg = {
                full = 42 * 60 * 1000,
                price = 100000
        }
        if(words == "!stamina") then
                if(getPlayerStamina(cid) >= cfg.full) then
                        doPlayerSendCancel(cid, "Tu stamina esta full.")
                elseif(getPlayerMoney(cid) < cfg.price) then
                        doPlayerSendCancel(cid, "Tu no tienes dinero, para recargarla vale 100k.")
	else
                        doPlayerSetStamina(cid, cfg.full)
                        doPlayerRemoveMoney(cid, cfg.price)
                        doCreatureSay(cid, "Tu stamina fue recuperada!", TALKTYPE_ORANGE_1)
                end
                return true
        end
end
 
Lua:
function onSay(cid, words, param, channel)
        local cfg = {
                full = 42 * 60 * 1000,
                price = 100000
        }
        if(words == "!stamina") then
                if(getPlayerStamina(cid) >= cfg.full) then
                        doPlayerSendCancel(cid, "Tu stamina esta full.")
                elseif(getPlayerMoney(cid) < cfg.price) then
                        doPlayerSendCancel(cid, "Tu no tienes dinero, para recargarla vale 100k.")
                elseif(not isPlayer(cid)) then
                        doPlayerSendCancel(cid, "Tu no eres premium account.")
                else
                        doPlayerSetStamina(cid, cfg.full)
                        doPlayerRemoveMoney(cid, cfg.price)
                        doCreatureSay(cid, "Tu stamina fue recuperada!", TALKTYPE_ORANGE_1)
                end
                return true
        end
end
 
Back
Top