MR.S3D Posted January 12, 2013 Posted January 12, 2013 (edited) No problem Edited January 12, 2013 by Guest Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
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. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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 Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
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 Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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