Jump to content

SkatCh

Members
  • Posts

    365
  • Joined

  • Last visited

Everything posted by SkatCh

  1. SkatCh

    outputChatBox

    ipairs loop only number indexes "start from 1 index " and only in order but pairs loop all.
  2. Sorry TAPL i don't undrestand your idea.
  3. Hello there , i create a new ban system with a special view etc ... but the problem is how can i check the player serial before he press the login button . so which one i need to use "onPlayerJoin" or "onPlayerConnect". i tried this but didn't work . function checkBan() for index, ban in pairs(banList) do local serial = getPlayerSerial (source) if (ban[1] == serial) then triggerClientEvent(source, "showBanScreen", source,ban[1],ban[2], ban[3], ban[4]) end end end addEventHandler ( "onPlayerJoin", getRootElement(), checkBan ) banList -- special Table like getBans()
  4. thx guys i fixed it , please i have one more question: It's possible to keep that timer working even onPlayerLogout ? i'm sorry about my english
  5. yes i know i already fixed it but didn't work . can you help me; thx
  6. so what can i do to save it .
  7. You mean like this : function timerDetails(source) if (isTimer(antiSpamAds[source])) then remaining = getTimerDetails(antiSpamAds[source]) outputChatBox("Time remaining "..remaining.." seconds .",source,153,51,255) else outputChatBox("Timer no longer exists",source,153,51,255) end end addCommandHandler("time", timerDetails) -- Save Timer function save() local PlayerAccount = getPlayerAccount ( source ) local AccountName = getAccountName (PlayerAccount) if ( AccountName ) then setAccountData ( playeraccount, "time", remaining ) end end addEventHandler ("onPlayerQuit", root, save )
  8. thx bro it's working now please i have one more question it's possible to save this timer onPlayerLogout.
  9. didn't work always "Timer no longer exists" .
  10. Hi, please i need some help can anyone tell me how can i check the timer if it's inside a table. like this : local timer = {} function () bla bla antiSpamAds[source] = setTimer(function() end, 900000, 1 ) etc.... end Now how can i use this : function timerDetails() remaining = getTimerDetails(........) ----- What do i write here ? if (remaining) then outputChatBox("Time remaining "..remaining.." seconds .",source,153,51,255) else outputChatBox("Timer no longer exists",source,153,51,255) end end addCommandHandler("time", timerDetails)
  11. SkatCh

    About setTimer

    i already make it with setAccountData/getAccountData . so what can i do to keep timer decreasing.
  12. guys please i need some help i create a vip system and i want to keep the time working even if the player logout is that possible . just a part from my script: local timers = { } function startTime ( thePlayer ) if not ( timers [ thePlayer ] ) then timers [ thePlayer ] = setTimer ( function () if ( isElement ( thePlayer ) ) then local timeLeft = getElementData ( thePlayer, "time" ); if ( timeLeft ) then if ( timeLeft > 0 ) then if ( ( timeLeft - 1 ) > 0 ) then setElementData ( thePlayer, "time", timeLeft - 1 ); else remove ( thePlayer ); end else remove ( thePlayer ); end end else return; end end, 1000, -1 ); end end
  13. txd = engineLoadTXD("textures/gta_tree_palm.txd") engineImportTXD(txd, 622) dff = engineLoadDFF("textures/veg_palm03.dff", 622) engineReplaceModel(dff, 622)
  14. SkatCh

    About EditBox

    men i want to add image inside editBox Gui
  15. SkatCh

    About EditBox

    i already tried it but didn't work .
  16. SkatCh

    About EditBox

    guys please i need some help , how can i put a picture inside editBox?
  17. problem fixed and he still talking hhhhhhhh .
  18. 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.
  19. 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.
  20. 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
  21. didn't work i try it, i think i need to kill the timer when the pleayer leave . but the problem how i tried many things and the same problem.
  22. check the first Code i already wite ("----- this line" ).
  23. 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:
×
×
  • Create New...