Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_name("GuiMakegun for Samp RP")
- script_author("Laine_prikol")
- script_description("GUI for command sellgun Samp RP or other servers with SRP gamemode")
- require "lib.moonloader"
- require "lib.sampfuncs"
- function main()
- activation_key = 73 -- You can change this key
- patrons = 1
- guname = "none"
- result, playerid = sampGetPlayerIdByCharHandle(playerPed)
- sampAddChatMessage("GuiMakegun by Laine_prikol loaded Press I to open menu!", 0x00ff00)
- while true do
- wait(0)
- if isKeyDown(activation_key) then
- sampShowDialog(20, "GUIMakeGun for Samp-RP", "SDPistol 15 material-clip\nDeagle 21 material-clip\nShotgun 3 material-ammo\nSMG 60 material-clip\nAK-47 90 material-clip\nM4 150 material-clip\nRifle 5 material-ammo", "Make", "Close", 2)
- dialogresponse()
- dialogresponse2()
- end
- end
- end
- function dialogresponse()
- repeat
- wait(0)
- result, button, list, input = sampHasDialogRespond(20)
- until result
- if list == 0 then
- sampShowDialog(21, "Input", "Enter ammo for SDPistol:", "Make", "Close", 1)
- guname = "SdPistol"
- end
- if list == 1 then
- sampShowDialog(21, "Input", "Enter ammo for Deagle:", "Make", "Close", 1)
- guname = "Deagle"
- end
- if list == 2 then
- sampShowDialog(21, "Input", "Enter ammo for Shotgun:", "Make", "Close", 1)
- guname = "Shotgun"
- end
- if list == 3 then
- sampShowDialog(21, "Input", "Enter ammo for SMG:", "Make", "Close", 1)
- guname = "SMG"
- end
- if list == 4 then
- sampShowDialog(21, "Input", "Enter ammo for AK-47:", "Make", "Close", 1)
- guname = "AK-47"
- end
- if list == 5 then
- sampShowDialog(21, "Input", "Enter ammo for M4:", "Make", "Close", 1)
- guname = "M4"
- end
- if list == 6 then
- sampShowDialog(21, "Input", "Enter ammo for Rifle:", "Make", "Close", 1)
- guname = "Rifle"
- end
- end
- function dialogresponse2()
- repeat
- wait(0)
- result, button, list, input = sampHasDialogRespond(21)
- until result
- patrons = input
- sampAddChatMessage("You make: "..guname.." with "..patrons.." ammo", 0xffff00)
- sampSendChat("/sellgun "..guname.." "..patrons.." 4 "..playerid)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement