MR.S3D Posted January 12, 2013 Posted January 12, 2013 (edited) No problem Edited January 12, 2013 by Guest
Anderl Posted January 12, 2013 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.
MR.S3D Posted January 12, 2013 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
MR.S3D Posted January 12, 2013 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
scienziato-pazzo Posted January 12, 2013 Author 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.
Castillo Posted January 12, 2013 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
scienziato-pazzo Posted January 18, 2013 Author 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]"?
Castillo Posted January 18, 2013 Posted January 18, 2013 You can try to make it, if it doesn't work, then I can help you with it.
scienziato-pazzo Posted January 19, 2013 Author 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.
scienziato-pazzo Posted January 23, 2013 Author Posted January 23, 2013 Why none responds to this topic?
Anderl Posted January 23, 2013 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.
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