LiOneLMeSsIShoT Posted July 9, 2013 Share Posted July 9, 2013 When someone stop in the bank marker...every player in the server get the gui screen open over his face ....please help server Side local bank1 = createMarker ( 2290.8999023438, 537.09997558594, 0.80000001192093, "cylinder", 1.5, 255, 0, 0, 170 ) local bankBlip1 = createBlip ( 2290.8999023438, 537.09997558594, 0.80000001192093, 52, 2, 0, 0, 0, 255, 0, 15, getRootElement()) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("onSendVars", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("chatBank", true) function bankHit(thePlayer) outputChatBox("Welcome to Zombie Island Bank system", thePlayer, 255, 0, 0) triggerClientEvent ("CLBankGUI", getRootElement()) end addEventHandler( "onMarkerHit", bank1, bankHit ) addEventHandler( "onMarkerHit", bank2, bankHit ) addEventHandler( "onMarkerHit", bank3, bankHit ) addEventHandler( "onMarkerHit", bank4, bankHit ) addEventHandler( "onMarkerHit", bank5, bankHit ) addEventHandler( "onMarkerHit", bank6, bankHit ) addEventHandler( "onMarkerHit", bank7, bankHit ) addEventHandler( "onMarkerHit", bank8, bankHit ) addEventHandler( "onMarkerHit", bank9, bankHit ) addEventHandler( "onMarkerHit", bank10, bankHit ) addEventHandler( "onMarkerHit", bank11, bankHit ) addEventHandler( "onMarkerHit", bank12, bankHit ) addEventHandler( "onMarkerHit", bank13, bankHit ) function DepozytDoBanku(amount) if not (tonumber(amount) <= 0) then local bankBalance = getAccountData (getPlayerAccount (source), "clroleplay-bank") takePlayerMoney(source, amount) amount2 = bankBalance + amount setAccountData (getPlayerAccount (source), "clroleplay-bank", amount2) outputChatBox("Your bank balance: " .. amount2 .. "$!", source, 255, 255, 0) else outputChatBox("Don't try to deposit " .. amount .. "$! =]", source, 255, 0, 0) end end addEventHandler( "DepozytBank", getRootElement(), DepozytDoBanku ) function potrzebaBalansu() local balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") --New player anty-bug if(tostring(balans) == "false" or tostring(balans) == "")then setAccountData (getPlayerAccount (source), "clroleplay-bank", 0) balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") end triggerClientEvent ("otoBalans", getRootElement(), balans) end addEventHandler( "potrzebujeBankBalance", getRootElement(), potrzebaBalansu ) function chatBank() local balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") triggerClientEvent ("bankBalanceChat", getRootElement(), balans) end addEventHandler( "chatBank", getRootElement(), chatBank ) function WyplacZBanku(amount) local BankCash = getAccountData (getPlayerAccount (source), "clroleplay-bank") if (tonumber(amount) <= tonumber(BankCash)) then if(tonumber(amount) >= 1) then amount2 = BankCash-amount setAccountData (getPlayerAccount (source), "clroleplay-bank", amount2) givePlayerMoney(source, amount) outputChatBox("Your bank balance: " .. amount2 .. "$!", source, 255, 255, 0) else outputChatBox("Withdrawing " .. amount .. "$ is impossible!", source, 255, 0, 0) end else outputChatBox("You entered wrong value!", source, 255, 0, 0) outputChatBox("Your bank balance is " .. BankCash .. "$!", source, 255, 0, 0) end end addEventHandler( "WyplacBank", getRootElement(), WyplacZBanku ) Client Side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance ) ERRORS: WARRNING: bankfixed\bank.lua:19: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:20: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:21: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:22: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:23: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:24: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:25: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:26: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:27: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:28: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] ]WARRNING: bankfixed\bank.lua:29: bad argument @ 'addEventHandler' [expected element at argument 2, got nil] Link to comment
iPrestege Posted July 9, 2013 Share Posted July 9, 2013 is this script for you because the error's mean the marker's doesn't exists. Post the trigger to client part to show the gui? Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 is this script for you because the error's mean the marker's doesn't exists.Post the trigger to client part to show the gui? the script get me this errors in cmd window...but it works fine..but the problem it open the gui screen over all players if someone stop in the marker. Link to comment
iPrestege Posted July 9, 2013 Share Posted July 9, 2013 As i said above post the part when you trigger to client to show the gui? Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 anyways why the labels are noted at the script? Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 As i said above post the part when you trigger to client to show the gui? addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 and how many markers you made? Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 and how many markers you made? you didn't check the scripts? it's just one marker i made..when i downloaded the script it was more than 5 i made it 1 as i wanted Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 and how many markers you made? you didn't check the scripts? it's just one marker i made..when i downloaded the script it was more than 5 i made it 1 as i wanted so it's leaked Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 and how many markers you made? you didn't check the scripts? it's just one marker i made..when i downloaded the script it was more than 5 i made it 1 as i wanted so it's leaked Leaked? what you mean about it..anyways someone can fix the script guys ? Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 We don't give support with leaked scripts.Topic locked. As Castillo says. Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 We don't give support with leaked scripts.Topic locked. As Castillo says. it just posted in resources mta just downloaded and changed the marker No more it's problem? and it's the link https://community.multitheftauto.com/index.php?p= ... ls&id=6304 Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 Read the post 'iFahad'. """As i said above post the part when you trigger to client to show the gui?""" It's server side: function bankHit(thePlayer) outputChatBox("Welcome to Zombie Island Bank system", thePlayer, 255, 0, 0) triggerClientEvent ("CLBankGUI", getRootElement()) end addEventHandler( "onMarkerHit", bank1, bankHit ) addEventHandler( "onMarkerHit", bank2, bankHit ) addEventHandler( "onMarkerHit", bank3, bankHit ) addEventHandler( "onMarkerHit", bank4, bankHit ) addEventHandler( "onMarkerHit", bank5, bankHit ) addEventHandler( "onMarkerHit", bank6, bankHit ) addEventHandler( "onMarkerHit", bank7, bankHit ) addEventHandler( "onMarkerHit", bank8, bankHit ) addEventHandler( "onMarkerHit", bank9, bankHit ) addEventHandler( "onMarkerHit", bank10, bankHit ) addEventHandler( "onMarkerHit", bank11, bankHit ) addEventHandler( "onMarkerHit", bank12, bankHit ) addEventHandler( "onMarkerHit", bank13, bankHit ) Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 Read the post 'iFahad'. """As i said above post the part when you trigger to client to show the gui?""" It's server: function bankHit(thePlayer) outputChatBox("Welcome to Zombie Island Bank system", thePlayer, 255, 0, 0) triggerClientEvent ("CLBankGUI", getRootElement()) end addEventHandler( "onMarkerHit", bank1, bankHit ) addEventHandler( "onMarkerHit", bank2, bankHit ) addEventHandler( "onMarkerHit", bank3, bankHit ) addEventHandler( "onMarkerHit", bank4, bankHit ) addEventHandler( "onMarkerHit", bank5, bankHit ) addEventHandler( "onMarkerHit", bank6, bankHit ) addEventHandler( "onMarkerHit", bank7, bankHit ) addEventHandler( "onMarkerHit", bank8, bankHit ) addEventHandler( "onMarkerHit", bank9, bankHit ) addEventHandler( "onMarkerHit", bank10, bankHit ) addEventHandler( "onMarkerHit", bank11, bankHit ) addEventHandler( "onMarkerHit", bank12, bankHit ) addEventHandler( "onMarkerHit", bank13, bankHit ) Client: I don't know use the function ClientSide guiSetVisible Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 Read the post 'iFahad'. """As i said above post the part when you trigger to client to show the gui?""" It's server: function bankHit(thePlayer) outputChatBox("Welcome to Zombie Island Bank system", thePlayer, 255, 0, 0) triggerClientEvent ("CLBankGUI", getRootElement()) end addEventHandler( "onMarkerHit", bank1, bankHit ) addEventHandler( "onMarkerHit", bank2, bankHit ) addEventHandler( "onMarkerHit", bank3, bankHit ) addEventHandler( "onMarkerHit", bank4, bankHit ) addEventHandler( "onMarkerHit", bank5, bankHit ) addEventHandler( "onMarkerHit", bank6, bankHit ) addEventHandler( "onMarkerHit", bank7, bankHit ) addEventHandler( "onMarkerHit", bank8, bankHit ) addEventHandler( "onMarkerHit", bank9, bankHit ) addEventHandler( "onMarkerHit", bank10, bankHit ) addEventHandler( "onMarkerHit", bank11, bankHit ) addEventHandler( "onMarkerHit", bank12, bankHit ) addEventHandler( "onMarkerHit", bank13, bankHit ) Client: I don't know use the function ClientSide guiSetVisible can you put it? Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 post the codes client side and server side Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 post the codes client side and server side Server Side: local bank1 = createMarker ( 2290.8999023438, 537.09997558594, 0.80000001192093, "cylinder", 1.5, 255, 0, 0, 170 ) local bankBlip1 = createBlip ( 2290.8999023438, 537.09997558594, 0.80000001192093, 52, 2, 0, 0, 0, 255, 0, 15, getRootElement()) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("onSendVars", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("chatBank", true) function bankHit(thePlayer) outputChatBox("Welcome to Zombie Island Bank system", thePlayer, 255, 0, 0) triggerClientEvent ("CLBankGUI", getRootElement()) end addEventHandler( "onMarkerHit", bank1, bankHit ) addEventHandler( "onMarkerHit", bank2, bankHit ) addEventHandler( "onMarkerHit", bank3, bankHit ) addEventHandler( "onMarkerHit", bank4, bankHit ) addEventHandler( "onMarkerHit", bank5, bankHit ) addEventHandler( "onMarkerHit", bank6, bankHit ) addEventHandler( "onMarkerHit", bank7, bankHit ) addEventHandler( "onMarkerHit", bank8, bankHit ) addEventHandler( "onMarkerHit", bank9, bankHit ) addEventHandler( "onMarkerHit", bank10, bankHit ) addEventHandler( "onMarkerHit", bank11, bankHit ) addEventHandler( "onMarkerHit", bank12, bankHit ) addEventHandler( "onMarkerHit", bank13, bankHit ) function DepozytDoBanku(amount) if not (tonumber(amount) <= 0) then local bankBalance = getAccountData (getPlayerAccount (source), "clroleplay-bank") takePlayerMoney(source, amount) amount2 = bankBalance + amount setAccountData (getPlayerAccount (source), "clroleplay-bank", amount2) outputChatBox("Your bank balance: " .. amount2 .. "$!", source, 255, 255, 0) else outputChatBox("Don't try to deposit " .. amount .. "$! =]", source, 255, 0, 0) end end addEventHandler( "DepozytBank", getRootElement(), DepozytDoBanku ) function potrzebaBalansu() local balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") --New player anty-bug if(tostring(balans) == "false" or tostring(balans) == "")then setAccountData (getPlayerAccount (source), "clroleplay-bank", 0) balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") end triggerClientEvent ("otoBalans", getRootElement(), balans) end addEventHandler( "potrzebujeBankBalance", getRootElement(), potrzebaBalansu ) function chatBank() local balans = getAccountData (getPlayerAccount (source), "clroleplay-bank") triggerClientEvent ("bankBalanceChat", getRootElement(), balans) end addEventHandler( "chatBank", getRootElement(), chatBank ) function WyplacZBanku(amount) local BankCash = getAccountData (getPlayerAccount (source), "clroleplay-bank") if (tonumber(amount) <= tonumber(BankCash)) then if(tonumber(amount) >= 1) then amount2 = BankCash-amount setAccountData (getPlayerAccount (source), "clroleplay-bank", amount2) givePlayerMoney(source, amount) outputChatBox("Your bank balance: " .. amount2 .. "$!", source, 255, 255, 0) else outputChatBox("Withdrawing " .. amount .. "$ is impossible!", source, 255, 0, 0) end else outputChatBox("You entered wrong value!", source, 255, 0, 0) outputChatBox("Your bank balance is " .. BankCash .. "$!", source, 255, 0, 0) end end addEventHandler( "WyplacBank", getRootElement(), WyplacZBanku ) Client Side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance ) Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 ServerSide: no Tested GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () guiSetVisible(GUIEditor_Window[1], true) triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance ) Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 ServerSide:no Tested GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () guiSetVisible(GUIEditor_Window[1], true) triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance ) what you mean with no tested man? i think you can't understand the errors in the script ? Link to comment
LiOneLMeSsIShoT Posted July 9, 2013 Author Share Posted July 9, 2013 ServerSide:no Tested GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () guiSetVisible(GUIEditor_Window[1], true) triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance ) what you mean with no tested man? i think you don't understand the errors in the script ? Link to comment
فاّرس Posted July 9, 2013 Share Posted July 9, 2013 (edited) Line : 19 = bank3 20 = bank4 21 = bank5 22 = bank6 23 = bank7 24 = bank8 25 = bank9 26 = bank10 29 = bank11 it's not define. and why try 'addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("otoBalans", true)' in the client and server ?? Edited July 9, 2013 by Guest Link to comment
iMr.3a[Z]eF Posted July 9, 2013 Share Posted July 9, 2013 Line : 19 = bank3 20 = bank4 21 = bank5 22 = bank6 23 = bank7 24 = bank8 25 = bank9 26 = bank10 29 = bank11 it's not define. in Other words: where are the other makers?. Link to comment
iPrestege Posted July 9, 2013 Share Posted July 9, 2013 I said trigger not the event -_-'! Link to comment
فاّرس Posted July 9, 2013 Share Posted July 9, 2013 I say you want this , local bank3 = createMarker(...) local bank4 = createMarker(...) local bank5 = createMarker(...) local bank6 = createMarker(...) local bank7 = createMarker(...) local bank8 = createMarker(...) local bank9 = createMarker(...) local bank10 = createMarker(...) local bank11 = createMarker(...) for the event ' onMarkerHit'. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now