iGermaN Posted October 26, 2017 Share Posted October 26, 2017 First, sorry for my English, I'm brazilian. I'm beggining in the world of MTA scripting I want to create a race script, but I'm not know how to get the second player name, money, etc. How would the outputChatBox for the second player? This script has begin with this command for example: /race playername (to invite an other player to race.) local pName = getPlayerName(source) -- local sName = getPlayerName() <- The second player name local pMoney = getPlayerMoney(source) -- local sMoney = getPlayerMoney() <- The second player money Link to comment
Rose Posted October 26, 2017 Share Posted October 26, 2017 An example: function hello( player, _, toPlayer ) if not isElement( player ) then return end if not isElement( toPlayer ) then return end local playerName = getPlayerFromName( toPlayer ) if ( playerName ) then outputChatBox("["..getPlayerName( player ).."] Hi!", playerName) end end addCommandHandler("hi", hello) 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