Moinmoin.
Ich wollt auf RG_notification (in Resource rw_notification) umsteigen. Nachdem ich das Testscript neu gestartet habe, erhielt ich folgende Fehlermeldung:
SCRIPT ERROR: citizen:/scripting/lua/scheduler No such export SendAlert in resource rw_notification
Das steht im CarHud:
Code
if IsControlJustReleased(0, 29) and IsPedInAnyVehicle(PlayerPedId()) then
if not IsThisModelABicycle(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1),false))) and
not IsThisModelABoat(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1),false))) and
not IsThisModelAHeli(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1),false))) and
-- not IsThisModelAJetski(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1),false))) and
not IsThisModelAPlane(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1),false))) then
if seatbelt == false then
seatbelt = true
exports['rw_notification']:SendAlert('inform', 'Angeschnallt!')
TriggerEvent("InteractSound_CL:PlayOnOne","seatbelt",0.1)
else
TriggerEvent("InteractSound_CL:PlayOnOne","seatbeltoff",0.7)
exports['rw_notification']:SendAlert('inform', 'Abgeschnallt!')
seatbelt = false
end
else
exports['rw_notification']:SendAlert('error', 'Kein Gürtel vorhanden')
end
end
Alles anzeigen
Das steht in RG_notification (rw_notification) als Test:
Code
RegisterNetEvent('rw_notification:showNotification')
AddEventHandler('rw_notification:showNotification', function(text)
if text == "+ 1 Kill" then
else
SendNUIMessage({
action = 'add',
text = text
})
end
end)
Was muss ich wegen der Fehlermeldung tun?