SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 didnit work please help it's an important thing . Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 guyes let's take step by step : i add this function to decrease time :(1s) function decreaseMutedTime(player, time) if (not isElement(player) or not time) then return end local function decreaseTime() local o = tonumber(getElementData(player, "mt")) or 0 <----- this line local time = o - 1 setElementData(player, "mt", getElementData(player, "mt") - 1) <----- this line if (time <= 1 and isPlayerMuted(player)) then local time = nil setElementData(player, "mt", false) outputChatBox("You have been unmuted", player, 255, 255, 0) setPlayerMuted(player, false) setElementData(player, "muteInfo", false) if (isTimer(unmuteTimer[player])) then killTimer(unmuteTimer[player]) end end end unmuteTimer[player] = setTimer(decreaseTime, 1000, tonumber(getElementData(player, "mt"))) end then i add this to check mute time onPlayerLogout : function checkMuteOnLogout(account) if (not isPlayerMuted(source)) then return end local mutedTime = getElementData(source, "mt") or 0 if (tonumber(mutedTime > 1)) then setAccountData(account, "mt", tonumber(mutedTime)) end end addEventHandler("onPlayerLogout", root, checkMuteOnLogout) the i add an other function to check mute onPlayerLogin : function checkMuteOnLogin(account) local mutedTime = getAccountData(account, "mt") or 0 if (tonumber(mutedTime > 1)) then setPlayerMuted(source, true) decreaseMutedTime(source, mutedTime) end end addEventHandler("onPlayerLogin", root, checkMuteOnLogin) they are working fine but the problem now is when i mute someone and he leave the game i got this in my debugscript 3: Link to comment
#DRAGON!FIRE Posted September 14, 2014 Share Posted September 14, 2014 The errors in line ? and .. : function checkMuteOnLogin(_,account) local mutedTime = getAccountData(account, "mt") or 0 if (tonumber(mutedTime > 1)) then setPlayerMuted(source, true) decreaseMutedTime(source, mutedTime) end end addEventHandler("onPlayerLogin", root, checkMuteOnLogin) and edit "onPlayerLogout" like this in Parameter Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 check the first Code i already wite ("----- this line" ). Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 didn't work i try it, i think i need to kill the timer when the pleayer leave . as I told you before, it is because you don't kill that timer when the player leaves.Nor the table get cleaned. but the problem how i tried many things and the same problem. Link to comment
Et-win Posted September 14, 2014 Share Posted September 14, 2014 Why not using Serials? What if the player has no account? With a table. Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 Why not using Serials? What if the player has no account? With a table. bro it's working fine like that , just when the player leave the game i got some warnings , that's all , i restarted the resource it's working fine the player still muted , but when he leave the game an come back again , the mute time become 0. can u help me Link to comment
Et-win Posted September 14, 2014 Share Posted September 14, 2014 And your current script is?.. Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 RE-PM Bro please help me , i'm really sorry if i waste ur time but i think u are the only one can fix it please . I am not the only one, but yes I can rewrite this code perfectly, but that isn't how it works. I do not help people who are not trying to fix it by them self and who ignore my solutions. Also it looks like you don't know how your currently code works, so please leave me alone. I am not willing to help you under those conditions. Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 RE-PMBro please help me , i'm really sorry if i waste ur time but i think u are the only one can fix it please . lol i tried ur solution and didn't work bulshit i think u don't know how to fix it i'm sorry if i asked ur for help really big difference between u and ET-win , he helped me many time also i PMed him and he directly post his answer here because he want to help people , but you u didn't even explaned to me how to use ur code ???? , more than that i don't need ur help don't post here again i'm pretty sure that i will someone will help me . Players like you obliged the others to use leaked script's but i will never do this , and i will do my best to fix it. Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 hahaha, seems somebody doesn't like bad comments. Go a head and think that I can't, the scripters I have helped know better then that. I probably have helped you also in the past. As you can see my post count then you know how many people I have helped. Of course I am differed from my mate Et-win, but I let people write their own code and correct them when they made a mistake or give them solutions. In your case I gave a solution because of the leak of my time(large concept project). I did writing full code for people in the past, but I am not doing that any more and it seems he is still doing that on some topic's. It will probably change after he reached 2k posts. Anyway it is really pathetic of you to compare me with Et-win so he will fix/rewrite your code. and as you wished I will not reply on this, if you do not reply on this post. ( or I will still replying till you shut up ) I recommend you to not reply or you will literally ruining your own topic. Let Et-win write your code, I don't care less. Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 lol bla bla bla bla bulshit why you talk a lot ???? anyways i already fixed it hhhhhhhhhh , and i'm pretty sure that u can't fix it cya . really i can't stop hhhhhhhhhhhhhhhhhhhhhhhhhh Topic can be locked thx guys for help. Link to comment
Moderators IIYAMA Posted September 14, 2014 Moderators Share Posted September 14, 2014 That is why forums do exist, to do bla, bla, bla.... Looks like you haven't figured that out yet. yes, topic can be locked, looks like he found it on the community. Link to comment
SkatCh Posted September 14, 2014 Author Share Posted September 14, 2014 That is why forums do exist, to do bla, bla, bla.... Looks like you haven't figured that out yet.yes, topic can be locked, looks like he found it on the community. problem fixed and he still talking hhhhhhhh . Link to comment
Recommended Posts