Jump to content

[Help]Skin Shop


3B00DG4MER

Recommended Posts

Hello,Skin shop lol :D,I think it's too hard this time !

all things alright

one thing only which is when i click buy then nothing happened

Client Side:

    addEventHandler("onClientGUIDoubleClick",TypeClothes_Grid,function() 
  
    local Selected = guiGridListGetItemText ( TypeClothes_Grid, guiGridListGetSelectedItem ( TypeClothes_Grid ), 1 ) 
        if ( tostring(Selected)  ) then 
  
            for i=1, 67 do 
            clothe = getClothesByTypeIndex ( 0, i ) 
            crow = guiGridListAddRow ( NameClothes_Grid ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colname, tostring ( clothe ), false, false ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colID, tonumber ( i ), false, false ) 
            end 
         
        end 
         
    end) 
     
     
    addEventHandler("onClientGUIClick",Clothes_Window, 
    function (b) 
    if b == "left" then 
    if source == CloseClothesWindow then 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    elseif source == BuyClothes then 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes ( source, tostring(Selected2), "vest", Selected ) 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end) 

Link to comment

Try this:

   addEventHandler("onClientGUIDoubleClick",TypeClothes_Grid,function() 
  
    local Selected = guiGridListGetItemText ( TypeClothes_Grid, guiGridListGetSelectedItem ( TypeClothes_Grid ), 1 ) 
        if ( tostring(Selected)  ) then 
  
            for i=1, 67 do 
            clothe = getClothesByTypeIndex ( 0, i ) 
            crow = guiGridListAddRow ( NameClothes_Grid ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colname, tostring ( clothe ), false, false ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colID, tonumber ( i ), false, false ) 
            end 
        
        end 
        
    end) 
    
    
    addEventHandler("onClientGUIClick",root, 
    function (b) 
    if b == "left" then 
    if source == CloseClothesWindow then 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    elseif source == BuyClothes then 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes ( source, tostring(Selected2), "vest", Selected ) 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end) 

Link to comment
Try this:
   addEventHandler("onClientGUIDoubleClick",TypeClothes_Grid,function() 
  
    local Selected = guiGridListGetItemText ( TypeClothes_Grid, guiGridListGetSelectedItem ( TypeClothes_Grid ), 1 ) 
        if ( tostring(Selected)  ) then 
  
            for i=1, 67 do 
            clothe = getClothesByTypeIndex ( 0, i ) 
            crow = guiGridListAddRow ( NameClothes_Grid ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colname, tostring ( clothe ), false, false ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colID, tonumber ( i ), false, false ) 
            end 
        
        end 
        
    end) 
    
    
    addEventHandler("onClientGUIClick",root, 
    function (b) 
    if b == "left" then 
    if source == CloseClothesWindow then 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    elseif source == BuyClothes then 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes ( source, tostring(Selected2), "vest", Selected ) 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end) 

Not work :(

I tried to add outputchatbox

But nothing

mean Button problem ? :)

Link to comment

Removed 'end' on line 24, should work now.

   addEventHandler("onClientGUIDoubleClick",TypeClothes_Grid,function() 
  
    local Selected = guiGridListGetItemText ( TypeClothes_Grid, guiGridListGetSelectedItem ( TypeClothes_Grid ), 1 ) 
        if ( tostring(Selected)  ) then 
  
            for i=1, 67 do 
            clothe = getClothesByTypeIndex ( 0, i ) 
            crow = guiGridListAddRow ( NameClothes_Grid ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colname, tostring ( clothe ), false, false ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colID, tonumber ( i ), false, false ) 
            end 
        
        end 
        
    end) 
    
    
    addEventHandler("onClientGUIClick",Clothes_Window, 
    function (b) 
    if b == "left" then 
    if source == CloseClothesWindow then 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    elseif source == BuyClothes then 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes ( source, tostring(Selected2), "vest", Selected ) 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end) 

Link to comment
Removed 'end' on line 24, should work now.
   addEventHandler("onClientGUIDoubleClick",TypeClothes_Grid,function() 
  
    local Selected = guiGridListGetItemText ( TypeClothes_Grid, guiGridListGetSelectedItem ( TypeClothes_Grid ), 1 ) 
        if ( tostring(Selected)  ) then 
  
            for i=1, 67 do 
            clothe = getClothesByTypeIndex ( 0, i ) 
            crow = guiGridListAddRow ( NameClothes_Grid ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colname, tostring ( clothe ), false, false ) 
            guiGridListSetItemText ( NameClothes_Grid, crow, colID, tonumber ( i ), false, false ) 
            end 
        
        end 
        
    end) 
    
    
    addEventHandler("onClientGUIClick",Clothes_Window, 
    function (b) 
    if b == "left" then 
    if source == CloseClothesWindow then 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    elseif source == BuyClothes then 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes ( source, tostring(Selected2), "vest", Selected ) 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end) 

Thanks man !!

Link to comment

Now problem is can't add clothes :(

Client side :

addEventHandler("onClientGUIClick",Clothes_Window, 
    function (beer) 
    if b == "left" then 
    if source == BuyClothes then 
    guiSetVisible(Clothes_Window,false) 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    triggerServerEvent("getClothes",localPlayer,Selected,Selected2) 
    outputChatBox("You Selected"..Selected.."for 0$") 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end 
    end) 

Server Side:

function get_Clothes ( Selected, Selected2 ) 
addPedClothes (source,""..tostring(Selected2).."", "hoodyamerc", tonumber(Selected) ) 
end 
addEvent("getClothes",true) 
addEventHandler("getClothes",getRootElement(),get_Clothes) 

Link to comment
Now problem is can't add clothes :(

Client side :

addEventHandler("onClientGUIClick",Clothes_Window, 
    function (beer) 
    if b == "left" then 
    if source == BuyClothes then 
    guiSetVisible(Clothes_Window,false) 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    triggerServerEvent("getClothes",localPlayer,Selected,Selected2) 
    outputChatBox("You Selected"..Selected.."for 0$") 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end 
    end) 

Server Side:

function get_Clothes ( Selected, Selected2 ) 
addPedClothes (source,""..tostring(Selected2).."", "hoodyamerc", tonumber(Selected) ) 
end 
addEvent("getClothes",true) 
addEventHandler("getClothes",getRootElement(),get_Clothes) 

No one ? :'(

Link to comment

Try this ( I dont know if works ) (NOTE: Client Side Only)

addEventHandler("onClientGUIClick",Clothes_Window, 
    function (b) 
    if b == "left" then 
    if source == BuyClothes then 
    guiSetVisible(Clothes_Window,false) 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes (localPlayer,tostring(Selected2),tostring(Selected2), tonumber(Selected)) 
    outputChatBox("You selected a "..Selected2.." for $25") 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end 
    end) 

Link to comment
Try this ( I dont know if works ) (NOTE: Client Side Only)
addEventHandler("onClientGUIClick",Clothes_Window, 
    function (b) 
    if b == "left" then 
    if source == BuyClothes then 
    guiSetVisible(Clothes_Window,false) 
    local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 ) 
    local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 ) 
    addPedClothes (localPlayer,tostring(Selected2),tostring(Selected2), tonumber(Selected)) 
    outputChatBox("You selected a "..Selected2.." for $25") 
    guiSetVisible(Clothes_Window,false) 
    showCursor(false) 
    end 
    end 
    end) 

Not working

SO,NO ONE CAN FIX IT

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