Turbe$Z Posted March 25, 2017 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|
HuskLV Posted March 25, 2017 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")
itHyperoX Posted March 25, 2017 Posted March 25, 2017 (edited) post your login code here Which is showing this Edited March 25, 2017 by TheMOG
Turbe$Z Posted March 25, 2017 Author 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
HuskLV Posted March 25, 2017 Posted March 25, 2017 1 minute ago, Turbo777 said: same problem Put your script code please
Turbe$Z Posted March 25, 2017 Author 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
HuskLV Posted March 25, 2017 Posted March 25, 2017 Maybe try function onPlayerWin(thePlayer) and other line change player -> thePlayer
Turbe$Z Posted March 25, 2017 Author Posted March 25, 2017 2 minutes ago, HuskLV said: Maybe try function onPlayerWin(thePlayer) and other line change player -> thePlayer same problem
HuskLV Posted March 25, 2017 Posted March 25, 2017 Maybe you can put script where this function inside?
Addlibs Posted March 25, 2017 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?
NeXuS™ Posted March 25, 2017 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.
Turbe$Z Posted March 25, 2017 Author 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);
NeXuS™ Posted March 25, 2017 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?
Turbe$Z Posted March 25, 2017 Author Posted March 25, 2017 Just now, NeXuS™ said: Is this client side or server side? server
Addlibs Posted March 25, 2017 Posted March 25, 2017 You could just you just use triggerClientEvent(thePlayer, "addNotification", thePlayer, theMessage, theType) instead of an exported function.
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