
rockstar35
Members-
Posts
30 -
Joined
-
Last visited
Details
-
Location
İzmir
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
rockstar35's Achievements

Rat (9/54)
7
Reputation
-
didn't test it yet but thanks for effort
-
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.
-
Thanks. So i need to make custom chatbox.
-
I wanna change chatbox of all players in server why u move my topic ?
-
Hey guys is there anyway to get a old blue chatbox from old version of MTA ?
-
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" ?
-
wow today i check this page but i didn't see important part , thank you for your time Edit: i'll check it now
-
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.
-
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 ?
-
Oh thanks i'll test this today
-
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
-
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
-
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>
-
i need help guys , why nobody answers ? Hey it's working now
-
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 ?