Jump to content

help ^_^ with my first shop resource


IIIIlllllIII

Recommended Posts

hi

i make shop for buy weapons without guieditor 8)

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

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 scripts

if 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
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 scripts

if 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

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...