Jump to content

Element attachment problem


Hale

Recommended Posts

So I have this problem with element attachments (I think) in my SMS system. What happens is next: I send an SMS to lets say number 1337, and when that person wants to respond by /rsms *message* it returns the two outputchatbox lines, "SYNTAX..." and "Use..." ones. The problem is probably in the last line, but I tried lots of things and, well, none really worked tbh lol. Any ideas of how to fix this?

                if tostring(commandName):lower() == "rsms" and (...) then 
                        local target = getElementData(thePlayer, "targetSMSer") 
                    if not (...) then 
                        outputChatBox("No one sent you an SMS to reply on.", thePlayer, 255,0,0) 
                        return false 
                    end 
                    message = phoneNumber.." "..table.concat({...}, " ") 
                else 
                    if tostring(commandName):lower() == "sms" and not number or not (...) then 
                        outputChatBox("SYNTAX: /sms [number] [message]", thePlayer, 255, 194, 14) 
                        outputChatBox("Use /rsms to reply on your most recent SMS.", thePlayer) 
                    elseif callerphoneIsTurnedOn == 0 then 
                        outputChatBox("Your phone is off.", thePlayer, 255, 0, 0) 
                    elseif getElementData(thePlayer, "injuriedanimation") then 
                        outputChatBox("You can't use your phone while knocked out.", thePlayer, 255, 0, 0) 
                    elseif exports.global:hasMoney(thePlayer, 1) then 
                     
                        local message = table.concat({...}, " ") 
                         
                        setElementData(thePlayer, "targetSMSer", phoneNumber, false) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...