The Killer Posted February 22, 2014 Share Posted February 22, 2014 local Money = 50000 addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == GUIEditor_Button[1] ) then if ( guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) ~= -1 ) then if ( isElement( Sound ) ) then destroyElement( Sound ) end triggerServerEvent( "TakeMoney", localPlayer, tonumber( Money ) ) Sound = playSound("voice.wav") end end end ) Link to comment
#DRAGON!FIRE Posted February 22, 2014 Share Posted February 22, 2014 كان في اند ناقصة .. : انسخ الكود مرة ثانية Link to comment
Dr.Xen Posted February 22, 2014 Author Share Posted February 22, 2014 شف يخوي ذا الكود لمن ما يكون معه فلوس وضغط الزر على طول تجي تصويت ابيه لو معه فلوس واختار تجي تصويت function Click() if source == GUIEditor_Grid[1] then local tdma = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local tdma1 = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) if tdma or tdma1 then guiSetVisible(GUIEditor_Button[1],true) end elseif source == GUIEditor_Button[1] then local tdmaa = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local tdmaa1 = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) if not tdmaa or not tdmaa1 then return end triggerServerEvent("tdma", localPlayer, localPlayer,tdmaa1) end end addEventHandler("onClientGUIClick", root, Click) fileDelete("client.lua") local Money = 50000 addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == GUIEditor_Button[1] ) then if ( guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) ~= -1 ) then if ( isElement( Sound ) ) then destroyElement( Sound ) end triggerServerEvent( "TakeMoney", localPlayer, tonumber( Money ) ) Sound = playSound("voice.wav") end end end ) addEvent("tdma",true) addEventHandler("tdma",root, function (client, action) executeCommandHandler("votemap", client, "".. tostring(action)) end) addEvent( "TakeMoney", true ) addEventHandler( "TakeMoney", root, function( amount ) if ( amount ) then if ( getPlayerMoney( client ) >= amount ) then takePlayerMoney ( client, amount ) else outputChatBox ( "** You Don't have enough money"..amount, client, 255, 0, 0, true ) end end end ) 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