ice_brasil
Members-
Posts
127 -
Joined
-
Last visited
Everything posted by ice_brasil
-
I want the effect to start every 1 second I tried What not worked: function startEffect() startTickCount = getTickCount() end addCommandHandler("droga", startEffect ) can add the set timer for me ? plis. sorry my bad english I'm Brazilian
-
Well as soon as I start the script, everything is pixealizado, just wanted to start a script when entering a function / drug What do by just to start the script so the command is used? My lua used: -- -- c_block_world.lua -- local shaderList = {} local colorizeOff = false addEventHandler( "onClientResourceStart", resourceRoot, function() -- Version check if getVersion ().sortable < "1.1.0" then return end -- Create shader to test for any errors local testShader, tec = dxCreateShader ( "block_world.fx" ) if not testShader then else -- Create 26 shaders and apply each one to some world textures for c=65,96 do local clone = dxCreateShader ( "block_world.fx" ) engineApplyShaderToWorldTexture ( clone, string.format( "%c*", c + 32 ) ) engineRemoveShaderFromWorldTexture ( clone, "tx*" ) -- Skip doing the grass shaderList[#shaderList+1] = clone end -- Initial colors colorize() end end ) ---------------------------------------------------------------- -- Do change ---------------------------------------------------------------- function colorize() colorizeOff = not colorizeOff for _,shader in ipairs(shaderList) do local r,g,b = 0,0,0 while r+g+b < 2 do r,g,b = math.random(0.25,1.25),math.random(0.25,1.25),math.random(0.25,1.25) end if colorizeOff then r,g,b = 1,1,1 end dxSetShaderValue ( shader, "COLORIZE", r,g,b ) end end addCommandHandler("droga", colorize) Help-me plis sorry my bad english I'm Brazilian
-
function startDrug() dxDrawRectangle ( 3.8, 3.8, 2.02, 2, tocolor ( 0, 0, 0, 150 ) ) end addEventHandler("onClientRender", getRootElement(), startDrug) ???I should add that????
-
function fades() local rnd = math.random(2,4) fadeCamera(false, rnd, math.random(1,255), math.random(1,255), math.random(1,255)) local xx, yy, zz = getElementPosition(getLocalPlayer()) setTimer(function() fadeCamera(true, 1) end, rnd*1000/2, 1) end the color is very strong, what do I add to the color is softer,middle transpararente?
-
you not understand the fadecamera the works! but I want to be When You click the button on my script to activate the function of fadecamera not know what function!
-
function timeCheck() local hh, mm = getTime() if (hh<7) then local ww, bb = getWeather() if (ww ~= -52123) then setWeather(-52123) end else local ww, bb = getWeather() if (ww ~= 190) then setWeather(190) end end end function fall() if (isDrugActive) then setPedAnimation(getLocalPlayer(), "ped", "getup_front",2500, false, false) setTimer(function() fall() end, math.random(10000, 30000), 1) setTimer(function() setControlState ('jump',true) end, 2500, 1) setTimer(function() setControlState ('jump',false) end, 3000, 1) end end function addRednessOnDamage ( ) fadeCamera ( source, false, 1.0, 255, 0, 0 ) -- fade the player's camera to red over a period of 1 second setTimer ( fadeCamera, 1500, 1, source, true, 0.5 ) -- don't let it go to opaque red, interrupt it after half a second and fade back to normal end addEventHandler("onClientRender", getRootElement(), drugSteer) addEventHandler("onClientPreRender", getRootElement(), drugCam) function drugSteer() left=false right=false up=false down=false local keys = getBoundKeys ('vehicle_left') if keys then tmpLeft = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpLeft=true end end if tmpLeft then left=true right=false end end local keys = getBoundKeys ('vehicle_right') if keys then tmpRight = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpRight=true end end if tmpRight then left=false right=true end end if (left) then setControlState('vehicle_left', false) setControlState('vehicle_right', true) elseif (right) then setControlState('vehicle_right', false) setControlState('vehicle_left', true) else setControlState('vehicle_right', false) setControlState('vehicle_left', false) end if (left) then setControlState('ped_left', true) setControlState('ped_right', true) elseif (right) then setControlState('ped_right', false) setControlState('ped_left', true) else setControlState('ped_right', true) setControlState('ped_left', true) end local keys = getBoundKeys ('accelerate') if keys then tmpUp = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpUp=true end end if tmpUp then down=false up=true end end local keys = getBoundKeys ('brake_reverse') if keys then tmpDown = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpDown=true end end if tmpDown then down=true up=false end end if (up) then setControlState('accelerate', true) setControlState('brake_reverse', false) elseif (down) then setControlState('brake_reverse', true) setControlState('accelerate', false) else setControlState('brake_reverse', false) setControlState('accelerate', true) end end function startDrug(time) setTimer(function(time) if (time == nil) then time = 10*1000 else if (tonumber(time) < 5000) then tiaaame = 10*1000 end end timerWeather = setTimer(function() timeCheck() end, 1000) timerFades = setTimer(function() fades() end, 4000) isDrugActive = true setTimer(function() fall() end, 1000, 1) addEventHandler("onClientRender", getRootElement(), drugSteer) addEventHandler("onClientPreRender", getRootElement(), drugCam) setTimer(function() stopDrug() end, time, 1) end, 1500, 1, time) end function stopDrug() killTimer(timerFades) killTimer(timerWeather) isDrugActive = false removeEventHandler("onClientRender", getRootElement(), drugSteer) removeEventHandler("onClientPreRender", getRootElement(), drugCam) triggerServerEvent("restoreWeather", getLocalPlayer()) setTimer(function() setCameraTarget(getLocalPlayer()) end, 2500, 1) end function startDrug2() startDrug(4) end function stopDrug2() stopDrug() end addCommandHandler("sd", startDrug2) addCommandHandler("sds", stopDrug2) function restoreWeather(ww) setWeather(ww) end addEvent("restoreWeather", true) addEventHandler("restoreWeather", getRootElement(), restoreWeather) function missionStart(whichMouse, state, absoluteX, absoluteY) local number = getElementData(source,"number") -- this is the button "id" local money=getPlayerMoney(getLocalPlayer()) if (number=='a') then if (money>=500) then startDrug(1*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),500) else outputChatBox("Você não tem dinheiro!", 255, 0, 0) end elseif (number=='b') then if (money>=1000) then startDrug(3*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),1000) else outputChatBox("Você não tem dinheiro!", 255, 0, 0) end elseif (number=='c') then if (money>=1500) then startDrug(6*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),1500) else outputChatBox("Você não tem dinheiro!", 255, 0, 0) end else if (money>=2000) then startDrug(10*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),2000) else outputChatBox("Você não tem dinheiro!", 255, 0, 0) end end --outputChatBox("#00ff00\"dfdf\" #ffffff started!",255,255,255,true) guiSetVisible (missionSelectWindow1, false) showCursor (false) end -- this fires when player hits the marker function missionSelect(hitPlayer, matchingDimension) if (hitPlayer == getLocalPlayer()) and (isPedOnGround (getLocalPlayer()) and not isPedInVehicle(hitPlayer)) then if isDrugActive then outputChatBox("Você esta drogado,você quer morrer ?!", 255, 0, 0) else guiSetVisible (missionSelectWindow1, true) guiBringToFront (missionSelectWindow1) showCursor (true) end end end function guiCancel () guiSetVisible (missionSelectWindow1, false) showCursor (false) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), function() local missionElements = getElementsByType ("drugstore", getResourceRootElement(getThisResource())) num=0 drugMarker = { } drugSphere = { } drugBlip = { } for key,val in ipairs(missionElements) do num=num+1 local tmpX= getElementData(val, "posX") local tmpY= getElementData(val, "posY")
-
is correct ? addCommandHandler('drop', function(p) setElementInterior ( thePlayer, 0) setElementDimension ( thePlayer, 0 ) setTimer(setElementInterior,3500,1,p,-1053.99548, 1558.86609, 1115.13196 ) outputChatBox ( "[#f1f1f1/drop]#ff0000O player ".. getPlayerName(thePlayer) .." foi para o drop1 vá tambem #f1f1f1/drop", getRootElement(),255,20,0,true) local Int = getElementInterior ( thePlayer ) outputChatBox(tostring(Int),thePlayer) end )
-
running, but the set timer does not work, I might add?
-
everything works no good just to get back into the 0 does not work
-
yes, and still continues in the interior: S
-
function drop (thePlayer) setElementInterior ( thePlayer, 0) setElementDimension ( thePlayer, 0 ) setElementPosition ( thePlayer, -1053.99548, 1558.86609, 1115.13196 ) outputChatBox ( "[#f1f1f1/drop]#ff0000O player ".. getPlayerName(thePlayer) .." foi para o drop1 vá tambem #f1f1f1/drop", getRootElement(),255,20,0,true) end addCommandHandler ( "drop", drop ) when I'm in an interior and for that I will teleport / drop it continues on the inside that I want tava goes to "0" What did this wrong?
-
function motel (thePlayer) setElementInterior ( thePlayer, 15, 2215.8032226563, -1150.6900634766, 1025.796875 ) setTimer ( setElementInterior, 10000, 1, "Em 10 segundos!" ) outputChatBox ( "[#f1f1f1/Motel]#ff0000O player ".. getPlayerName(thePlayer) .." foi para o Motel vá tambem #f1f1f1/Motel", getRootElement(),255,20,0,true) end addCommandHandler ( "motel", motel ) I want a player to teleport after only 10 seconds What do wrong?
-
this is for when someone type / hitman (nameplayer) (money) put a bounty on the death of someone, the more wrong What did not work? HitmanEvent = { reward = 0, } function Hitman( ammo, attacker, weapon, bodypart ) if attacker then if ( getElementType ( attacker ) == "player" ) then if source == HitmanEvent then if HitmanEvent.reward > 0 then givePlayerMoney(attacker,HitmanEvent.reward) outputChatBox("O player " .. getPlayerName(source) .. " está morto!",getRootElement(),255,255,255,true) outputChatBox("Matador: ".. getPlayerName(attacker) .. " ",getRootElement(),255,255,255,true) outputChatBox("Recompensa: ".. tostring(huntingEvent.reward) .. " -") if getWeaponNameFromID(weapon) then outputChatBox("arma: ".. getWeaponNameFromID(weapon) .. "-- ") huntingEvent.HitmanOn = false huntingEvent.Element = nil huntingEvent.reward = 0 else outputChatBox("A recompensa pela morte é de $0!",attacker) huntingEvent.huntingOn = false huntingEvent.adminElement = nil huntingEvent.reward = 0 end end end end end end addEventHandler("onPlayerWasted",getRootElement(),PlayerWasted) function PlayerJoin() if source == HitmanEvent.Element then outputChatBox("O player " .. getPlayerName(source) .. "voltou para o servidor MATE-o!",getRootElement(),255,255,255,true) outputChatBox("Resumindo...!") HitmanEvent.HitmanOn = true HitmanEvent.Element = source end end addEventHandler ( "onPlayerJoin", getRootElement(), PlayerJoin ) function PlayerQuit(quitType) if source == HitmanEvent.Element then outputChatBox("O player " .. getPlayerName(source) .. "saiu do servidor!",getRootElement(),255,255,255,true) outputChatBox("Hitman Parado!") HitmanEvent.HitmangOn = false end end addEventHandler("onPlayerQuit",getRootElement(),PlayerQuit) function startHitman(player, commandName,cReward) if not HitmanEvent.HitmanOn then if cReward and tonumber(cReward) > 0 then HitmanEvent.HitmanOn = true HitmanEvent.reward = cReward player = getPlayerCurtName outputChatBox("O hitman foi iniciado novamente!",getRootElement(),255,0,0) outputChatBox("Cumpra sua missão",getRootElement(),0,255,0) outputChatBox("Cumpra sua missão",getRootElement(),0,255,0) else outputChatBox("/".. commandName .. " [Reward]",player) end else HitmanEvent.HitmanOn = false HitmanEvent.Element = nil HtmanEvent.reward = 0 outputChatBox("A recompensa pelo player!",getRootElement(),255,0,0) outputChatBox("O hitman foi parado novamente.",getRootElement(),0,255,0) end end addCommandHandler("hitman",startHitman) function isPlayerHitman(thePlayer) if player == HitmanEvent.HitmanElement then return true else return false end end Help-me
-
programming language course help with mta: sa? I think about doing a course in programming language they teach there moon, it would help me more with the moon mta?
-
This script is for an admin for bounty on his head I want to by any player could reward for the head of any player example: / reward (nameplayer) (money) And who kill the player wins the reward offered What do I add? huntingEvent = { huntingOn = false, adminElement = nil, reward = 0, } function PlayerWasted( ammo, attacker, weapon, bodypart ) if huntingEvent.huntingOn then if attacker then if ( getElementType ( attacker ) == "player" ) then if source == huntingEvent.adminElement then if huntingEvent.reward > 0 then givePlayerMoney(attacker,huntingEvent.reward) outputChatBox("O Adm " .. getPlayerName(source) .. " está morto!",getRootElement(),255,255,255,true) outputChatBox("---- Killer: ".. getPlayerName(attacker) .. " ----",getRootElement(),255,255,255,true) outputChatBox("---- Reward: ".. tostring(huntingEvent.reward) .. " ----") if getWeaponNameFromID(weapon) then outputChatBox("---- Weapon: ".. getWeaponNameFromID(weapon) .. " ----") end huntingEvent.huntingOn = false huntingEvent.adminElement = nil huntingEvent.reward = 0 else outputChatBox("The Hunting Event has a reward of $0!",attacker) huntingEvent.huntingOn = false huntingEvent.adminElement = nil huntingEvent.reward = 0 end end end end end end addEventHandler("onPlayerWasted",getRootElement(),PlayerWasted) function PlayerJoin() if source == huntingEvent.adminElement then outputChatBox("The Admin for hunting Event has Joined the game!") outputChatBox("Resuming Adminhunting!") huntingEvent.huntingOn = true huntingEvent.adminElement = source end end addEventHandler ( "onPlayerJoin", getRootElement(), PlayerJoin ) function PlayerQuit(quitType) if source == huntingEvent.adminElement then outputChatBox("The Admin for hunting Event has left the Game!") outputChatBox("Adminhunting stopped!") huntingEvent.huntingOn = false end end addEventHandler("onPlayerQuit",getRootElement(),PlayerQuit) function startAdminHunting(player, commandName,cReward) if not huntingEvent.huntingOn then if cReward and tonumber(cReward) > 0 then huntingEvent.huntingOn = true huntingEvent.adminElement = player huntingEvent.reward = cReward outputChatBox("Admin Hunting has been started!",getRootElement(),255,0,0) outputChatBox("You must kill the Admin: " .. getPlayerName(player),getRootElement(),255,0,0,true) outputChatBox("---- Happy Killing ----",getRootElement(),0,255,0) else outputChatBox("/".. commandName .. " [Reward]",player) end else huntingEvent.huntingOn = false huntingEvent.adminElement = nil huntingEvent.reward = 0 outputChatBox("A recompensa pelo admin!",getRootElement(),255,0,0) outputChatBox("---- The Admin has stopped the Admin hunting ----",getRootElement(),0,255,0) end end addCommandHandler("adminhunting",startAdminHunting) function isPlayerAdminHunting(player) if player == huntingEvent.adminElement then return true else return false end end Sorry I know I'm asking a lot is that I can not! Help-me Plis
-
My Nitro windows does not open !! My lua: addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") end) function updateNitroColor(RC,GC,BC) if nitroShader then if RC and GC and BC then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", RC/100, GC/100, BC/100) outputChatBox("Cor do nitro editada!",255,255,255,true) end end end function Gui() NitroWindow = guiCreateWindow(206,73,376,456,"",false) -- guiSetAlpha(NitroWindow,1) -- guiWindowSetMovable(NitroWindow,false) guiWindowSetSizable(NitroWindow,false) RedLabel = guiCreateLabel(27,61,109,25,"Vermelho",false,NitroWindow) GreenLabel = guiCreateLabel(27,109,109,25,"Verde",false,NitroWindow) BlueLabel = guiCreateLabel(27,160,109,25,"Azul",false,NitroWindow) RedScrollBar = guiCreateScrollBar(115,61,219,22,true,false,NitroWindow) GreenScrollBar = guiCreateScrollBar(115,109,219,22,true,false,NitroWindow) BlueScrollBar = guiCreateScrollBar(115,160,219,22,true,false,NitroWindow) SaveChangesButton = guiCreateButton(42,229,121,28,"Salvar mudanças",false,NitroWindow) SetDefaultButton = guiCreateButton(206,229,121,28,"Nitro Normal",false,NitroWindow) CloseWindowButton = guiCreateButton(20,417,337,27,"Fechar Janela!",false,NitroWindow) MTAImage = guiCreateStaticImage(33,279,163,124,"images/Trollface.png",false,NitroWindow) CopyrightLabel = guiCreateLabel(186,284,167,113,"",false,NitroWindow) end function accept() if nitroShader then RC = guiScrollBarGetScrollPosition ( RedScrollBar ) GC = guiScrollBarGetScrollPosition ( GreenScrollBar ) BC = guiScrollBarGetScrollPosition ( BlueScrollBar ) if RC and GC and BC then local RC,GC,BC = tonumber(RC),tonumber(GC),tonumber(BC) updateNitroColor(RC,GC,BC) guiSetInputEnabled(false) guiSetVisible(NitroWindow, false) showCursor(false) else outputChatBox("Não pode fazer isso!",255,255,255,true) end end end function close() guiSetInputEnabled(false) guiSetVisible(NitroWindow, false) showCursor(false) end function default() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") guiSetInputEnabled(false) guiSetVisible(NitroWindow, false) showCursor(false) outputChatBox("Nitro color reset para a original!",255,255,255,true) end end bindKey("F2","down",NitroWindow) Gui() if (NitroWindow ~= nil) then -- guiSetVisible(NitroWindow, true) -- showCursor(true) -- guiSetInputEnabled(true) -- addEventHandler("onClientGUIClick", CloseWindowButton, close, false) addEventHandler("onClientGUIClick", SetDefaultButton, default, false) addEventHandler("onClientGUIClick", SaveChangesButton, accept, false) guiScrollBarSetScrollPosition(GreenScrollBar, GC) guiScrollBarSetScrollPosition(BlueScrollBar, BC) else outputChatBox("Não foi possível abrir o Nitro Editor. Entre em contato com um administrador.") end end, false) has error ?
-
My script does not work, I want to when a player by typing / teles appear on your screen in the center The message example: /arena . What did this wrong help me! My lua: function shout(player, cmd, ...) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" )) then for id, players in ipairs(getElementsByType("player")) do local message = table.concat({...}," ") local textDisplay = textCreateDisplay () local nombre = getPlayerName(player) myTextItem = textCreateTextItem ( "/drop /drop2 /drop3", 0.5, 0.5 ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 2500, 1, textItem ) setTimer ( textDestroyDisplay, 2500, 1, textDisplay ) end else outputChatBox("",player,255,255,255) end end addCommandHandler("teles", shout)
-
function InteriorName (thePlayer) setElementInterior ( thePlayer, 15, 2215.8032226563, -1150.6900634766, 1025.796875 ) ~~~Pos your interior (cordenates) outputChatBox ( "[#f1f1f1/teste]#ff0000O player ".. getPlayerName(thePlayer) .."go to motel", getRootElement(),255,20,0,true) ~~ Msg on function used. end addCommandHandler ( "InteriorName",InteriorName ) command for go interior
-
Hello everyone. works perfectly fine,but when the player goes into a teleport in an interior everything's right. But if he is in an interior teleport and wants to go to a teleporter that is not an interior example, / drop it continues within the last teleport how do I when he goes to a teleport that is not in an interior it back to the inside 0 ?? help-me Teleport Interior function stadium2 (thePlayer) setElementInterior ( thePlayer, 14, -1411.0565185547, 1591.1369628906, 1052.53125 ) outputChatBox ( "[#f1f1f1/stadium2]#ff0000O player ".. getPlayerName(thePlayer) .." foi para o Stadium 2 vá tambem #f1f1f1/stadium2", getRootElement(),255,20,0,true) end addCommandHandler ( "stadium2", stadium2 ) Teleport not interior function drop (thePlayer) setElementPosition ( thePlayer, -1053.99548, 1558.86609, 1115.13196 ) outputChatBox ( "[#f1f1f1/drop]#ff0000O player ".. getPlayerName(thePlayer) .." foi para o drop1 vá tambem #f1f1f1/drop", getRootElement(),255,20,0,true) end addCommandHandler ( "drop", drop )
