Jump to content

Help - trigger


The Killer

Recommended Posts

like this ?

addEventHandler("onClientGUIClick",root, 
function () 
if source == gridd then 
name = guiGridListGetItemText ( gridd, guiGridListGetSelectedItem (gridd), 1 ) 
if name and name ~= "" then 
local player = getPlayerFromName(name) 
if player then 
triggerServerEvent("PlayerMoney", player) 
elseif name and name == "" then 
guiGridListClear(mgrid) 
end 
end 
end 
end 
) 

Link to comment

No, i mean in the trigger in server-side.

like this :

when clicked the button :

local name = guiGridListGetItemText ( gridd, guiGridListGetSelectedItem (gridd), 1 ) 
    if ( name ) then 
        triggerServerEvent('PlayerMoney',localPlayer,name) 
            etc. 

in the trigger in server-side :

addEvent('PlayerMoney',true) 
addEventHandler('PlayerMoney',root,function(name) 
    triggerClientEvent(source,'_setPlayerMoney',source,getPlayerMoney(getPlayerFromName(name))) 
    end 
) 
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...