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

Player without a vocation, participating in the script so the premium account.

nilvagner

Long live the otland.net
Joined
May 3, 2010
Messages
118
Reaction score
3
Location
Brazil
Good night! I am in need of help once more of you guys!


I'm using a script that works perfectly well. He server to launch the free player at Temple, after ending his premium. But it needs to be improved!

Error made by the script: This play bills that have not yet chosen a vocation to the main area of my map.

Anyone can help to launch the script are in the temple, the players who already have a vocation, after ending his premium?




script 1:

function onLogin(cid)

local premmydays = getPlayerPremiumDays(cid)

if premmydays > 0 then
setPlayerStorageValue(cid, 20500, 1)

end
return TRUE
end
_________________________________________________________________

script 2:

function onLogin(cid)

pos = {x = 1116, y = 1217, z = 7}

if getPlayerStorageValue(cid, 20500) == 1 and getPlayerPremiumDays(cid) == 0 then
doTeleportThing(cid, pos)
doPlayerSetTown(cid, 1)
doPlayerPopupFYI(cid, "Premium time is over. Thanks for donating to our server.")
setPlayerStorageValue(cid, 20500, -1)
end
return TRUE
end
 

He is new, and new people obviously don't know how to tag..
And they are not going to come in here and instantly look at all of the rules before posting..
Give him a break..

But yes, it would be better if you tagged and used proper spacing and tabbing whenever you script :)

LUA:
function onLogin(cid)

local premmydays = getPlayerPremiumDays(cid)

          if       premmydays > 0 then
                  setPlayerStorageValue(cid, 20500, 1)

        end
   return TRUE
end
 
He is new, and new people obviously don't know how to tag..
And they are not going to come in here and instantly look at all of the rules before posting..
Give him a break..

But yes, it would be better if you tagged and used proper spacing and tabbing whenever you script :)

LUA:
function onLogin(cid)

local premmydays = getPlayerPremiumDays(cid)

          if       premmydays > 0 then
                  setPlayerStorageValue(cid, 20500, 1)

        end
   return TRUE
end

What a useless post of yours.
 
Okay, then here you go :)

LUA:
function onLogin(cid)
		getplayerVocation(cid) if == 0 then

<-- Rest of Script Here

Maybe,

LUA:
function onLogin(cid)
		getplayerVocation(cid) if == 0 then
			doPlayerSendCancel(cid)

		local premmydays = getPlayerPremiumDays(cid)

if 		premmydays > 0 then
			setPlayerStorageValue(cid, 20500, 1)

		end
	return TRUE
end
 
Last edited:
LUA:
function onLogin(cid)
	if getPlayerVocation(cid) ~= 0 and getPlayerPremiumDays(cid) > 0 then
		setPlayerStorageValue(cid, 20500, 1)
	end
	return TRUE
end
 
Back
Top