IIIIlllllIII Posted September 12, 2011 Share Posted September 12, 2011 hi i make shop for buy weapons without guieditor and i have problem my problem i want if i press the button of the weapon i buy the weapon that is i mean when i buy the weapon i prees the button and i buy it i hope you understand me this is my code shopWindow = guiCreateWindow(220,100,544,435,"Shop MOJRM-511",false) guiSetVisible (shopWindow, false) guiWindowSetSizable(shopWindow,false) tabPanel = guiCreateTabPanel(11,23,544,472,false,shopWindow) tab = guiCreateTab("info",tabPanel) tab = guiCreateTab("buy weapons",tabPanel) guiWindowSetMovable(tab,false) --------- السطر 1------ guiCreateStaticImage( 10,10,90,75, "weapon/4.png", false,tab ) weapButton = guiCreateButton(10,80,90,30,"$500 knif",false,tab) guiCreateStaticImage( 110,10,90,75, "weapon/2.png", false,tab ) weapButton = guiCreateButton(110,80,90,20,"$900 dod",false,tab) guiCreateStaticImage( 210,10,90,75, "weapon/3.png", false,tab ) weapButton = guiCreateButton(210,80,90,20,"M4",false,tab) bindKey ( "F2" , "down" , function() guiSetVisible ( shopWindow , not guiGetVisible ( shopWindow ) ) showCursor ( guiGetVisible ( shopWindow ) ) end ) how i buy the weapon if i press on the button on the weapon ? Link to comment
JR10 Posted September 12, 2011 Share Posted September 12, 2011 I'm not giving you the code, forget it. I hope no one does actually. onClientGUIClick, triggerServerEvent, giveWeapon Link to comment
IIIIlllllIII Posted September 12, 2011 Author Share Posted September 12, 2011 I'm not giving you the code, forget it.I hope no one does actually. onClientGUIClick, triggerServerEvent, giveWeapon wtf you dont want help people to make scripts if you dont want help me so why you replay in my topic? Link to comment
JR10 Posted September 13, 2011 Share Posted September 13, 2011 This forum is not made for "Give me code". It's for helping you with your code. Guys like you, don't even read the script we give them, and ask the same question later. If you just put some effort, you will get what you want. I gave you what you will need. --client addEventHandler ( "onClientResourceStart", button, function() triggerServerEvent ( "event", localPlayer ) end) -server addEvent("event", true ) addEventHandler ( "event", root , function() giveWeapon ( source, 32, 500) end) wtf you dont want help people to make scriptsif you dont want help me so why you replay in my topic? I did, I gave you the things you will need, which is help, but not according to you, full code is the help in your dictionary. and, I don't want to help? Yeah yeah, right. I'm not like Castillo, that's true, but I help, at least I try. Link to comment
IIIIlllllIII Posted September 13, 2011 Author Share Posted September 13, 2011 thank you so mutch man dont blame me im trying to make it work but thank you so mutch for the help and replay and i am sorry for replay and say wtf to you i know you maybe busy and all guys busy they maybe dont have time to give me all codes i know and sorry agine thank you Link to comment
Castillo Posted September 13, 2011 Share Posted September 13, 2011 This forum is not made for "Give me code".It's for helping you with your code. Guys like you, don't even read the script we give them, and ask the same question later. If you just put some effort, you will get what you want. I gave you what you will need. --client addEventHandler ( "onClientResourceStart", button, function() triggerServerEvent ( "event", localPlayer ) end) -server addEvent("event", true ) addEventHandler ( "event", root , function() giveWeapon ( source, 32, 500) end) wtf you dont want help people to make scriptsif you dont want help me so why you replay in my topic? I did, I gave you the things you will need, which is help, but not according to you, full code is the help in your dictionary. and, I don't want to help? Yeah yeah, right. I'm not like Castillo, that's true, but I help, at least I try. What do you mean "Like Castillo"? you mean that I give out the code? if so, I don't do that always, just some times. Link to comment
JR10 Posted September 13, 2011 Share Posted September 13, 2011 Not as good. They just Copy+Paste, when you give them the code, and they don't look at it. Link to comment
BinSlayer1 Posted September 13, 2011 Share Posted September 13, 2011 https://wiki.multitheftauto.com/wiki/Int ... the_button If you had just read the gui scripting tutorial this question wouldn't be here mta wiki has examples of scripts and how to do various stuff 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