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

on login, free promotion

Michael Orsino

Premium User
Premium User
Support Team
Joined
Nov 15, 2007
Messages
854
Solutions
10
Reaction score
389
Location
Santiago, Chile (Australian)
I started to write this, but I am not sure of the syntax of part of it.

Code:
function onLogin(cid)
	local freepromotion = getConfigInfo('freepromotion')
	if freepromotion == 1 then
        here is the line im not sure about**
        end

Not sure how promotions work in scripts


getPlayerPromotionLevel(cid)
setPlayerPromotionLevel(cid, level)

I was thinking that it would be
Code:
function onLogin(cid)
	local freepromotion = getConfigInfo('freepromotion')
	if freepromotion == 1 then
        setPlayerPromotionLevel(cid, 1)
        end
But I am really not sure, never dealt with setPlayerPromotionLevel(cid, level) before.
 
Lua:
function onLogin(cid)
  local freePromotion = getConfigInfo('premiumForPromotion')
   if freePromotion == "NO" and getPlayerStorageValue(cid, 43545) == -1 then
        setPlayerPromotionLevel(cid, 1)
	setPlayerStorageValue(cid, 43545, 1)
    end
  return TRUE
end
 
Back
Top