Jump to content

Estevam2d

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by Estevam2d

  1. 'm not the criminal group. they are criminals in the team and I'm in Admin team
  2. I have this script enemy of the problem that the ped does not die for nothing. I spent my ammo on him and he does not suffer any damage. Could anyone help me. Sorry bad English local Exercito = getTeamFromName ( "Exercito" ) function Exercitosobymanawydan ( thePlayer) local AclNome = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..AclNome, aclGetGroup ( "Admin" ) ) then nemesi = exports [ "slothBot" ]:spawnBot ( 103.65139007568,1902.8734130859,33.8984375, 90, math.random ( 300, 303 ), 0, 0, Exercito, 34, "guarding", true ) setElementModel ( nemesi, 287 ) BlipExercito = createBlipAttachedTo ( nemesi, 0, 2, 11, 86, 16, 255, 1) triggerClientEvent ( "nsound", root ) setElementData(nemesi, "exercito",true) if nemesi then exports.extra_health:setElementExtraHealth ( nemesi, 100 ) end end end addCommandHandler("exercito", Exercitosobymanawydan) setTimer ( destroyElement, 3600000, 0, slothbot) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) outputChatBox ( getPlayerName ( killer ) .. " #081DBFmatou um soldado",getRootElement(), 255, 255, 255, true ) exports.exp_system:addPlayerEXP ( killer, 600 ) destroyElement(BlipExercito) end end) function SetAdmExercitoTeam(thePlayer) local AclNome = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..AclNome, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( thePlayer, Exercito ) end end addCommandHandler("nemesiTeam",SetAdmExercitoTeam)
  3. vehicles that are not destroyed are also disappearing
  4. Very good. Thank you, you helped me a lot. It was very simple and fast.
  5. not the admin script is failing when cars explode. is why do I need a script that makes updating the admin script.
  6. started and is running You helped guide me Very Thanks Again
  7. I tried your script but not updated anything in the folder. I tried the script you sent and also not worked.
  8. Not started. The feature I want one so the JOBpl
  9. I already tried to put on and do not know how. how do?
  10. function restartAllResources() local allResources = getResources() for index, res in ipairs(allResources) do if getResourceState(res) == "JOBpl" then restartResource(res) end end end addCommandHandler( "pl", restartAllResources ) how can I put a time to start and stop automatically activated without charge? I think this script is wrong.
  11. I wanted to restart a script at time 15000 and do not know how to do this.
  12. Is there any script that I can use to update the other script on the server ?
  13. How do I get this script to repair the vehicle and not the life of the ped? I want to use a spray to repair the vehicle Cliente.lua local marker = createMarker( 2035.1999511719, -1406.5, 16.200000762939, "Cylinder", 2, 6, 183, 248, 153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(999,999,"Medic job") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take medic job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function Medicjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Medicjob) function Medicjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Medicjobleave) function joinTeam() triggerServerEvent("setMedic",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false) addEventHandler("onClientPlayerDamage", localPlayer, function(attacker, weapon, bodypart, loss) team = getPlayerTeam(attacker) if (attacker and getElementType(attacker) == "player" and weapon == 41 and team and getTeamName(team) == "Medic") then -- Checks if the player is using spray and is into Medic team cancelEvent() -- Cancels the damage cause by the spray if (not isTimer(pause)) then local health = getElementHealth(localPlayer) if (health < 99) then triggerServerEvent("medic:healing", localPlayer, attacker) -- Calls the Server Event pause = setTimer(function() end, 1000, 1) -- Makes a timer for the function so it won't fully heal in the first time end end end end) Server.lua createBlip ( 2035.1999511719, -1406.5, 16.200000762939, 22,2,0,255,0, 255,0, 200) function createMedicTeam () MedicTeam = createTeam ("Medic", 6, 183, 248) end addEventHandler ("onResourceStart", resourceRoot, createMedicTeam) function joinMedic() setPlayerTeam(source,MedicTeam) setPlayerNametagColor ( source, 6, 183, 248 ) setElementModel(source,276) giveWeapon ( source, 41, 999 ) setElementData( source, "Occupation", "Medic", true ) outputChatBox("You are now Medic.",source,0,255,0) end addEvent("setMedic", true) addEventHandler("setMedic",root,joinMedic) addEvent("medic:healing", true) addEventHandler("medic:healing", root, function (medic) if (getElementHealth(source) < 100) then local Heal = getElementHealth(source) + 10 -- New health setElementHealth(source, Heal) if (Heal > 100) then setElementHealth(source, 100) end givePlayerMoney(medic, 100) -- Gives 100$ to the medic each time the function is executed takePlayerMoney(source, 100) -- Takes 100$ from the source when he get healed end end)
  14. The drawText already ready, I put the two dxDrawRectangle and is working. But what I need is to make this event start only in a particular area. need a funciton that allows me to put x, y, z. I tested the getScreenFromWorldPosition, only appears in the game I want just about to the display.
  15. I want the screen real I want at particular location
  16. I am beginner in script I try to understand with patience. But I do not need to put the positions x, y, z so it appears the drawText ? Solidsnake14 is nearly so, not only in los santos entire is only in store Ammunation. Like when I get near the shop appeared drawText with the rules Ammunation
  17. sorry Here's cliente.lua I want to create a DrawText only for the player and not for all only one posisao de los santos local messagesList = { "Bem vindo", "Sempre olhe MTA-BRASIL", "Talves voce perca", "E sempre estaremos", "Traga jogadores", "Traga 3 e ganhe", "traga 5 e ganhe", "Tem alguma duvida?", "MTA-BRASIL JOB's", "Armas agora sao salvas ao morrer", } local currentMessage = 0 -- ******************** -- * Event handlers * -- ******************** addEventHandler("onClientPreRender", getRootElement(), function() local screenWidth, screenHeight = guiGetScreenSize() -- Draw the news sticker. dxDrawRectangle(screenWidth - 310, 325, 200, 20, tocolor(0, 0, 0, 100), false) -- Draw all strings. dxDrawText(messagesList[currentMessage + 1], screenWidth - 400, 330, screenWidth - 6, 16, tocolor(255, 255, 255, 150), 1, "default-bold", "center", "top", false, false, false) end ) function updateMessage() if (currentMessage == 11) then currentMessage = 0 else currentMessage = currentMessage + 1 end end setTimer(updateMessage, 4000, 0)
  18. Look underneath the money. It appears that the drawtext for everyone and I did not want so I wanted to q appear only for a player and also in a certain position.
  19. This is it even But I want without the marker. just get close already appears draw
  20. I want to create a drawing on the screen. For example in Ammunation, if I got the position would appear to draw
  21. Thanks again. Soon I will post the script here for help.
  22. thank you I am entering this line of script, but I need to learn more and do not know where I can learn. Could you tell me where I can learn more detailed script?
  23. but how do I create the coordinates (a position that will display the dxDrawText)? I am newbie in creating script. I want to create a dxDrawText, but I need to know how. And I want to create in a specific location.
  24. how can I create a xDrawText? But when you want to arrive at a particular place. Sorry for the bad english.
×
×
  • Create New...