RdX Posted May 30, 2013 Share 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 Link to comment
iPrestege Posted May 30, 2013 Share 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 . Link to comment
RdX Posted May 30, 2013 Author Share Posted May 30, 2013 Thank you Mr.Pres[T]age i now make "onClientGUIClick" but in Server or Client ? Link to comment
iPrestege Posted May 30, 2013 Share 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 . Link to comment
RdX Posted May 30, 2013 Author Share Posted May 30, 2013 Please Pres[T]ege Add me On Skype : Twixed1 i need talk with you mate Link to comment
iPrestege Posted May 30, 2013 Share Posted May 30, 2013 Just post here please if you need a help . Link to comment
RdX Posted May 30, 2013 Author Share 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 ) Link to comment
RdX Posted May 31, 2013 Author Share Posted May 31, 2013 you can edit in my lua and i thank you for your helping please mate Link to comment
RdX Posted May 31, 2013 Author Share 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 Link to comment
iPrestege Posted May 31, 2013 Share 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 . Link to comment
iPrestege Posted May 31, 2013 Share Posted May 31, 2013 Done? Yes but change the window variable because it's not defined as what i said above!! Link to comment
RdX Posted May 31, 2013 Author Share Posted May 31, 2013 Thank you mate i chg window i very very Thank you Link to comment
Sora Posted May 31, 2013 Share 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 . Link to comment
Recommended Posts