Jump to content
  • 0

need help with some premium account stuff


Golem1988

Question


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  162
  • Reputation:   1
  • Joined:  08/08/12
  • Last Seen:  

So, here are my premium onPCloginevent:

OnPCLoginEvent:
if( #PremiumUser > gettimetick(2) ) {
	sc_start SC_ITEMBOOST,( (#PremiumUser - gettimetick(2)) * 1000 ),50;
	sc_start SC_EXPBOOST,( (#PremiumUser - gettimetick(2)) * 1000 ),50;
	dispbottom "Premium will expell in: " + callfunc("Time2Str",#PremiumUser) + "";
	}
if( #PremiumUser <= gettimetick(2) ) {
	dispbottom "Premium time expelled.";
	query_sql "UPDATE `login` SET group_id = '0' WHERE account_id = "+getcharid(3)+"";
	}
end;
}

But, I want make something like:
if( #PremiumUser <= gettimetick(2) ) " and if player isn't group id 2 and higher, (if he is, that function works as needed, set group_id to 0)" { // this isn't a code, but some kind of code I want to see here,,, 
	dispbottom "Premium time expelled.";
	query_sql "UPDATE `login` SET group_id = '0' WHERE account_id = "+getcharid(3)+"";
   And make #premiumUser global reg value disappear as well. // not the code as well 
	}
end;
}

So, say: Account that has modaration options like mute and jail won't loose their group_id level when #premium ticktime is over. But, independend from group_id delete any sign of premium account if time has run out. Normal premiums like group id=1 will loose their group id, so it will be set to 0 back and also #premiumuser will be removed at all from global reg value.

Basicly I'm asking to help me to end this moment here, because when I try to make it myself, nothing good doesn't happen :D Thanks a lot for help.

Edited by Golem1988
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...