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

Vip ends (vip_time)

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
I need script that when vip_time ends player get teleported to home Town AND lose promotion vip (9, 10, 11, 12)
 
@Up: But he wont change all his vip system only to do that (if hes not using that vip sys)
What vip system are you using?
 
No matter that is his vip system or Kekox vip system it's for all. If you read carefully script you will know what I mean. :)

@Theard: What you mean saying "lose promotion vip" <--- what is that??. You must also add functions to your's function.lua
;)
 
LUA:
function onLogin(cid)
if vip.hasVip(cid) == FALSE then
   doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs
   setPlayerPromotionLevel(cid,1)
end
return true
end
 
LUA:
function onLogin(cid)
if vip.hasVip(cid) == FALSE then
   doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs
   setPlayerPromotionLevel(cid,1)
end
return true
end

I've found a problem, every players non-vip get teleported to temple when login. Do you know how to solve it?
 
I got no idea how to solve it, cause with that script it checks if u are not vip and tps you I didnt think bout that player no vip wud get tped too, so, I think you will have to make something so vipPlayers get a storageValue, and then I can do it.
Like, put the TP to vip zone give a storage like this:

data/movements/movements.xml
XML:
<movevent type="StepIn" uniqueid="5559" event="script" value="VIPtp.lua"/>

data/movements/scripts/VIPtp.lua
LUA:
local VIPposition = {x=EDIT, y=EDIT, z=EDIT}---- Tp to vip zone
function onStepIn(cid, item, pos)
if vip.hasVip(cid) == TRUE then
       if getPlayerStorageValue(cid,8900) == -1 then
         setPlayerStorageValue(cid,8900,1)
         doTeleportThing(cid,VIPposition) 
         doPlayerPopupFYI(cid,"Welcome to vip zone!!")
       else
           doTeleportThing(cid,VIPposition)
      end
end
return true
end

Put UID 5559 for TP that tps you to VIPzone.
You will have to, take out the positions of the tp at RME remember that.

You can put that in Vip tp and then just change this little thing at the other one:
LUA:
function onLogin(cid)
if vip.hasVip(cid) == FALSE then
   if getPlayerStorageValue(cid,8900) == 1 then
      doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs
      setPlayerPromotionLevel(cid,1)
   end
end
return true
end
 
It's not better do it in one script?? :huh:

LUA:
function onLogin(cid)
	if vip.hasVip(cid) == true then
		setPlayerStorageValue(cid, 20500, 1)
	elseif vip.hasVip(cid) == false and getPlayerStorageValue(cid, 20500) == 1 then
		doTeleportThing(cid, getPlayerMasterPos(cid))		
		setPlayerStorageValue(cid, 20500, -1)
		setPlayerPromotionLevel(cid,1)
	end
	return true
end
 
It's not better do it in one script?? :huh:

LUA:
function onLogin(cid)
	if vip.hasVip(cid) == true then
		setPlayerStorageValue(cid, 20500, 1)
	elseif vip.hasVip(cid) == false and getPlayerStorageValue(cid, 20500) == 1 then
		doTeleportThing(cid, getPlayerMasterPos(cid))		
		setPlayerStorageValue(cid, 20500, -1)
		setPlayerPromotionLevel(cid,1)
	end
	return true
end

I will test.

EDIT: Thank you, works 100%.
 
Last edited:

Similar threads

Back
Top