Jump to content

[Help] Events


3B00DG4MER

Recommended Posts

Hello,Skin shop ..

There is one problem which is: Event won't add to ServerSide

Server Side :

addEvent("onBuy",true) 
addEventHandler("onBuy",root, 
function (skinID) 
if getPlayerMoney(source) >= 2000 then 
setElementModel(source,skinID) 
takePlayerMoney ( source, 2000 ) 
else 
outputChatBox("You don't have enough to buy a Skin") 
end 
end 
) 

Client Side:

                local SelectedSkin = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) 
                if SelectedSkin then 
                guiSetVisible(GUIEditor.window[1],false) 
                showCursor(false) 
                triggerServerEvent("onBuy",localPlayer,tonumber(SelectedSkin)) 

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