Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ammunation_Window = {}
- Ammunation_Image = {}
- function menu_close()
- showCursor(false)
- guiSetVisible( Ammunation_Window[1], false )
- end
- function menu_show()
- guiSetVisible( Ammunation_Window[1], true )
- end
- local mar = createMarker ( 295.02026367188, -37.797130584717, 1001.515625, cylinder, 1, 255, 0, 0 )
- local mar2 = createMarker ( 296.60397338867, -80.450172424316, 1001.515625, cylinder, 1, 255, 0, 0 )
- local mar3 = createMarker ( 290.08682250977, -109.44632720947, 1001.515625, cylinder, 1, 255, 0, 0 )
- local mar4 = createMarker ( 316.5299987793, -169.61000061035, 999.60101318359, cylinder, 1, 255, 0, 0 )
- function markertarget()
- setMarkerTarget ( mar, 295.02026367188, -37.797130584717, 1001.515625 )
- end
- function markertarget2()
- setMarkerTarget ( mar2, 296.60397338867, -80.450172424316, 1001.515625 )
- end
- function markertarget3()
- setMarkerTarget ( mar3, 290.08682250977, -109.44632720947, 1001.515625 )
- end
- function markertarget4()
- setMarkerTarget ( mar4, 316.5299987793, -169.61000061035, 999.60101318359 )
- end
- function MarkerHit( hitPlayer, matchingDimension, markerName )
- local x,y,z = getMarkerTarget( source, markerName ) -- get the marker target
- if x ~= false then
- if getElementType(hitPlayer)=="player" then
- showCursor(true)
- local screenWidth, screenHeight = guiGetScreenSize()
- local windowWidth, windowHeight = 828, 242
- local left = screenWidth/2 - windowWidth/2
- local top = screenHeight/2 - windowHeight/2
- --GUI
- Ammunation_Window[1] = guiCreateWindow(left, top, windowWidth, windowHeight,"San Andreas Ammunation",false)
- guiWindowSetSizable(Ammunation_Window[1],false)
- Ammunation_Image[1] = guiCreateStaticImage(35,43,64,64,"images/ammu/katana.png",false,Ammunation_Window[1])
- Ammunation_Image[2] = guiCreateStaticImage(133,41,64,64,"images/ammu/silencer.png",false,Ammunation_Window[1])
- Ammunation_Image[3] = guiCreateStaticImage(232,41,64,64,"images/ammu/deagle.png",false,Ammunation_Window[1])
- Ammunation_Image[4] = guiCreateStaticImage(331,41,64,64,"images/ammu/combatshotgun.png",false,Ammunation_Window[1])
- Ammunation_Image[5] = guiCreateStaticImage(532,41,64,64,"images/ammu/ak47.png",false,Ammunation_Window[1])
- Ammunation_Image[6] = guiCreateStaticImage(634,41,64,64,"images/ammu/m4a1.png",false,Ammunation_Window[1])
- Ammunation_Image[7] = guiCreateStaticImage(431,41,64,64,"images/ammu/tec9.png",false,Ammunation_Window[1])
- Ammunation_Image[8] = guiCreateStaticImage(733,41,64,64,"images/ammu/sniper.png",false,Ammunation_Window[1])
- NINJAROPE = guiCreateButton(122,110,83,50,"Comprar\nCorda Ninja\n$12.500",false,Ammunation_Window[1])
- KATANA = guiCreateButton(22,110,83,50,"Comprar\nKatana\n$200",false,Ammunation_Window[1])
- DEAGLE = guiCreateButton(221,110,83,50,"Comprar\nDesert Eagle\n$500",false,Ammunation_Window[1])
- CSHOTGUN = guiCreateButton(321,110,83,50,"Comprar\nC. Shotgun\n$800",false,Ammunation_Window[1])
- AK47 = guiCreateButton(523,110,83,50,"Comprar\nAK47\n$1.600",false,Ammunation_Window[1])
- M4A1 = guiCreateButton(624,110,83,50,"Comprar\nM4A1\n$1.900",false,Ammunation_Window[1])
- TEC9 = guiCreateButton(422,110,83,50,"Comprar\nTEC9\n$600",false,Ammunation_Window[1])
- SNIPER = guiCreateButton(724,110,83,50,"Comprar\nSniper Rifle\n$2.500",false,Ammunation_Window[1])
- CLOSE = guiCreateButton(330,179,167,36,"Sair",false,Ammunation_Window[1])
- addEventHandler ( "onClientGUIClick", CLOSE, menu_close, false )
- addEventHandler ( "onClientGUIClick", KATANA, gKatana, false )
- addEventHandler ( "onClientGUIClick", DEAGLE, gdeagle, false )
- addEventHandler ( "onClientGUIClick", NINJAROPE, gGrapple, false )
- addEventHandler ( "onClientGUIClick", CSHOTGUN, gShotgun, false )
- addEventHandler ( "onClientGUIClick", TEC9, gTec9, false )
- addEventHandler ( "onClientGUIClick", AK47, gAK47, false )
- addEventHandler ( "onClientGUIClick", M4A1, gM4A1, false )
- addEventHandler ( "onClientGUIClick", SNIPER, gSniper, false )
- end
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), markertarget, mar, MarkerHit, menu_show )
- addEventHandler ( "onClientMarkerHit", getRootElement(), markertarget2, mar2, MarkerHit, menu_show )
- addEventHandler ( "onClientMarkerHit", getRootElement(), markertarget3, mar3, MarkerHit, menu_show )
- addEventHandler ( "onClientMarkerHit", getRootElement(), markertarget4, mar4, MarkerHit, menu_show )
- function gKatana( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 199) then
- takePlayerMoney ( 200 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "8","100" )
- outputChatBox("* Você comprou uma Katana por $200!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gdeagle( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 499) then
- takePlayerMoney ( 500 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "24","200" )
- outputChatBox("* Você comprou uma Desert Eagle por $500!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gGrapple( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 12499) then
- takePlayerMoney ( 12500 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "23","200" )
- outputChatBox("* Você comprou uma \"Corda Ninja\" por $12.500!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gShotgun( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 799) then
- takePlayerMoney ( 800 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "27","200" )
- outputChatBox("* Você comprou uma Combat Shotgun por $800!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gTec9( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 599) then
- takePlayerMoney ( 600 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "32","350" )
- outputChatBox("* Você comprou uma TEC9 por $600!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gAK47( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 1599) then
- takePlayerMoney ( 1600 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "30","350" )
- outputChatBox("* Você comprou uma AK47 por $1.600!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gM4A1( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 1899) then
- takePlayerMoney ( 1900 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "31","350" )
- outputChatBox("* Você comprou uma M4A1 por $1.900!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- function gSniper( thePlayer )
- local money = getPlayerMoney(thePlayer)
- if (money > 2499) then
- takePlayerMoney ( 2500 )
- triggerServerEvent ( "giveweapon", getLocalPlayer(), "34","200" )
- outputChatBox("* Você comprou uma Sniper Rifle por $2.500!", thePlayer )
- else
- outputChatBox("* Você não possui dinheiro suficiente!", thePlayer )
- end
- end
- addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )
Advertisement
Add Comment
Please, Sign In to add comment