sckatchof Posted March 26, 2012 Share 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) Link to comment
Jaysds1 Posted March 26, 2012 Share Posted March 26, 2012 Can you post the rest of the script? Link to comment
sckatchof Posted March 26, 2012 Author Share 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 Link to comment
Jaysds1 Posted March 26, 2012 Share 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? Link to comment
sckatchof Posted March 26, 2012 Author Share 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. Link to comment
Castillo Posted March 26, 2012 Share 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'? Link to comment
sckatchof Posted March 26, 2012 Author Share Posted March 26, 2012 thank you snake work Is this all your script? no this small part Link to comment
Jaysds1 Posted March 26, 2012 Share Posted March 26, 2012 Wow, Solid, you made me feel dumb Link to comment
X-SHADOW Posted March 26, 2012 Share Posted March 26, 2012 i wish i become like SoldSnake14 Link to comment
Castillo Posted March 26, 2012 Share Posted March 26, 2012 I wasn't born with my knowledge, you can learn all I'd if you give it time and patience. 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