Jump to content

[Help] Events


3B00DG4MER

Recommended Posts

Posted

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

SAF/SAO - 30%

Skype: Themerzoug2020

in-game name:3B00DG4MER

xOG7h1J.png

Posted

What do you mean by "won't add"?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

He means that in debugscript3 he's seeing "Client triggered server-side event "onBuy" but event is not added server-side.

Datastore - Store data to a database quickly. (Useful for saving scripted tables)

Posted

@3B00DG4MER: Any error coming from the server side script? is it added to the meta.xml?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
@3B00DG4MER: Any error coming from the server side script? is it added to the meta.xml?

Thanks we have fix it !

SAF/SAO - 30%

Skype: Themerzoug2020

in-game name:3B00DG4MER

xOG7h1J.png

Posted

What was the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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