Jump to content

Nahar

Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

912 profile views

Nahar's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. Nahar

    Help please fast

    Thanks! it's working.
  2. Nahar

    Help please fast

    No Errors
  3. Nahar

    Help please fast

    Not working
  4. function chatDis(command) cancelEvent() outputChatBox("THE CHAT IS DISABLED",source,255,0,0) if hasObjectPermissionTo ( command, "function.banPlayer" ) then addEventHandler("onPlayerChat",getRootElement(),chatDis) end end function chatEN(command) if hasObjectPermissionTo ( command, "function.banPlayer" ) then outputChatBox("THE CHAT IS NOW ENABLED ",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatDis) end end addCommandHandler("cd",chatDis) addCommandHandler("ce",chatEN) How i can add there that it work only for the team spectators? i mean when i write ./ce no one can write in the chat even admins. how i can add like admins can talk and others cant.
  5. How much you will pay?
  6. no one?
  7. Hey guys, Im searching scripter who can do an userpanel whit this features: For this features: Garage System ,Light Shop , Wheel Shop , Skin Shop , Other Features , Donator Panel, Map Shop, we can offer 50 euro. Please if you are interested send me a pm whit your skype or add me on skype: nahar997
  8. Add me on skype: nahar997 i can help you.
  9. Yes, but it don't work and it don't show any error on debugscript.
  10. Hey guys, Here is an auto-b system, sometime it work and sometime not, I don't where is the problem. DestructionDerby = setmetatable({}, RaceMode) DestructionDerby.__index = DestructionDerby DestructionDerby:register('Destruction derby') winprice = nil winplayer = nil dead = 0 function DestructionDerby:isApplicable() return not RaceMode.checkpointsExist() and RaceMode.getMapOption('respawn') == 'none' end function DestructionDerby:getPlayerRank(player) return #getActivePlayers() end -- Copy of old updateRank function DestructionDerby:updateRanks() for i,player in ipairs(g_Players) do if not isPlayerFinished(player) then local rank = self:getPlayerRank(player) if not rank or rank > 0 then setElementData(player, 'race rank', rank) end end end -- Make text look good at the start if not self.running then for i,player in ipairs(g_Players) do setElementData(player, 'race rank', '' ) setElementData(player, 'checkpoint', '' ) end end end function DestructionDerby:onPlayerWasted(player) if isActivePlayer(player) then self:handleFinishActivePlayer(player) if getActivePlayerCount() <= 1 then local activePlayers = getActivePlayers() if #activePlayers == 1 then if getElementData(activePlayers[1], "isDonator") ~= true or string.find(g_MapName, "[sHOOTER]", 1, true) or string.find(g_MapName, "[FUN]", 1, true) or string.find(g_MapName, "[DD]", 1, true) or getElementModel(getPedOccupiedVehicle(activePlayers[1])) == 425 then RaceMode.endMap() else TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto') end else RaceMode.endMap() end else TimerManager.createTimerFor("map",player):setTimer(clientCall, 2000, 1, player, 'Spectate.start', 'auto') end local pvpElements = getElementsByType ( "pvpElement" ) for theKey,pvpElement in ipairs(pvpElements) do if (getElementData(pvpElement, "player1") == player or getElementData(pvpElement, "player2") == player) and getElementData(pvpElement, "accepted") == true then local player1 = getElementData(pvpElement, "player1") local player2 = getElementData(pvpElement, "player2") if player1 == player then addPlayerArchivement( player2, 44 ) outputChatBox("#256484:PVP: #FFFFFF"..getPlayerName(player2).." has won a PVP war against "..getPlayerName(player1).." and receives "..tostring(getElementData(pvpElement, "money")).." VIP.",getRootElement(),255,0,0, true) setPlayerMoney(player2, getPlayerMoney(player2)+getElementData(pvpElement, "money")*2) elseif player2 == player then addPlayerArchivement( player1, 44 ) outputChatBox("#256484:PVP: #FFFFFF"..getPlayerName(player1).." has won a PVP war against "..getPlayerName(player2).." and receives "..tostring(getElementData(pvpElement, "money")).." VIP.",getRootElement(),255,0,0, true) setPlayerMoney(player1, getPlayerMoney(player1)+getElementData(pvpElement, "money")*2) end destroyElement(pvpElement) break end end if getActivePlayerCount() ~= 0 then if isLoggedIn(player) == true and getElementData(player, "AFK") == false then local onlinePlayers = 0 local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do onlinePlayers = onlinePlayers + 1 end local endPoints = math.floor(onlinePlayers*(8.5+(onlinePlayers/100))/(getActivePlayerCount()+1)) local endMoney = math.floor(onlinePlayers*(65+(onlinePlayers/100))/(getActivePlayerCount()+1)) if g_eventInProgress == 1 or g_eventInProgress == 2 or g_eventInProgress == 3 then endPoints = endPoints*2 end outputChatBox("#00aa46:Points: #ffffff You received "..tostring(endPoints).." points and "..tostring(endMoney).." VIP for playing this map.", player, 255, 255, 255, true) setElementData(player, "Points", getElementData(player, "Points") + endPoints) setElementData(player, "Money", getElementData(player, "Money") + endMoney) if isTimer ( WinTimer ) then killTimer ( WinTimer ) end end end end RaceMode.setPlayerIsFinished(player) showBlipsAttachedTo(player, false) end function DestructionDerby:onPlayerQuit(player) if isActivePlayer(player) then self:handleFinishActivePlayer(player) if getActivePlayerCount() <= 1 then local activePlayers = getActivePlayers() if #activePlayers == 1 then if getElementData(activePlayers[1], "isDonator") ~= true then RaceMode.endMap() end else RaceMode.endMap() end end end end 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 finishActivePlayer(player) -- Update ranking board if one player left local activePlayers = getActivePlayers() if #activePlayers == 1 then givePlayerBetWinning (activePlayers[1]) self.rankingBoard:add(activePlayers[1], timePassed) setElementData(activePlayers[1], "winningCounter", getElementData(activePlayers[1], "winningCounter") + 1) if getElementData(activePlayers[1], "winningCounter") == 5 then addPlayerArchivement(activePlayers[1], 12) elseif getElementData(activePlayers[1], "winningCounter") == 7 then addPlayerArchivement(activePlayers[1], 13) elseif getElementData(activePlayers[1], "winningCounter") == 11 then addPlayerArchivement(activePlayers[1], 14) end if tonumber(getElementData(activePlayers[1], "winningCounter")) >= tonumber(getElementData(activePlayers[1], "WinningStreak")) then setElementData(activePlayers[1], "WinningStreak", getElementData(activePlayers[1], "winningCounter")) end if isTimer ( WinTimer ) then killTimer ( WinTimer ) end local onlinePlayers = 0 local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do onlinePlayers = onlinePlayers + 1 if activePlayers[1] ~= thePlayer then if isLoggedIn(thePlayer) == true then setElementData(thePlayer, "winningCounter", 0) end end end local endPoints = math.floor(onlinePlayers*(8.5+(onlinePlayers/100))) local endMoney = math.floor(onlinePlayers*(65+(onlinePlayers/100))) if g_eventInProgress == 1 or g_eventInProgress == 2 or g_eventInProgress == 3 then endPoints = endPoints*2 end if isLoggedIn(activePlayers[1]) == true and getElementData(activePlayers[1], "AFK") == false then outputChatBox("#00aa46:Points: #ffffff You received "..tostring(endPoints).." points and "..tostring(endMoney).." VIP for winning this map.", activePlayers[1], 255, 255, 255, true) setElementData(activePlayers[1], "WonMaps", getElementData(activePlayers[1], "WonMaps")+1) --triggerClientEvent ( activePlayers[1], "onRefreshGui" ) setElementData(activePlayers[1], "Points", getElementData(activePlayers[1], "Points")+ endPoints) setElementData(activePlayers[1], "Money", getElementData(activePlayers[1], "Money")+ endMoney) if onlinePlayers >= 10 then addPlayerArchivement( activePlayers[1], 8 ) end if string.find(g_MapInfo.name, "[DM]", 1, true) then setElementData(activePlayers[1], "DMWon", getElementData(activePlayers[1], "DMWon")+1) end if getElementData(activePlayers[1], "DMWon") == 100 then addPlayerArchivement( activePlayers[1], 19 ) end if getElementData(activePlayers[1], "DMWon") == 1000 then addPlayerArchivement( activePlayers[1], 21 ) end if string.find(g_MapInfo.name, "[DD]", 1, true) then setElementData(activePlayers[1], "DDWon", getElementData(activePlayers[1], "DDWon")+1) end if getElementData(activePlayers[1], "DDWon") == 100 then addPlayerArchivement( activePlayers[1], 20 ) end if getElementData(activePlayers[1], "DDWon") == 1000 then addPlayerArchivement( activePlayers[1], 22 ) end end local ran_win_mesage = { [1] = "He won "..tostring(getElementData(activePlayers[1], "DMWon")).." DM maps", [2] = "He won "..tostring(getElementData(activePlayers[1], "DDWon")).." DD maps", [3] = "He drove "..tostring(math.floor(getElementData(activePlayers[1], "KM"))).." KM in this server!", [4] = "He did "..tostring(getElementData(activePlayers[1], "TopTimes")).." toptimes!", [5] = "He is Level "..tostring(getElementData(activePlayers[1], "Rank")).."!", [6] = "He got "..tostring(getElementData(activePlayers[1], "Money")).." Vero", [7] = "He played "..tostring(getElementData(activePlayers[1], "PlayedMaps")).." maps!", [8] = "He got "..tostring(getElementData(activePlayers[1], "Points")).." points!", [9] = "His winning streak is x"..tostring(getElementData(activePlayers[1], "winningCounter")).."!", [10] = "He is already for "..tostring(math.floor(getElementData(activePlayers[1], "TimeOnServer")/60)).." minutes on the Server!" } local hasCustomText = false if getElementData(activePlayers[1], "isDonator") == true then if getElementData(activePlayers[1], "useWinsound") ~= 0 then local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if getElementData(thePlayer, "toggleWinsounds") == 1 then callClientFunction(thePlayer, "playSound", "audio/winsounds/"..tostring(getElementData(activePlayers[1], "useWinsound"))..".mp3") end end end if getElementData(activePlayers[1], "customWintext") ~= "none" then showWinMessage("#FFFFFF"..tostring(getElementData(activePlayers[1], "customWintext")), "#00aa46"..tostring(ran_win_mesage[math.random(1,10)]), 0, 170, 77) hasCustomText = true end end if hasCustomText == false then showWinMessage("#FFFFFF".._getPlayerName(activePlayers[1]) .. '#00aa46 has won the map!', "#FFFFFF"..tostring(ran_win_mesage[math.random(1,10)]), 0, 170, 77) end end end ------------------------------------------------------------ -- activePlayerList stuff -- function isActivePlayer( player ) return table.find( g_CurrentRaceMode.activePlayerList, player ) end function addActivePlayer( player ) table.insertUnique( g_CurrentRaceMode.activePlayerList, player ) end function removeActivePlayer( player ) table.removevalue( g_CurrentRaceMode.activePlayerList, player ) end function finishActivePlayer( player )
  11. Nahar

    Help

    Thanks
  12. Nahar

    Help

    Any example please?
  13. Nahar

    Help

    Hey all, i made a script which change tag color every 10 sec, but i don't know how to make tag random color, i made this: local r local g local b if(phase)then r,g,b,a = getColorFromString(colors[1]) else r,g,b,a = getColorFromString(r,g,b) end local team = getTeamFromName(Names[1]) if(team)then for i,p in ipairs(getElementsByType("player"))do if(getPlayerTeam(p) == team)then for v,blip in pairs(getAttachedElements(p)) do if getElementType(blip) == "blip" then setBlipColor(blip,r,g,b,255) break end end setTeamColor ( team , r, g, b) end end end How i can make tag color change ( random) every 10 sec?
  14. Nahar

    AIuto

    ciao, ho provato a fare uno script che cambia il colore della tag ogni 10 secondi, ma il colore resta sempre lo stesso, lo voglio farlo random ma non so come farlo. local r local g local b if(phase)then r,g,b,a = getColorFromString(colors[1]) else r,g,b,a = getColorFromString(r,g,b) end local team = getTeamFromName(Names[1]) if(team)then for i,p in ipairs(getElementsByType("player"))do if(getPlayerTeam(p) == team)then for v,blip in pairs(getAttachedElements(p)) do if getElementType(blip) == "blip" then setBlipColor(blip,r,g,b,255) break end end setTeamColor ( team , r, g, b) end end end
  15. Nahar

    [Help]Color

    Any example? or can u show me how make it?
×
×
  • Create New...