TH3RM4L 1 Posted January 24, 2018 (edited) Hello. I'm new at scripting and I've been struggling to make a simple time/weather changer. I tried to do it like this: mp.events.addCommand('time', (player, _, timeA) => { if (timeA().length > 0) { setTime(parseInt(timeA)); } }); mp.events.addCommand('weather', (player, _, weatherA) => { if (weatherA().length > 0) { setWeather(parseInt(weatherA)); } }); Could anyone, if kind enough, show me how to properly make this work? I wanna learn how to do this stuff Thanks in advance. Edited January 24, 2018 by TH3RM4L Share this post Link to post Share on other sites
ragempdev 792 Posted January 25, 2018 2 hours ago, TH3RM4L said: setTime(parseInt(timeA)); mp.world.time.hour = parseInt(timeA); 2 hours ago, TH3RM4L said: setWeather(parseInt(weatherA)); mp.world.weather = weatherA; 2 hours ago, TH3RM4L said: if (timeA().length > 0) () not needed. It's not a function, it's a variable. Share this post Link to post Share on other sites
TH3RM4L 1 Posted January 25, 2018 Thanks for your help. Share this post Link to post Share on other sites