Jump to content

Solidsnake14 plz help me trying to make shop work


IIIIlllllIII

Recommended Posts

this topic for only Solidsnake14

the is pro in scripter :lol:

i try to make shop for buy the weapons and i have problem with it

see the code first

shopWindow = guiCreateWindow(220,100,544,435,"Shop MOJRM-511 1.1",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 -line 1 ----- 
  
  
function initGUI( ) 
   guiCreateStaticImage( 10,10,90,75, "weapon/4.png", false,tab ) 
weapButton = guiCreateButton(10,80,90,30,"$500        knif",false,tab) 
 addEventHandler ( "onClientGUIClick", weapButton, outputEditBox, false ) 
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, " has been buy it knif", false ) 
end 
addEventHandler ( "onClientResourceStart", weapButton ) 
function weapButton() 
triggerServerEvent ( "event", localPlayer ,weapButton ) 
end 
------------------------------------ 
    
     
     
   guiCreateStaticImage( 110,10,90,75, "weapon/2.png", false,tab ) 
weapButton = guiCreateButton(110,80,90,30,"$900    dod",false,tab) 
--------------------------------- 
   guiCreateStaticImage( 210,10,90,75, "weapon/3.png", false,tab ) 
weapButton = guiCreateButton(210,80,90,30,"M4",false,tab) 
--------------------------------- 
  guiCreateStaticImage( 310,10,90,75, "weapon/1.png", false,tab ) 
weapButton = guiCreateButton(310,80,90,30,"M4",false,tab) 
-------------------------------- 
  guiCreateStaticImage( 410,10,90,75, "weapon/5.png", false,tab ) 
weapButton = guiCreateButton(410,80,90,30,"M4",false,tab) 
  
-------------------------2 السطر 
  guiCreateStaticImage( 10,110,90,80, "weapon/6.png", false,tab ) 
weapButton = guiCreateButton(10,190,90,30,"M4",false,tab) 
  
  guiCreateStaticImage( 110,110,90,80, "weapon/7.png", false,tab ) 
weapButton = guiCreateButton(110,190,90,30,"M4",false,tab) 
  
  
  guiCreateStaticImage( 210,110,90,80, "weapon/8.png", false,tab ) 
weapButton = guiCreateButton(210,190,90,30,"M4",false,tab) 
  
  
  
  guiCreateStaticImage( 310,110,90,80, "weapon/9.png", false,tab ) 
weapButton = guiCreateButton(310,190,90,30,"M4",false,tab) 
  
  guiCreateStaticImage( 410,110,90,80, "weapon/10.png", false,tab ) 
weapButton = guiCreateButton(410,190,90,30,"M4",false,tab) 
  
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text )  
    end 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
  
bindKey ( "F2" , "down" , function() guiSetVisible ( shopWindow , not guiGetVisible ( shopWindow ) ) showCursor ( guiGetVisible ( shopWindow ) ) end ) 
  
  
  
  
  
  
  

if you see line 1 im trying to bind button on buy knif if i press the button i want buy the knif and

when i buy knif output msg on chatbox i wanna make it work

man i want make shop work great i try to make it since 3 days :|

Link to comment

For your information, TAPL, the author is trying to script a SHOP script, seriously, did you make that reply just to gain post count? because... that's what it looks like.

Now, back on topic.

In order to give the player a weapon, you'll need a trigger to the server side, because giveWeapon is only server side.

I fixed your script errors, but I didn't make the script to give the weapons, you'll need to learn how to.

function initGUI( ) 
shopWindow = guiCreateWindow(220,100,544,435,"Shop MOJRM-511 1.1",false) 
guiSetVisible (shopWindow, false) 
guiWindowSetSizable(shopWindow,false) 
guiWindowSetMovable(shopWindow,false) 
tabPanel = guiCreateTabPanel(11,23,544,472,false,shopWindow) 
tab = guiCreateTab("info",tabPanel) 
tab = guiCreateTab("buy weapons",tabPanel) 
--------- ????? 1 -line 1 ----- 
  
guiCreateStaticImage( 10,10,90,75, "weapon/4.png", false,tab ) 
weapButton = guiCreateButton(10,80,90,30,"$500        knif",false,tab) 
addEventHandler ( "onClientGUIClick", weapButton, outputEditBox, false ) 
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, " has been buy it knif", false ) 
------------------------------------ 
guiCreateStaticImage( 110,10,90,75, "weapon/2.png", false,tab ) 
weapButton = guiCreateButton(110,80,90,30,"$900    dod",false,tab) 
--------------------------------- 
guiCreateStaticImage( 210,10,90,75, "weapon/3.png", false,tab ) 
weapButton = guiCreateButton(210,80,90,30,"M4",false,tab) 
--------------------------------- 
guiCreateStaticImage( 310,10,90,75, "weapon/1.png", false,tab ) 
weapButton = guiCreateButton(310,80,90,30,"M4",false,tab) 
-------------------------------- 
guiCreateStaticImage( 410,10,90,75, "weapon/5.png", false,tab ) 
weapButton = guiCreateButton(410,80,90,30,"M4",false,tab) 
  
-------------------------2 ????? 
guiCreateStaticImage( 10,110,90,80, "weapon/6.png", false,tab ) 
weapButton = guiCreateButton(10,190,90,30,"M4",false,tab) 
  
guiCreateStaticImage( 110,110,90,80, "weapon/7.png", false,tab ) 
weapButton = guiCreateButton(110,190,90,30,"M4",false,tab) 
  
guiCreateStaticImage( 210,110,90,80, "weapon/8.png", false,tab ) 
weapButton = guiCreateButton(210,190,90,30,"M4",false,tab) 
  
guiCreateStaticImage( 310,110,90,80, "weapon/9.png", false,tab ) 
weapButton = guiCreateButton(310,190,90,30,"M4",false,tab) 
  
guiCreateStaticImage( 410,110,90,80, "weapon/10.png", false,tab ) 
weapButton = guiCreateButton(410,190,90,30,"M4",false,tab) 
end 
addEventHandler( "onClientResourceStart", resourceRoot, initGUI ) 
  
function outputEditBox ( button ) 
    if button == "left" then 
        local text = guiGetText ( editBox ) 
        outputChatBox ( text ) 
    end 
end 
  
bindKey ( "F2" , "down" , function() guiSetVisible ( shopWindow , not guiGetVisible ( shopWindow ) ) showCursor ( guiGetVisible ( shopWindow ) ) end ) 

Functions you need:

triggerServerEvent 
addEvent 
addEventHandler 

Link to comment
this topic for only Solidsnake14

the is pro in scripter :lol:

Best scripter, best king of scripter, best assistant, best of assistant.

Stop it dude, you are embarrassing your self.

You say, "Your English is bad", and when he helps you, "BEST KING OF SCRIPTER".

And I tell you to try yourself and give you functions, "WTF YOU WANT TO HELP PEOPLE WITH SCRIPTS", I give you an example code.

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

Grow up dude.

Link to comment
i know what he is trying to do

also you can't see or what?

triggerServerEvent ( "event", localPlayer ,weapButton ) 

he do trigger but he was just copy past the code from JR10

also he open new topic for same thing -.-

viewtopic.php?f=91&t=35860

shut up i dont ask you

you try to insulte me you fucking noob

خخخخخخخخخخخخخخخخخ يابوووو وش تبي انت وجهك اخ تفوووو شوف وجهك يامصخره في سيرفري

الكل يضحك على وجهك ويتفل عليه

ههههههههههه لووووووووووول

وبعدين ياحمار محد سئلك انا حاط الموضوع اسئل سولدسناك ما حد سئلك

روح تعلم انجليزي يانوب

sorry he is arabian and i know him he is nooob he try to insulte me but i will ignored him

============== thank you solidsnake14 you the best and i will ignore TAPL he trying to insulte me ^_^:lol:

see has face imge in my server lol lol

Link to comment
this topic for only Solidsnake14

the is pro in scripter :lol:

Best scripter, best king of scripter, best assistant, best of assistant.

Stop it dude, you are embarrassing your self.

You say, "Your English is bad", and when he helps you, "BEST KING OF SCRIPTER".

And I tell you to try yourself and give you functions, "WTF YOU WANT TO HELP PEOPLE WITH SCRIPTS", I give you an example code.

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

Grow up dude.

grow up :lol:

man did you know my age 8)

my old is 22 so you grow up and dont replay to me

i asking solidsnake14 only

:D sorry i ask him

and you the best too :lol: you helped me before 8) thanks JR10

Link to comment
shut up

who insult who? :roll:

also I didn't ask you to speak to me in Arabic :lol:

ok if you know the code pleez put your code here

im noob i dont know what you mean give me ur code and i take it

who is the noob?

thank to all so mutch

i will test it

mutch? who need to learn English?

Edited by Guest
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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