Jump to content

مساعده بالله


Recommended Posts

سلام عليكم ورحمة الله وبركاته

 

شباب انا سويت ماركر

اذا اللاعب لمس الماركر

يجيه مبلغ موجود انا احط قيمته في لوحة "

" edit

المشكلة الفلوس ماتيجي اعتقد في شي غلط !

client !

?
  1. sett = guiCreateButton(507, 278, 64, 37, "Set The Money", true)
    money = guiCreateEdit(448, 225, 166, 45, "", true)
    
    addEventHandler ( "onClientGUIClick", resourceRoot,
    function ( )
    if ( source == sett ) then
    local amount = guiGetText ( money )
    triggerServerEvent( "SendMoney", localPlayer, amount )
    end
    end
    )


 

server !

 

?
  1. addEvent ( "SendMoney", true )
    addEventHandler ( "SendMoney", root, Money )
    addEventHandler ( "onMarkerHit", resourceRoot, function ( element, amount )
    if ( source == myMarker1 ) thenif ( getElementType ( element ) == "player" ) then
    setMarkerSize( myMarker1, 0 )
    givePlayerMoney(source, tonumber(amount))
    sendClientMessage ( '- ' .. getPlayerName(element) .. ' money', root, 255, 23, 23, top, 15 )
    outputChatBox(" ", root, 183, 92, 38)
    
    end
    end
    end))
Edited by FOX_script
Link to comment
addEvent ( "SendMoney", true )
addEventHandler ( "SendMoney", root, 
addEventHandler ( "onMarkerHit", resourceRoot,
    function ( element, amount )
       if ( source == myMarker1 ) and ( getElementType ( element ) == "player" ) then
       destroyElement ( myMarker1 )
       givePlayerMoney(source, tonumber(amount))
       sendClientMessage ( '- ' .. getPlayerName(element) .. ' money', root, 255, 23, 23, top, 15 )
       outputChatBox(" ", root, 183, 92, 38)
     end
  end
 )

 

  • Like 1
Link to comment

Client

 

sett = guiCreateButton(507, 278, 64, 37, "Set The Money", true)
money = guiCreateEdit(448, 225, 166, 45, "", true)

addEventHandler ( "onClientGUIClick", root,
	function ( )
		if ( source == sett ) then
			local amount = guiGetText ( money )
			if ( amount ~= "" ) then
				setElementData(resourceRoot, "markerMoney", tonumber(amount))
				outputChatBox("Marker money : "..getElementData(resourceRoot,"markerMoney")..""),255,255,255,true)
			end
		end
	end
)

 

Server

 

addEventHandler ( "onMarkerHit", root, 
	function ( element )
		if ( source == myMarker1 ) and ( getElementType ( element ) == "player" ) then
			setMarkerSize( source, 0 )
			givePlayerMoney(element, getElementData(resourceRoot,"markerMoney"))
			sendClientMessage ( '- ' .. getPlayerName(element) .. ' money', root, 255, 23, 23, top, 15 )
			outputChatBox(" ", root, 183, 92, 38)
		end
	end
)

 

  • Like 1
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...