[Release] Notification On Server Join (V0.2 Updated 23/09!)

Hi every one I have made my first ever script and it is very simple but I like it so if you could be nice and respect the fact that it is the first ever script i have ever made then that would help. Feel free to leave any questions or improvement suggestions i will take in to consideration.

This resource is basically a simple notification shows up at the bottom left of the screen saying welcome then your name for example WELCOM SNAKE or what every your name is in game.

NEW VERSION COMING OUT NOW :slight_smile:
THIS WAS CODED BY @sadboilogan
HE ADVANCED MY CODE AND GAVE ME PERMISSION TO RELEASE THIS SO THANK YOU TO @sadboilogan.

V0.2:
V0.2 welcomenotify.zip (1.1 KB)

PICTURES:

V0.1
welcomenotify.zip (901 Bytes)

BUT IT DOES SAY WELCOME THEN YOUR NAME THATS THE OLDER VERSION

2 Likes

You dont even state what this resource does

1 Like

I am now give me a chance man to do it

1 Like

LOL Please say what this does and why you think it is good!

Changed the Topic Title

I will send a screen shot now give me 2 seconds

1 Like

Dont get why people put “[Release]” on their post when its Clearly in the releases section

2 Likes

It’s more like a tradition i believe

Just because people know its the right topic in the right section so moderators can see it better.

1 Like

Also, why such a long message and using the small bottom-corner message?

Formatting purposes when searching for stuff, pretty sure.

Because its my first script im learning

1 Like

Yes because its better in my oppinion

1 Like

Ok not sure what you mean but yeh sure

1 Like

May I suggest we get a separate /release/ section for these types of scripts … I mean no offense to the op but… This is really useless… Again … No offense …

1 Like

Why would that be necessary or needed?

Good Job on your first ever release LK_lk. In my opinion, simplicity doesn’t define usefulness. Perhaps you can build on this with some server options/bools to define different messages or rather timed messages that show the user recent Server updates, hotkeys/controls for new players etc. Basically anything you want to tell the player about your server regarding “importance” when they first join. Just a few suggestions. Again, good job and keep on learning.

Thanky you for the nice comment and yes i am going to do that I can to improve this i understand its useless but im proud as it was very hard to do as i had no experience so again thanks for the nice comment.

1 Like

Remember you can change the amount of time the message displays in the client.lua !

It’s looking great!

A few suggestions:
If you are going to add “Welcome Messages” for players that spawn into your server, it doesn’t make sense to allow the player to see the message every time they spawn. For some instances it would but since this is a “Server Welcome Message” the player should only see the message the first time they spawn in. After that it should be disabled. You should also Comment out the Console counting “Citizen.Trace(time)”, just to cleanup the Debug. If you wanted you could even break out of the while loops after the message completes considering they will never get used again. (I didn’t add breaks)

You could do this to fix that:

local firstSpawn = false

AddEventHandler("playerSpawned", function(spawn)

	if not firstSpawn then
		local time = 0
		local messagetime = 20 --Change this for how long the message should display!
	
		Citizen.CreateThread(function()
			while true do
				Citizen.Wait(0)
				while time < messagetime do
					--Citizen.Trace(time) --Console Debug(count)
					Citizen.Wait(1000)
					time = time +1
				end
			end
		end)

		Citizen.CreateThread(function()
		while true do
			Citizen.Wait(0)
			local playerName = GetPlayerName( PlayerId() )
				while time < messagetime do
					Citizen.Wait(0)
					DrawText1("Welcome "..playerName..". This is a community based on 100% RP, Fail RP will be tolerated appropriately.")
					DrawText2("~g~Have Fun!")
					firstSpawn = true
				end
			end
		end)
	end
end)
2 Likes