MR.S3D Posted January 12, 2013 Share Posted January 12, 2013 (edited) No problem Edited January 12, 2013 by Guest Link to comment
Anderl Posted January 12, 2013 Share Posted January 12, 2013 Your code has much things that make totally no sense and some that are not needed. And he might not be using array indexes as player IDs but other thing. Link to comment
MR.S3D Posted January 12, 2013 Share Posted January 12, 2013 Sorry but I'm not english and I don't understand good.I read this in another resource: local player, name = exports.players:getFromName( thePlayer, victim ) give me link this resource Link to comment
MR.S3D Posted January 12, 2013 Share Posted January 12, 2013 Your code has much things that make totally no sense and some that are not needed. And he might not be using array indexes as player IDs but other thing. I'd expect that he wants it Link to comment
scienziato-pazzo Posted January 12, 2013 Author Share Posted January 12, 2013 Sorry but I'm not english and I don't understand good.I read this in another resource: local player, name = exports.players:getFromName( thePlayer, victim ) give me link this resource I use the MTA Paradise gamemode. Link to comment
Castillo Posted January 12, 2013 Share Posted January 12, 2013 Use this function get a player from its ID: function getPlayerByID ( theID ) local playerFound = false for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( exports.players:getID ( player ) == theID ) then playerFound = player break end end return playerFound end Link to comment
scienziato-pazzo Posted January 18, 2013 Author Share Posted January 18, 2013 Use this function get a player from its ID: function getPlayerByID ( theID ) local playerFound = false for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( exports.players:getID ( player ) == theID ) then playerFound = player break end end return playerFound end Can I have the complete function to this command: "/givemoney [playerid/partofname] [amount]"? Link to comment
Castillo Posted January 18, 2013 Share Posted January 18, 2013 You can try to make it, if it doesn't work, then I can help you with it. Link to comment
scienziato-pazzo Posted January 19, 2013 Author Share Posted January 19, 2013 You can try to make it, if it doesn't work, then I can help you with it. I don't know how to do it. I'm new in the MTA scripting and I don't know what I have to do. Link to comment
scienziato-pazzo Posted January 21, 2013 Author Share Posted January 21, 2013 Anyone can help me? Link to comment
scienziato-pazzo Posted January 23, 2013 Author Share Posted January 23, 2013 Why none responds to this topic? Link to comment
Anderl Posted January 23, 2013 Share Posted January 23, 2013 Because you have to learn and do it by yourself. We aren't here for doing things for you, but to help you solving issues in your scripts. Link to comment
scienziato-pazzo Posted January 23, 2013 Author Share Posted January 23, 2013 Ok did myself and works 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