Hallo there, i try to working on a basic “welcome message” for a fivem server.
I actually got a welcome message:
My code looks like this
AddEventHandler("playerSpawned", function(spawn)
GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_PISTOL"), 10000, false, false)
SetAmmoInClip(GetPlayerPed(-1), GetHashKey("WEAPON_PISTOL"),999)
helpText("~b~Welcome ~g~".. GetPlayerName(soruce) .. " ~b~to ...........")
end)
function helpText(string)
SetTextComponentFormat("STRING")
AddTextComponentString(string)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
But this welcome message is triggered every time the player dies or he repawns.
Is there a way or soloution to a achieve this.
EDIT
The displayed code is a client script.
greetings from praktii.