underground475 Posted March 16, 2019 Share Posted March 16, 2019 (edited) Hi everyone I have a problem with my own created event if i let the server send a number everything works fine but if it is a string it will not work properly hope someone can help with that ServerEvent [RemoteEvent("OnPlayerLoginAttempt")] public void OnPlayerLoginAttempt(Client player, string username) { Client gesuchterspieler = NAPI.Player.GetPlayerFromName(username); if (gesuchterspieler != null) { String SNAME = gesuchterspieler.SocialClubName; player.TriggerEvent("LoginResult",SNAME); } } Client mp.events.add('LoginResult', (name) => { mp.gui.chat.push("Server hat den namen: "+name+" zurück geschickt"); speedo.execute(`update(${test});`); // <-- only work with numbers }); CEF function update(name) { sendinfotoserver(name); } function sendinfotoserver(name) { document.getElementById("spielername").innerHTML = "name: "+name; } thanks Edited March 16, 2019 by underground475 Link to comment Share on other sites More sharing options...
robearded Posted March 16, 2019 Share Posted March 16, 2019 Try to think about it like you're running the function yourself. You're gonna use update("name");. The problem is that you're using update(name) which returns an error. just put ${test} inside quotes so it is processed as a string. Link to comment Share on other sites More sharing options...
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