Turbe$Z Posted March 25, 2017 Share Posted March 25, 2017 exports["rangos_bejelentkezes"]:addNotification(player, "Megnyerted a reakció tesztet!", "success") i added this line to a script, but the notification show everyone how to fix this? |Sorry for my very bad English:c| Link to comment
HuskLV Posted March 25, 2017 Share Posted March 25, 2017 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
itHyperoX Posted March 25, 2017 Share Posted March 25, 2017 (edited) post your login code here Which is showing this Edited March 25, 2017 by TheMOG Link to comment
Turbe$Z Posted March 25, 2017 Author Share Posted March 25, 2017 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 Link to comment
HuskLV Posted March 25, 2017 Share Posted March 25, 2017 1 minute ago, Turbo777 said: same problem Put your script code please Link to comment
Turbe$Z Posted March 25, 2017 Author Share Posted March 25, 2017 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
HuskLV Posted March 25, 2017 Share Posted March 25, 2017 Maybe try function onPlayerWin(thePlayer) and other line change player -> thePlayer Link to comment
Turbe$Z Posted March 25, 2017 Author Share Posted March 25, 2017 2 minutes ago, HuskLV said: Maybe try function onPlayerWin(thePlayer) and other line change player -> thePlayer same problem Link to comment
HuskLV Posted March 25, 2017 Share Posted March 25, 2017 Maybe you can put script where this function inside? Link to comment
Addlibs Posted March 25, 2017 Share Posted March 25, 2017 Are you sure that's the correct syntax for the rangos_bejelentkezes resource's addNotification function? Could you show us that function from that resource? Link to comment
NeXuS™ Posted March 25, 2017 Share Posted March 25, 2017 7 minutes ago, HuskLV said: Maybe try function onPlayerWin(thePlayer) and other line change player -> thePlayer This does nothing. Just renaming a variable wouldn't do anything. Post your code about the addNotification function. Link to comment
Turbe$Z Posted March 25, 2017 Author Share Posted March 25, 2017 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
NeXuS™ Posted March 25, 2017 Share Posted March 25, 2017 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
Turbe$Z Posted March 25, 2017 Author Share Posted March 25, 2017 Just now, NeXuS™ said: Is this client side or server side? server Link to comment
NeXuS™ Posted March 25, 2017 Share Posted March 25, 2017 Then copy the addNotification's server side too. Link to comment
Addlibs Posted March 25, 2017 Share Posted March 25, 2017 You could just you just use triggerClientEvent(thePlayer, "addNotification", thePlayer, theMessage, theType) instead of an exported function. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now