RdX Posted May 30, 2013 Posted May 30, 2013 Hi Guys How are u i make a new script for race dm name : Donator i need ur help in this Script and i create Button i need press button open window you know how And sorry for bad english This is my code panel = guiCreateWindow ( 0, 0, 0.5, 0.4, "Donator", true ) Tabpanel = guiCreateTabPanel ( 450, 250, 500, 400, false, panel ) TabDonator = guiCreateTab( "Donator", Tabpanel ) donator_store = guiCreateButton(380, 450, 110, 40, "Donator Store", false, TabDonator) elseif source == donator_store if getElementData(getLocalPlayer(), "isDonator") then guiSetVisible (donator_store_window, true) else outputChatBox("[Donator] Sorry, this is only for donators", getLocalPlayer(), 255,0,0) end Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
iPrestege Posted May 30, 2013 Posted May 30, 2013 You're not make a sense sorry use the 'onClientGUIClick' Event and there's no need for player element at chat box .
RdX Posted May 30, 2013 Author Posted May 30, 2013 Thank you Mr.Pres[T]age i now make "onClientGUIClick" but in Server or Client ? Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
iPrestege Posted May 30, 2013 Posted May 30, 2013 It's a client side if there's 'client' word at the event or function that means it's a client side and the color should be read .
RdX Posted May 30, 2013 Author Posted May 30, 2013 Please Pres[T]ege Add me On Skype : Twixed1 i need talk with you mate Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
RdX Posted May 30, 2013 Author Posted May 30, 2013 now my code panel = guiCreateWindow ( 0, 0, 0.5, 0.4, "UserPanel -ASG//", true ) Tabpanel = guiCreateTabPanel ( 450, 250, 500, 400, false, panel ) TabDonator = guiCreateTab( "Donator", Tabpanel ) donator_store = guiCreateButton(380, 450, 110, 40, "Donator Store", false, TabDonator) elseif source == donator_store if getElementData(getLocalPlayer(), "isDonator") then guiSetVisible (donator_store_window, true) else outputChatBox("[Donator] Sorry, this is only for donators", getLocalPlayer(), 255,0,0) end addEventHandler ( "onClientGUIClick", donator_store, guiCreateWindow, false ) Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
RdX Posted May 31, 2013 Author Posted May 31, 2013 you can edit in my lua and i thank you for your helping please mate Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
RdX Posted May 31, 2013 Author Posted May 31, 2013 new code panel = guiCreateWindow ( 0, 0, 0.5, 0.4, "UserPanel -ASG//", true ) Tabpanel = guiCreateTabPanel ( 450, 250, 500, 400, false, panel ) TabDonator = guiCreateTab( "Donator", Tabpanel ) donatebut = guiCreateButton(380, 450, 110, 40, "Donator Store", false, TabDonator) elseif source == donatebut if getElementData(getLocalPlayer(), "isDonator") then guiSetVisible (donator_store_window, true) else outputChatBox("[Donator] Sorry, this is only for donators", getLocalPlayer(), 255,0,0) end addEventHandler ( "onClientGUIClick", donatebut, outputwnd, false ) function outputwnd ( donatebut ) if button == "left" then local wnd = guiCreateWindow ( 0, 0, 0.5, 0.4, "Donate System", true ) end end Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
iPrestege Posted May 31, 2013 Posted May 31, 2013 Please don't make a double posts ! panel = guiCreateWindow ( 0, 0, 0.5, 0.4, "UserPanel -ASG//", true ) Tabpanel = guiCreateTabPanel ( 450, 250, 500, 400, false, panel ) TabDonator = guiCreateTab( "Donator", Tabpanel ) donatebut = guiCreateButton(380, 450, 110, 40, "Donator Store", false, TabDonator) function outputwnd ( ) if getElementData(getLocalPlayer(), "isDonator") then guiSetVisible (donator_store_window, true) else outputChatBox("[Donator] Sorry, this is only for donators", 255,0,0) end end addEventHandler ( "onClientGUIClick", donatebut, outputwnd, false ) donator_store_window = is not defined any where .
RdX Posted May 31, 2013 Author Posted May 31, 2013 Done ? Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
iPrestege Posted May 31, 2013 Posted May 31, 2013 Done? Yes but change the window variable because it's not defined as what i said above!!
RdX Posted May 31, 2013 Author Posted May 31, 2013 Thank you mate i chg window i very very Thank you Level in Scripting : 37% Level in MTA : 100% Language in English : 100%
Sora Posted May 31, 2013 Posted May 31, 2013 Any other language except english is not allowed in this section .. also keep in mind that we don't help robbers Please lock the topic . [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
Recommended Posts