فاّرس Posted November 14, 2013 Share Posted November 14, 2013 Oh, you can use getPlayerFromName for get his money. Link to comment
The Killer Posted November 14, 2013 Author Share Posted November 14, 2013 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
فاّرس Posted November 14, 2013 Share Posted November 14, 2013 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
The Killer Posted November 14, 2013 Author Share Posted November 14, 2013 Thanks. but if i select another player the player that i selected before his money still in the list i want it when i select another player the player that i selected before his money remove and show the new one. Link to comment
فاّرس Posted November 14, 2013 Share Posted November 14, 2013 You can use setTimer or guiGridListClear. Link to comment
The Killer Posted November 14, 2013 Author Share Posted November 14, 2013 do you mean like 'setTimer' to 'guiGridListClear' or ?? can i get an example ? Link to comment
فاّرس Posted November 14, 2013 Share Posted November 14, 2013 You can do guiGridListClear when get the money. Link to comment
The Killer Posted November 14, 2013 Author Share Posted November 14, 2013 Thanks i did it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now