nameforthisforum Posted October 13, 2020 Share Posted October 13, 2020 Hi! I want to make this command but i don't know how: on chat ( T ) type /olx <Text> and when you press enter it will take from you 150$ with (OutPutChatBox -150$) and will appear on chat: [ O L X ]<PlayerName>: <Text> . Can someone explain me how can i do this? Thanks a lot!! Link to comment
iPrestege Posted October 13, 2020 Share Posted October 13, 2020 You can use these to do what you are asking, try your best and we will help if you have any issues. onPlayerChat takePlayerMoney getPlayerName outputChatBox Link to comment
DiSSGen Posted October 15, 2020 Share Posted October 15, 2020 nCash = 150 addEventHandler("onPlayerChat",function(message) cancelEvent() if tonumber(getPlayerMoney(source)) >= nCash then takePlayerMoney(source,nCash) outputChatBox("-$"..nCash.."",source) for i,v in ipairs(getElementsByType("player")) do outputChatBox(""..getPlayerName(source)..": "..message.."",v) end else outputChatBox("You can't send message",source) end end) @nameforthisforum 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