0xNull 0 Posted January 30, 2018 Hello! How create variable for each player? For example, if player type command "tomp" - his varialable chande to 1? Not all players, only for his? My code: mp.events.addCommand('tomp', (player) =>{ if (startmp == 1){ uch = true; } }); But it code - varialabe "uch" change if any player type "tomp", but need for himself. Please, help me) Share this post Link to post Share on other sites
iRandomXx 0 Posted January 30, 2018 Hi my friend ! I don't understand. You want a UCH boolean for each player ? Share this post Link to post Share on other sites
0xNull 0 Posted January 31, 2018 6 часов назад, iRandomXx сказал: Hi my friend ! I don't understand. You want a UCH boolean for each player ? It seems that I have already solved this problem, but this is not very accurate. Here's how: mp.events.addCommand('tomp', (player)=>{ if (startmp == 1){ player.uch = 1; } }); Share this post Link to post Share on other sites
iRandomXx 0 Posted January 31, 2018 14 hours ago, 0xNull said: It seems that I have already solved this problem, but this is not very accurate. Here's how: mp.events.addCommand('tomp', (player)=>{ if (startmp == 1){ player.uch = 1; } }); This is accurate if do well what you want to do. mp.events.addCommand("tomp", (player) => { if(startmp == 1) player.uhc = 1; // What is startmp variable ? } Just remove brackets when you just use one function in a IF / ELSE, it's more beautiful looked ! No ? Share this post Link to post Share on other sites