[RELEASE] BetterTwitter Script

Better Twitter
Chat based twitter script with the following commands:

/twt - sends a global chat message labled [Tweet] using the player name as the twitter handle

/atwt - sends a global chat message labled [Tweet] using either a provided twitter handle or a random handle assigned to them for duration of session length (unless overridden by /sethandle)

/sethandle - sets the handle for /atwt to whatever the user desires, will stick with them for duration of session length

The /twt command uses your steam name as your twitter handle, this is your typical /twt command. The difference between this script and others is the /atwt command. This lets you anonymously tweet using either a manually inputted handle, a handle from /sethandle, or a random handle from a list of about 80. Once /sethandle is used or a random handle is given to a user, it is assigned to their server ID and will stick with them for the duration of the session.

https://github.com/Scotts-Totts/Better-Twitter

/twt A normal tweet!
image
/atwt A tweet with a random anonymous name…
image
/atwt @inconspicuoususer When argument 1 begins with an @ it’s a one time handle
image
/atwt And we’re back to the old handle!
image
/sethandle exampleuser
image /
/atwt Now all atwt’s will use this twitter handle
image

7 Likes

No download

Forgot the download link, just added that to post.

When using /twt it does not display steam name. It just shows Invalid

image

How do I install it?

1 Like

Is this on a local host or public server? If you’re on a local host are you sure you’re signed into steam?

Click on the github link, hit the green code button and hit download as zip. From there unzip the file contents into a file named BetterTwitter and drag this file into your resources folder. From there add start BetterTwitter to your config file.

Remove line 30 & 31. It will double the @ :slight_smile:

1 Like

very good overall though, appreciate you making this

1 Like

Yeah you’re right that is causing a double @. This was something I had fixed on my local files but never updated the github with. Thanks for pointing that out. My exact solution was to amend the if statement at line 27 to:


This way the @ isn’t stored in the array with the ID and handle. As my first script this definitely could’ve been made much better but I think it’s functional as it is.

Updating the github now.

It is on a public server. So the fix is done now on the GitHub?

That was a fix for a different issue, I’ll try and see why it’s giving you that invalid name.

Solved this issue, uploading right now it’ll be on the github in about 5 mins.

Thank you. It works great now

sorry but why use this when you now have twitter build in to the gcphone :confused:

1 Like

How would I go about putting the person’s server ID in parenthesis next to the twitter handle?
Ex. [Tweet] FuckSnails (#124) : Blah Blah Blah

Thanks :smiley:

1 Like

Try replacing line 67 of client.lua with:

TriggerServerEvent("tweet", "@"..GetPlayerName(PlayerId()).." (#"..playerID..")^0: "..table.concat(args," "))

I haven’t actually tested this so if it doesn’t work just let me know.

Not all servers have gcphone, and this is for the ones that don’t.

Hey,
There is no “Line 67” of the client.lua and I tried finding similar terms in the code, but it just produced an error.

EDIT: I replaced TriggerServerEvent(“tweet”, message) with it and it works! However, the twitter handle does not work anymore if I replace that line of code. Any ideas?