[RELEASE] Twitter script (Stand-alone)


#1

For everyone searching and bagging for a standalone twitter script here you go,

I myself was struggeling to find one and when i did find one it didnt work. so i desided to make one myself.

ofcourse i didnt want to keep it for myself, but instead giving it to the community.

TWEET

I hope you guys enjoy, dont forget to like. :wink:

BTW if you edit this dont put it up as a release and please credit me.


#2

You could of removed alot of that code you just put there if you would have used the function built for commands.


#3

could i ? sorry im new to coding LOL


#4

Yeah. I could have made that like 5 lines.


#5

oops. well it works so im not gonna edit before i fuck something up LMAO


#6

Its just when you use the event handler for a chat message it is really not built for command handling anymore. Like. I use it to splice in my admin ranks to the persons name or make a local chat script with it. They made the RegisterCommand so you dont need to use the stringsplit. Plus it listens for / commands automatically…

Also I understand you want code credit. But you are gonna find alot of twitter commands similar so gonna be hard to prove they did or didnt use the one you made.


#7

yeah your right, im just saying it so i etleast tryd to do something. and yeah like i said b4 im new to coding didnt know that. thanks for the tips tho, i will (try) remember


#8

I will be posting code here when I get back home. It will be your choice to use it or not obv. But another flaw for your method of commands is people that have a local chat or people that have chat ranks. Your /command will show up in chat.


#9

I will put it in I quiz


#10
RegisterCommand("tweet", function(source, args, raw)
    local _source = source
    local name = GetPlayerName(_source)
    local message = table.concat(args, " ")
    TriggerClientEvent('chatMessage', -1, "TWITTER | " .. name, { 30, 144, 255 }, message)
end, false)

You should try that. I haven’t tested it but that should work.


#11

Why?



#12

Habit of mine. Its my preference. All it is is just placing an argument in a variable. Usually I wouldn’t do that but when messing with the source ID I always just set it as a variable… Just like I said. A habit I started doing could easily be removed and just pass source.


#13

Plus sometimes source gets unset and returns nil/undefined for whatever reason.


#14

Oh :face_with_raised_eyebrow:

Never experienced this. :thinking:


#15

I started running into that when I first started. That’s one reason I started that as a habit. Better to be safe than sorry.


#16

+1 Is very annoying sometimes.


#17

Credit the guy that you took it from and remade it yours


#18

i didnt take it from anyone you jalouse ?


#19

Please stop. And no more drama also one thing you should do is remove everything that is not needed and not have 30 lines for 1 /tweet


#20

Dude read up. I just started coding. You are starting shit again. Just leave already