Jump to content
  • 0

python script


flygun

Question

  • Former Staff

hello guys i got made this python script as a start for learning python

import os
import app
import ui

class Points(ui.BoardWithTitleBar):
	def __init__(self):
		ui.BoardWithTitleBar.__init__(self)
		self.LoadServerWindowWindow()
		
	def __del__(self):
		ui.BoardWithTitleBar.__del__(self)
		
	def LoadServerWindowWindow(self):

		self.SetSize(200, 250)
		self.SetCenterPosition()
		self.AddFlag("movable")
		self.AddFlag("float")
		self.SetTitleName(" نقاط القتل ")
		self.Show()
		
		self.LoadButton()
		
	def LoadButton(self):
		self.b1 = ui.Button()
		self.b1.SetParent(self)
		self.b1.SetPosition(75, 220)
		self.b1.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
		self.b1.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
		self.b1.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
		self.b1.SetText(" اغلاق ")
		self.b1.SetEvent(self.close)
		self.b1.Show()

	def close(self):
		self.points.hide()
Points()

i got those things in game.py

			# Points system
			"points"				: self.points_show,
			# END of Points system
	# Points_system
	def points_show(self):
		import test_points
		self.points = test_points.points()
		self.Show()
	#END of Points_system

mmm let me say the the script right now is working

but the problem is

when i open any charectar the window shows

 

i got this as a quest

quest gm_panel begin 
    state start begin 
        when login with pc.is_gm() begin
            send_letter(" قائمه النقاط ")
        end
        when info or button begin
            say_title(" Team M2W ") 
            say(" هل تريد فتح القائمة ")
            local a = select(" نعم ")
            if a == 1 then
                cmdchat("points")
            end
        end 
    end 
end  
Link to comment
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
quest gm_panel begin
    state start begin
        when login with pc.is_gm() begin
            send_letter(" ????? ?????? ")
        end
        when info or button begin
            say_title(" Team M2W ")
            say(" ?? ???? ??? ??????? ")
            local a = select(" ??? ")
	    cmdchat("points")
        end
    end
end

Try this

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.