Jump to content

Why show everyone the notification?


Turbe$Z

Recommended Posts

Check your script define player, maybe thePlayer or source try. in this.

exports["rangos_bejelentkezes"]:addNotification(thePlayerthePlayerT, "Megnyerted a reakció tesztet!", "success")

or

exports["rangos_bejelentkezes"]:addNotification(source, "Megnyerted a reakció tesztet!", "success")

Link to comment
7 minutes ago, HuskLV said:

Check your script define player, maybe thePlayer or source try. in this.

exports["rangos_bejelentkezes"]:addNotification(thePlayerthePlayerT, "Megnyerted a reakció tesztet!", "success")

or

exports["rangos_bejelentkezes"]:addNotification(source, "Megnyerted a reakció tesztet!", "success")

same problem :S 

 

 

Link to comment
1 minute ago, HuskLV said:

Put your script code please

function onPlayerWin(player)
	outputChatBox("#0088FF[Reakció teszt] #FFffFFTe #FFffFFírtad be leghamarabb a szót. Ezért megnyerted a #0088FF"..thePrize.."Ft-ot!",player,255,255,0,true)
	exports["rangos_bejelentkezes"]:addNotification(player, "Megnyerted a reakció tesztet!", "success")
	givePlayerMoney(player,thePrize)
	removeCode()
end

 

Link to comment
14 minutes ago, NeXuS™ said:

This does nothing. Just renaming a variable wouldn't do anything. Post your code about the addNotification function.

addEvent('addNotification', true);
function addNotification(text, type)
	if (text and type) then
		if (notificationData ~= nil) then
			table.remove(notificationData, #notificationData);
		end
		
		table.insert(notificationData,
			{
				StartX = (displayWidth / 2) - (25 / 2),
				EndX = (displayWidth / 2) - ((dxGetTextWidth(text, 0.40, notificationFont) + 20 + 25) / 2),
				Text = text,
				Width = dxGetTextWidth(text, 0.40, notificationFont) + 20,
				Alpha = 0,
				State = 'fadeIn',
				Tick = 0,
				AlphaTick = getTickCount(),
				CurrentX = (displayWidth / 2) - (25 / 2),
				CurrentWidth = 0,
				Type = type or 'info'
			}
		);
		
		playSoundFrontEnd(11);
	end
end
addEventHandler('addNotification', root, addNotification);

 

Link to comment
25 minutes ago, Turbo777 said:

function onPlayerWin(player)
	outputChatBox("#0088FF[Reakció teszt] #FFffFFTe #FFffFFírtad be leghamarabb a szót. Ezért megnyerted a #0088FF"..thePrize.."Ft-ot!",player,255,255,0,true)
	exports["rangos_bejelentkezes"]:addNotification(player, "Megnyerted a reakció tesztet!", "success")
	givePlayerMoney(player,thePrize)
	removeCode()
end

 

Is this client side or server side?

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...