sckatchof Posted March 26, 2012 Posted March 26, 2012 hi guys i have a small problem WARNIG .... Bad arugement @' getPlayerFromName server side : function listinfo (theAdmin, command, targetsource) local thePlayer = getPlayerFromName(targetsource) end addEvent("informations", true) addEventHandler("informations", getRootElement(), listinfo)
sckatchof Posted March 26, 2012 Author Posted March 26, 2012 Can you post the rest,because this doesn't make sense. you mean client side : function informations() local rowindex, columnindex = guiGridListGetSelectedItem ( GridListePlayer ) playername = guiGridListGetItemText ( GridListePlayer, rowindex, 1) guiSetText ( LabelName, "Name : " .. playername .. " " ) triggerServerEvent("informations", localPlayer, targetsource, playername) end
Jaysds1 Posted March 26, 2012 Posted March 26, 2012 Try this: function info() local rowindex, columnindex = guiGridListGetSelectedItem ( GridListePlayer ) playername = guiGridListGetItemText ( GridListePlayer, rowindex, 1) guiSetText ( LabelName, "Name : " .. playername .. " " ) triggerServerEvent("informations",localPlayer,targetsource, playername) end addEvent("informations", true) addEventHandler("informations",root,function(targetsource) local thePlayer = getPlayerFromName(targetsource) end) and may I ask? What is this script for?
sckatchof Posted March 26, 2012 Author Posted March 26, 2012 Thank you for help but still have some probelm. and may I ask? What is this script for? this script for admin panel.
Castillo Posted March 26, 2012 Posted March 26, 2012 -- client side: function info ( ) local rowindex, columnindex = guiGridListGetSelectedItem ( GridListePlayer ) playername = guiGridListGetItemText ( GridListePlayer, rowindex, 1) guiSetText ( LabelName, "Name : " .. playername .. " " ) triggerServerEvent ( "informations", localPlayer, playername ) end -- server side: addEvent ( "informations", true ) addEventHandler ( "informations", root, function ( playerName ) local thePlayer = getPlayerFromName ( playerName ) end ) What was 'targetsource'?
sckatchof Posted March 26, 2012 Author Posted March 26, 2012 thank you snake work Is this all your script? no this small part
Castillo Posted March 26, 2012 Posted March 26, 2012 I wasn't born with my knowledge, you can learn all I'd if you give it time and patience.
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