-
Posts
365 -
Joined
-
Last visited
Posts posted by SkatCh
-
-
Sorry TAPL i don't undrestand your idea.
-
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()
-
try to use "onMarkerHit".
-
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
-
yes i know i already fixed it but didn't work . can you help me; thx
-
didn't work .
-
so what can i do to save it .
-
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 )
-
thx bro it's working now please i have one more question it's possible to save this timer onPlayerLogout.
-
didn't work always "Timer no longer exists" .
-
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)
-
i already make it with setAccountData/getAccountData . so what can i do to keep timer decreasing.
-
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
-
txd = engineLoadTXD("textures/gta_tree_palm.txd") engineImportTXD(txd, 622) dff = engineLoadDFF("textures/veg_palm03.dff", 622) engineReplaceModel(dff, 622)
-
men i want to add image inside editBox Gui
-
i already tried it but didn't work .
-
guys please i need some help , how can i put a picture inside editBox?
-
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 .
-
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.
-
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.
-
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
-
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.
-
check the first Code i already wite ("----- this line" ).
-
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:
outputChatBox
in Scripting
Posted
ipairs loop only number indexes "start from 1 index " and only in order but pairs loop all.