If you want it to update object and action text add
in client.lua
Code:
SendNUIMessage({
action = "updateprompt",
idx = i, --- ADD the comma
otext = prompts.objecttext, --- ADD THIS!!
atext = prompts.actiontext, --- ADD THIS!!
data = {
visible = prompts.visible,
top = prompts.top,
left = prompts.left,
scale = prompts.scale
}
})
and in index.html
Code:
case "updateprompt":
var index = n**l;
for (var i = 0; i < viewmodel.prompts.length; i++) {
if (viewmodel.prompts[i].name == event.data.idx) {
index = i;
viewmodel.prompts[i].objecttext = event.data.otext; --- ADD THIS!! and get rid of these 2 comments!!
viewmodel.prompts[i].actiontext = event.data.atext; ---- ADD THIS!! and get rid of these 2 comments!!
then you can use them in the normal UPDATE
startprompt:Update({
objecttext = βSquid Games! ββ¦ gameInfoText,
actiontext =β[E] to Joinβ,
key = βEβ
})