-
Posts
245 -
Joined
-
Last visited
Everything posted by Turbesz
-
I use CEF to play music in game, but if a music copyrighted then does not start. How can i shun this?
-
I tried this way (this is not the full code), and when i insert a new data to the table the rectangle appears with animation, and when i insert again, then existing and new rectangle appears with animation too, how to set animation only for the new one? (sry, my english is very bad) local start = getTickCount() local one, one1 = 1, (sy_/2+800) * ym local two, two1 = 1, (sy_/2+300) * ym function teszt() for k, v in ipairs(notifications) do local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 600) - start), "Linear") dxDrawRectangle((sx_-1900) * xm, y - (31*k), dxGetTextWidth("test", 0.9, myFont,true)+52, 30 * ym, tocolor(0, 0, 0, 120)) end end addEventHandler("onClientRender",root,teszt) addEventHandler("onClientPlayerChangeNick", root, function(l_4_0, l_4_1) start = getTickCount() end )
-
I tried this method, but does not work: local tabla = {"Valami", "ASdasd", "Teszt", "Proba"} function teszt() local talalat = table.find(tabla,"Va") outputChatBox(talalat) end addCommandHandler("test",teszt) function table.find(tabl,word) if type(tabl) ~= "table" or word == nil then return false else local ret = false for k,v in pairs(tabl) do if v == word then return k end end end end
-
Thanks
-
I want to create a command which remove all accounts from the player's serial, if he forgot the account name. What functions, arguments can be used for this?
-
I've tried save the data many ways, but the timer after login it doesn't work at all, everything else works
-
i didn't removed anything, just this part does not work now
-
still does not work local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getAccountName ( source ) if ( playeraccount ) then local azazaza = getAccountData (playeraccount, "bortonperc") or 0 setElementData(source,"bortonperc",azazaza) setTimer(function() local thePlayer = source if azazaza ~= 0 or azazaza ~= -1 then idozito[getPlayerSerial(thePlayer)] = setTimer(function() if azazaza == 0 then if isTimer(getPlayerSerial(thePlayer)) then killTimer(getPlayerSerial(thePlayer)) end triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,false,"#ffb540vége") end setElementData(thePlayer,"bortonperc",azazaza-1) outputChatBox(azazaza) end,5000,0) end end,1000,1) end end )
-
now does not work the save part of script function onPlayerQuit ( ) local playeraccount = getAccountName ( source ) if ( playeraccount ) then local ezezeze = getElementData(source,"bortonperc") or 0 setAccountData (playeraccount, "bortonperc", ezezeze) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getAccountName ( source ) if ( playeraccount ) then local azazaza = getAccountData (playeraccount, "bortonperc") or 0 setElementData(source,"bortonperc",azazaza) setTimer(function() if azazaza ~= 0 or azazaza ~= -1 then idozito[getPlayerSerial(source)] = setTimer(function() if azazaza == 0 then if isTimer(idozito[source]) then killTimer(idozito[source]) end triggerClientEvent(source,"chat->NewMessage",source,false,"#ffb540vége") end setElementData(source,"bortonperc",azazaza-1) outputChatBox(azazaza) end,5000,0) end end,1000,1) end end )
-
i tried this, but same problem
-
i want create a jail system, but when a player reconnect to the server, the countdown stops at the last value... for example: the player have 10 minutes left, then reconnects, the timer does not subtract from the number anymore.. how to fix this? code: rRoot = getResourceRootElement(getThisResource()) local idozito = {} function JAIL(thePlayer,commandName,sendToName,ido,...) if ( sendToName ) then if (getPlayerFromParticalName (sendToName)) and ido then if ( not tonumber ( ido ) ) then triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,"hiba","Adj meg egy számot 0-9999 között időnek. Ennyi percre kerül be a játékos.") return end if tonumber(ido) > 9999 then triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,"hiba","Maximum 9999 percre teheted be börtönbe a játékost.") return end local toPlayer = getPlayerFromParticalName (sendToName) local pmMessage = table.concat( { ... }, " " ) if not (pmMessage == "") then triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,false,"#FFb540[Börtön] "..getPlayerName(thePlayer).." #FfFfFfbebörtönözte #FFb540"..getPlayerName(toPlayer).." #FFffFFjátékost, #FFb540"..ido.." #FFffFFpercre.") triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,false,"#ffb540[Börtön] #FFffFFIndok: #FFb540"..pmMessage) setElementData(toPlayer,"bortonperc",ido) idozito[toPlayer] = setTimer(function() local percei = getElementData(toPlayer,"bortonperc") or 0 if percei == 0 then if isTimer(idozito[toPlayer]) then killTimer(idozito[toPlayer]) end triggerClientEvent(thePlayer,"chat->NewMessage",toPlayer,false,"#ffb540vége") end setElementData(toPlayer,"bortonperc",percei-1) end,5000,0) else return false end else triggerClientEvent(thePlayer,"chat->NewMessage",thePlayer,"hiba","A megadott játékos nem található.") return false end else return false end end addCommandHandler("jail", JAIL) function teszt(thePlayer) local percei = getElementData(thePlayer,"bortonperc") or 0 outputChatBox(percei) end addCommandHandler("teszt",teszt) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local ezezeze = getElementData(source,"bortonperc") or 0 setAccountData (playeraccount, "bortonperc", ezezeze) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local azazaza = getAccountData (playeraccount, "bortonperc") or 0 setElementData(source,"bortonperc",azazaza) setTimer(function() if azazaza ~= 0 or azazaza ~= -1 then idozito[source] = setTimer(function() if azazaza == 0 then if isTimer(idozito[source]) then killTimer(idozito[source]) end triggerClientEvent(source,"chat->NewMessage",source,false,"#ffb540vége") end setElementData(source,"bortonperc",azazaza-1) outputChatBox(azazaza) end,5000,0) end end,1000,1) end end )
-
Helloo, i want to invite you to a old MTA:SA server. It has been available since 2012, you can come up from any region, you will not be disappointed. What you can do on this server?! - Knife vs knife match (or any other weapon) - You can race with your friends ..etc. Anything you want, without rules. You do not need a good computer, to join this server... You can play from a very old laptop too. Do you want to join? Here is the IP: mtasa://87.229.115.198:22113 Some videos from server: https://www.youtube.com/watch?v=Szz6fxwp0Jw https://www.youtube.com/watch?v=OmKa1iGTHN https://www.youtube.com/watch?v=duR3ZPtr3PQ https://www.youtube.com/watch?v=1oN2YLaCHoE
-
i have a dd server, and i want add that if a map played 5x, then remove 9) Play again from votemanager, and when playing another map, then add again 9) Play again for 5 rounds.. how can this be done? sorry for my very bad english..
-
doesn't show
-
Just chat
-
now working:D
-
working:D
-
doesn't working:s
-
No, nothing.
-
doesn't write:s
-
Doesn't working
-
yes, position
