• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

on login, free promotion

Michael Orsino

Premium User
Premium User
Support Team
Joined
Nov 15, 2007
Messages
864
Solutions
10
Reaction score
451
Location
Western Australia
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