Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import es
- import popuplib
- myPopup = None
- def load():
- global myPopup
- # Create a new Popup_popup object using the create method from popuplib:
- myPopup = popuplib.create('example_popup')
- # add some stuff to it in a few languages:
- myPopup.addline("Infinite Rulez!")
- myPopup.addline("-------------------------------")
- myPopup.addline("->1. No Racism! = Kick")
- myPopup.addline("->2. No Hack/Bhop Hack! = Ban")
- myPopup.addline("->3. Dont Advertise! = Permenant Ban")
- myPopup.addline("->4. Dont Block Others! = Ban")
- myPopup.addline("->5. Dont Spamm! = Kick/Ban")
- myPopup.addline("->6. No Exploits/Server Hacks = Ban")
- myPopup.addline("------------------------------------")
- myPopup.addline("0. Close")
- # another way to add multiple language content is using a dict-like object:
- text = {
- 'en': 'This is a test',
- 'de': 'Dies ist ein Test',
- 'fi': 'Testataan vaan...',
- }
- myPopup.addline(text)
- def player_jump(event_var):
- # Let's greet the jumping player with our popup
- myPopup.send(event_var['userid'])
- def unload():
- # Script unloading, remove the popup from taking memory
- myPopup.delete()
Add Comment
Please, Sign In to add comment