Jump to content

Kutlu35

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Kutlu35

  1. didn't test it yet but thanks for effort
  2. Hello i wanna make a tray notification when new map launchs. You know creatin tray notification is client sided thing and i need get maps name on notification. I tried make a bridge with triggering events but i couldn't do it. Thanks.
  3. Thanks. So i need to make custom chatbox.
  4. I wanna change chatbox of all players in server why u move my topic ?
  5. Hey guys is there anyway to get a old blue chatbox from old version of MTA ?
  6. I will check it thanks again Hmm , can you help me about "how to start a vote between a random list of up to 9 maps" ?
  7. wow today i check this page but i didn't see important part , thank you for your time Edit: i'll check it now
  8. i will make event like "onRobberWasted" and attach event to function changeMap, and i just want made start map poll when robber dies . I mean cops can stay alive just start map poll and change map , i will add dxtext when robber dies "Cops win". Simply i want learn how to start votemap poll in the middle of race.
  9. Hello everyone , Im making Race CnR for my server . It's very simple , one player becomes robber and other players becomes police and race starts. If map duration is over robber wins , that's ok but how can i made cops won ? I mean , when robber dead i want start votemap poll and change map while cops still alive. How can i do that ?
  10. Hey , i wan't make teleport all players to admin script. Example: I type "/getall" and every player in the server comes to me. Can anybody help me with start ? I think that funcitions are usefully: getElementPosition setElementPosition addCommandHandler
  11. Hey thanks about it i'll try but i fix the problem. Script starts with 'destruction derby' race mode. I change race mode to 'freeroam' race mode and fixed. I'll try this for fix code. Thanks again. And vehicle turf wars looks soo cool
  12. Awh sorry and it bugged again Thanks loki now im trying Hmm , i do that but it's intresting , not working. That script sometimes working sometimes doesn't woking. Error: server:line44: attempt to perform arithmetic on global 'playerKOTHPoints' <a string value>
  13. i need help guys , why nobody answers ? Hey it's working now
  14. Hey dear forum users , i got pio's koth map and resource but it doesn't works. Client: -- resource root local resourceRoot = getResourceRootElement() local rootElement = getRootElement() -- variables local KOTHPoints = 0 local screenWidth, screenHeight = guiGetScreenSize() -- function: addKOTHPoint function addKOTHPoint(player) KOTHPoints = KOTHPoints+1 end addEvent("onPlayerScoreKOTHPoint", true) addEventHandler("onPlayerScoreKOTHPoint", resourceRoot, addKOTHPoint) -- displaying player points function displayKOTHPoints() dxDrawText(KOTHPoints, screenWidth*12/13+3, screenHeight*6/7-2, screenWidth*0.99+3, screenHeight, tocolor(0, 0, 0, 255), 4, "arial", "right") dxDrawText(KOTHPoints, screenWidth*12/13, screenHeight*6/7, screenWidth*0.99, screenHeight, tocolor(240, 240, 0, 255), 4, "arial", "right") dxDrawText("Points", screenWidth*12/13+3, screenHeight*6/7+38, screenWidth*0.99+3, screenHeight, tocolor(0, 0, 0, 255), 2.4, "arial", "right") dxDrawText("Points", screenWidth*12/13, screenHeight*6/7+40, screenWidth*0.99, screenHeight, tocolor(240, 240, 0, 255), 2.4, "arial", "right") end addEventHandler("onClientRender", rootElement, displayKOTHPoints) -- remove points display after game addEventHandler("onClientResourceStop", resourceRoot, function() removeEventHandler("onClientRender", rootElement, displayKOTHPoints) end) -- show results at the end function showResults(source, resultTable) local results = 15 if #resultTable < 15 then results = #resultTable end function displayResults() for i=1,results do local text = i.." "..getPlayerName(resultTable[i][1]).." ("..resultTable[i][2].." points)" dxDrawText(text, screenWidth/13+1, screenHeight/4-1+i*17, screenWidth, screenHeight, tocolor(0, 0, 0, 255)) dxDrawText(text, screenWidth/13, screenHeight/4+i*17, screenWidth, screenHeight, tocolor(255, 255, 255, 255)) end end addEventHandler("onClientRender", rootElement, displayResults) setTimer(function() removeEventHandler("onClientRender", rootElement, displayResults) end, 15000, 1) end addEvent("onKOTHEnd", true) addEventHandler("onKOTHEnd", resourceRoot, showResults) Server: local playersAmount = #getDeadPlayers() + #getAlivePlayers() -- settings local pointingTime = (5000/playersAmount)+200*(playersAmount/(playersAmount+21)) local hillPoints = math.floor(playersAmount*1.5) +2 -- resource root local resourceRoot = getResourceRootElement() local rootElement = getRootElement() -- hill element local hills = getElementsByType("hill") -- event: onHillDestroy addEvent("onHillDestroy") addEventHandler("onHillDestroy", resourceRoot, function() hillBlip = getElementData(source, "hillblip") destroyElement(hillBlip) destroyElement(source) end) -- points reset function resetKOTHPoints(player) setElementData(player, "checkpoint", 0) setElementData(player, "race rank", "") end function resetPlayersKOTHPoints() local players = getElementsByType("player") for k, player in ipairs(players) do resetKOTHPoints(player) end end addEventHandler("onResourceStart", resourceRoot, resetPlayersKOTHPoints) addEventHandler("onPlayerJoin", resourceRoot, resetKOTHPoints) -- points granting function startTakingPoints(theElement) if (getElementType(theElement) == "player") then pointingTimer = setTimer(function(source) if (source ~= nil) then if (isElementWithinMarker(theElement, source)) then playerKOTHPoints = getElementData(theElement, "checkpoint") markerPoints = getElementData(source, "checkpoint") setElementData(theElement, "checkpoint", playerKOTHPoints+1) setElementData(source, "checkpoint", markerPoints-1) triggerClientEvent(theElement, "onPlayerScoreKOTHPoint", resourceRoot, theElement) if (markerPoints <= 1) then triggerEvent("onHillDestroy", source) end else if (pointingTimer ~= nil) then killTimer(pointingTimer) end end else killTimer(pointingTimer) end end, pointingTime, hillPoints, source) function stopScoring() if (isTimer(pointingTimer)) then killTimer(pointingTimer) removeEventHandler("onHillDestroy", resourceRoot, stopScoring) end end addEventHandler("onHillDestroy", resourceRoot, stopScoring) end end -- function: createHill function createHill(posX, posY, posZ, size, points) theHill = createMarker(posX, posY, posZ+1, "corona", size, 240, 240, 0) hillBlip = createBlipAttachedTo(theHill, 56) setElementData(theHill, "checkpoint", points) setElementData(theHill, "hillblip", hillBlip) addEventHandler("onMarkerHit", theHill, startTakingPoints) end -- initializing KOTH mode function startKOTH() call(getResourceFromName("Scoreboard"), "scoreboardAddColumn", "checkpoint") function placeNewHill() newHill = hills[math.random(1, table.getn(hills))] local posX = getElementData(newHill, "posX") local posY = getElementData(newHill, "posY") local posZ = getElementData(newHill, "posZ") createHill(posX, posY, posZ, 5, hillPoints) end addEventHandler("onHillDestroy", resourceRoot, placeNewHill) placeNewHill() end addEventHandler("onResourceStart", resourceRoot, startKOTH) -- clearing after the game function removeAnything() --call(getResourceFromName("Scoreboard"), "scoreboardRemoveColumn", "checkpoint") end addEventHandler("onResourceStop", resourceRoot, removeAnything) -- creating a result table function checkForResults() local players = getElementsByType("player") local sorted = {} local i = 1 for k, player in ipairs(players) do local points = getElementData(player, "checkpoint") sorted[i] = {player, points} for j=i-1,1,-1 do if (sorted[i][2] > sorted[j][2]) then sorted[j+1] = sorted[j] sorted[j] = {player, points} else break end end i = i+1 end for i=table.getn(sorted),2,-1 do --setPlayerIsFinished(sorted[i], true) --call(getResourceFromName("Race"), "setPlayerIsFinished", theElement) triggerEvent("onPlayerFinishDD", sorted[i][1], i) killPed(sorted[i][1]) end triggerEvent("onPlayerWinDD", sorted[1][1]) triggerClientEvent("onKOTHEnd", resourceRoot, sorted[1][1], sorted) end addEvent("onPostFinish", true) addEventHandler("onPostFinish", rootElement, checkForResults) Error at client line 44: atttempt to perform aritmethic on global 'playerKOTHPoints' <a string value> can anyone help me ?
  15. Serverin gerçekliğinden şüpheliyim abim srdeydi ve servere girdim abimin nickini verdim Furkan diye bi eleman çıktı karşıma Volkan abiyi Emiri Ataberki saydim. Daha sonra bu eleman "abini s***m" dedi. Ben mizahmi yapiyor kafayi mi yedi diye düşünürken serial banı çaktı hey gidi günler geri gelmiyecek heralde. Düzenleme: Abimin adı Doğukan nicki [SR]BuffaloBill di taniyosunuzdur umarim. Düzenleme 2: Eski başlığa yazmiştim bu olay başima dün(zaman dilimi olarak bu tarihten 2 gün önce ) geldi.
  16. En üste bunu: local adminACL = aclGetGroup ( "Admin" ) Gerekli kismada bunu yazarsan sadece adminler tarafindan kullanilir: if isObjectInACLGroup( getPlayerAccount( thePlayer ), adminACL ) then
  17. Öncelikle sql dosyasından connectionu sagliycaksin daha sonra mysql veritabani bilgilerini içe aktaricaksin . Bu forumu uzun süredir biliyorum ama yeniyim bu tarz işlerle aram pek iyi şuan lua dilini öğreniyorum istersen ayrintili bilgi verebilirim şuan telefonumda oduğum için pek yardimci olamiyorum ama burdan türk kardeslerime yardimda bulunacağım.
  18. i send you link cuz this have gearshift system. You can read the lua file and see gear(rpm) system how does work. Good luck
  19. Nice dude i love old maps
  20. im not good on scripting but i thing this is usefully for your script. https://www.mta-sa.org/thread/14444-release-custom-engine-sound/ Direct Download(Car-Sound-Scriptfor-infernus): https://www.mta-sa.org/attachment/773-custom-infernus-sound-zip/
  21. Yes its. My english is not enough sorry for this
  22. Hello dear forum users, im newbie on scripting . now im doing a little help system. Player say /help to chat . like a "help me" text on chatbox but other players can't see "help me" text only admins can see it. which funcitions useless for this addCommandHandler outputChatbox( how i can write text to only admins see) Sorry for bad english my from Turkey
×
×
  • Create New...