Jump to content

spAik

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by spAik

  1. Hi, has someone a solution if i want to delete all elements after a map? This can can exploded cars or jsut other randomly spawned elements.
  2. addEventHandler('onGamemodeMapStart',getRootElement(), function() killTimer (votetime) local votetime = setTimer ( happen, 240000, 1 ) end) Hi i want to start a function on the start of a map. I know my script does not work, because I set the "votetime"variable after the killTimer-function. But how can I make it that a timer is created before the map, but the previous timer is also destroyed at mapstart?
  3. someone have an idea how to call spectator mode manually?
  4. oh. thanks, your version works perfect
  5. Hi, I try to remove all empty teams when a player quits... Whats wrong? function initiate() teams = {} for k,v in pairs(getElementsByType("team")) do local team = v.team if isElement(team) and getElementType(team) == "team" then if countPlayersInTeam(team) == 0 then destroyElement(team) end end end end addEventHandler("onPlayerQuit",getRootElement(),initiate)
  6. addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() if(source ~= getLocalPlayer())then return end reset = true setElementData(getLocalPlayer(), "respawn.playing", false, true) setTimer(function() local statea = getElementData(getLocalPlayer(), "hunterarea.playing") if statea then setElementData(getLocalPlayer(), "hunterarea.playing", false, true) unbindKey("mouse1", "down", cdoshoot) unbindKey("lshift", "down", cdjump) unbindKey("lalt", "down", cdspeed) end end,1500,1) setTimer(function() --local state = getElementData(getLocalPlayer(), "respawn.playing") or true if(running)then showRespawn = true setElementData(getLocalPlayer(), "respawn.playing", false, true) bindKey(RESPAWN_KEY, "up", respawn) bindKey(SPECTATE_KEY, "up", spectator) end end, 3000, 1) end) local me = getLocalPlayer() function spectator() clientCall(me, "Spectate.start", 'manual' ) end
  7. Hi, I am trying to adjust a respawn-script to my needs. Its arezus training script. Now i want the client to be able to leave this modus and start spectating again... therefor i tried to use the following command: function spectator() clientCall(getLocalPlayer(), "Spectate.start", 'manual' ) end My question. Is this even the right command to make the client spectate other players?
  8. Hi, the Gamemode is Race. You can buy things (objects) on my server while playing a racemap. Now i want them deleted after maps end. Is the code right? function DestructionDerby:handleFinishActivePlayer(player) -- Update ranking board for player being removed if not self.rankingBoard then self.rankingBoard = RankingBoard:create() self.rankingBoard:setDirection( 'up', getActivePlayerCount() ) end local timePassed = self:getTimePassed() self.rankingBoard:add(player, timePassed) -- Do remove local rank = self:getPlayerRank(player) finishActivePlayer(player) if rank and rank > 1 then triggerEvent( "onPlayerFinishDD",player,tonumber( rank ) ) end -- Update ranking board if one player left local activePlayers = getActivePlayers() if #activePlayers == 1 then setElementData( activePlayers[1], "Wins", tonumber(getElementData( activePlayers[1], "Wins"))+1) self.rankingBoard:add(activePlayers[1], timePassed) showMessage(getPlayerName(activePlayers[1]) .. ' IS THE FUCKING PRO!', 255, 0, 0) triggerEvent( "onPlayerWinDD",activePlayers[1] ) triggerEvent( "onRemoveAll", getRootElement()) triggerEvent ( "activatePodium", getRootElement()) triggerEvent ("onPlayerDestructionDerbyWin", getRootElement (), activePlayers [1]) end end function removeAllObjects () for k,v in ipairs(getElementsByType ( "object", getResourceRootElement(getThisResource()))) do destroyElement (v) end end addEvent("onRemoveAll") addEventHandler("onRemoveAll",root,removeAllObjects) from destructionderby.lua
  9. Hi there, I like the mta client having options for nvidia an internal graphics... ...but is there way to save ur option? Now everytime i start mta it asks me which method I would prefer. I jsut want it to remember the option I have chosen last time. Is there a tweak?
  10. Owww. Damnit. Didnt see that. Thanks Snake
  11. Hi, I try to make a nos command...it should allow the player to only allow to buy it every 60secs. But its not working. Whats wrong? Accountdata "cash" exists. Elementdata Limit should also exist ;X function BuyNos (player, command) local account = getPlayerAccount(player) if (getAccountData(account,"cash") > 3000) and (getElementData(player,"Limit") = 0) then local auto = getPedOccupiedVehicle(player) local nick = getPlayerName(player) addVehicleUpgrade(auto,1010) setAccountData(account, "cash", getAccountData(account,"cash") - 3000 ) setElementData(player, "Limit", 1) outputChatBox("#FFFFFF" .. nick .. " #ff0000bought nitro for $3000! #FFFFFF(/nitro)", getRootElement(), 255, 85, 0, true) SetTimer(resetlimit, 60000, 1 , player) else outputChatBox("#FF0000Not enough money.", player, 255, 85, 0, true) end end addCommandHandler("nitro", BuyNos) function resetlimit (player) setElementData(player,"Limit",0) end
  12. spAik

    Server list spam

    neither F-u-c-k-N nor the same sentences are used. Nor have we the same resources, players or anything other in common with you - beside the Fun Destruction Derby - which is a general term. I dont see any problem. Btw: I am owner of the 3R server
  13. thanks solidsnake can you tell me how to change the gui commands of rankingboard to dxDrawText?
  14. like: https://forum.multitheftauto.com/viewtop ... 5&p=377355
  15. Hi, I try to use the above mentioned function in some race resources. like: rankingboard. It worked perfectly in nametags. but how can i get hexcolorcodes to be shown in the rankingboard_client? Has someone an example script?
×
×
  • Create New...