Jump to content

Estevam2d

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by Estevam2d

  1. exact. would send me something or tell me how to do?
  2. how can I make a DrawText for a certain time to pass on the screen as a villain is trapped? the time left to get out of jail ?
  3. thank you, that helped me a lot haha cool sorry bad english
  4. Guys, when I leave the game my points gains disappear This script is the community and I'm not very good at DATE How can I solve? Help Save score exports.scoreboard:addScoreboardColumn('Score') addEventHandler ( 'onPlayerWasted', root, function ( attacker ) if ( attacker ) and ( attacker ~= source ) then local sScore = getElementData(source, 'Score') or 0 local aScore = getElementData(attacker, 'Score') or 0 setElementData(source, 'Score', sScore -1) setElementData(attacker, 'Score', aScore +1) end end ) function myscore(player) local MyScore = getElementData(player, "Score") or 0 outputChatBox("Your score is "..tostring(MyScore), player, 0, 255, 0) end addCommandHandler("myscore", myscore)
  5. Estevam2d

    Fire hit

    Not for a while not, anything I write here.
  6. Estevam2d

    Fire hit

    How could I forget it myself kkk' thank you for help me. I am very happy now
  7. Estevam2d

    Fire hit

    I can destroy one. But the other is impossible.
  8. Estevam2d

    Fire hit

    How do I can destroy only the desired target? This destroying both at the same time. Can anyone help me? test = createObject(2023, -2136.526, -420.095, 35.336) setElementCollisionsEnabled(test, true) function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if weapon == 42 and getElementType(hitElement)=="object" then outputChatBox ( "Fogo apagado", 255, 0, 0 ) destroyElement (test) end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) testedois = createObject(2023, -2148.176, -417.507, 35.336) setElementCollisionsEnabled(testedois, true) function fogoum(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if weapon == 42 and getElementType(hitElement)=="object" then outputChatBox ( "Fogo apagado", 255, 0, 0 ) destroyElement (testedois) end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), fogoum)
  9. how to make the element appear destroyed? local marker = createMarker ( -2023.152, 67.256, 27.463, "cylinder", 1.5, 255, 0, 0, 255 ) function Lixeirojob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and not isPedInVehicle(hitElement) then destroyElement (marker ) -- Element destroyed triggerServerEvent ( "receber", localPlayer ) exports.killmessages:outputMessage("*Bombeiro acaba de salvar uma casa.", root, 10, 118, 240, true) end end addEventHandler("onClientMarkerLeave", marker , Lixeirojob)
  10. oh thanks Now the problem is that I do not know how that one is marked ensencial to earn money. I hope you understand me You can only make money if you stay for a while in the cylinder. Observation: -- Error: How to identify if the player really on this cylinder to get the money? local markerer = createMarker ( 2024.114, -1702.907, 17.369, "cylinder", 3.0, 255, 255, 255,50.1 ) function Lixeirojob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then destroyElement (markerer) triggerServerEvent ( "receber", localPlayer ) exports.killmessages:outputMessage("*Bombeiro acaba de salvar uma casa.", root, 10, 118, 240, true) end end addEventHandler("onClientMarkerLeave", markerer, Lixeirojob) function detonatorAction (key, attacker) if (fire) then if (getPedWeapon (localPlayer) ~= 42) then return end if ( getElementType ( target ) == "fire" ) then blowVehicle ( target ) end if isElement ( hitElement ) and getElementType(hitElement) == "Marker" then -- Error: How to identify if the player really on this cylinder to get the money? setTimer ( function() outputChatBox ("**Agora afaste-se do lugar do acidente para receber sua grana.", 255, 255, 0) destroyElement (fire) destroyElement (blipsbombeiro) end, 2000, 1 ) if (fire) then for control in pairs (getBoundControls(key)) do setControlState (control, true) end end end end bindKey ("lctrl", "down", detonatorAction) I want to use something like this "markerer" if isElement ( hitElement ) and getElementType(hitElement) == "Marker" then
  11. 50% solved, but now the problem that if I hold the right mouse button and I'm making money without stopping. I am immensely happy for the tip of the create Effect addEventHandler ("onClientGUIClick", getRootElement(), function(hitElement, theSize) if (source == GUIEditor_Button[1]) then if guiRadioButtonGetSelected(radioButton1) == true then fires = createFire(2493.792, -1667.981, 13.344) fire = createEffect("fire", 2493.792, -1667.981, 13.344) end end end ) function wastedMessagee (hitElement) if (fire) then if weapon == 42 then return end outputChatBox ( "test", hitElement ) destroyElement (fire) givePlayerMoney ( 70 ) end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), wastedMessagee )
  12. Galera, worked with object but not with fire. But all I backrest that is the object makes me earn money. sorry help addEventHandler ("onClientGUIClick", getRootElement(), function(hitElement, theSize) if (source == GUIEditor_Button[1]) then if guiRadioButtonGetSelected(radioButton1) == true then fireElem = createObject(2023, 2488.354, -1671.3, 12.336) end end end ) function targetingActivated ( fire ) if (fire) then if (getPedWeapon (localPlayer) ~= 42) then return end outputChatBox(tostring(getElementType(fire))) if (fire) then end givePlayerMoney ( 70 ) destroyElement (fireElem) end end addEventHandler ( "onClientPlayerTarget", getRootElement(), targetingActivated )
  13. Has two problems. The first is fire created goes out with little time. The second problem is that when I use the fire extinguisher against the fire did not get anything onClientPlayerTarget should I use? I intend to put this scripture to download. without being compiled. there is nothing similar in mtasa community. will be a simple scripture.
  14. I need to use to have a working firefighter ?
  15. I wanted to use fire extinguisher to extinguish the fire when I would win cash Fire is considered an object ? must be all wrong if my script someone help me I appreciate it very much. addEventHandler ("onClientGUIClick", getRootElement(), function(theSize) if (source == GUIEditor_Button[1]) then if guiRadioButtonGetSelected(radioButton1) == true then if weapon == 42 and getElementType(source)=="object" then fire = createFire(2103.462, -1720.102, 13.389,(weapon)) end end end end )
  16. someone help me this not working. function moveGate(hitPlayer) if getElementType(hitPlayer) == "player" then local theTeam = getPlayerTeam(hitPlayer) local sHour = split( getElementData( hitPlayer, 'PlayTime' ), ":" ) local hour = tonumber( sHour[1] ) if not sHour then sHour = '300:0:0' end if theTeam and getTeamName(theTeam) == "R.O.T.A" or getTeamName(theTeam) == "BMV - Staff" then moveObject(gates, 2500, 1509.664, 663.894, 11.98) end end end addEventHandler("onMarkerHit", markerr, moveGate)
  17. but What I Really Want And How to open the Gate Hours Played. type: local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end
  18. How do I do to open the gate with game time? but also it has to be in the team; Sorry bad english... local gate = createObject(980, 1447.200, 663.869, 11.98, 0, 0, 179) local marker = createMarker(1447.5, 664.255, 10.672, "cylinder", 11, 255, 255, 255, 0) function moveGate(hitPlayer) if getElementType(hitPlayer) == "player" then local theTeam = getPlayerTeam(hitPlayer) if theTeam and getTeamName(theTeam) == "Policia Militar" or getTeamName(theTeam) == "BMV - Staff" then moveObject(gate, 2500, 1427.89, 664.042, 11.98) end end end addEventHandler("onMarkerHit", marker, moveGate) function moveBack(leavePlayer) if getElementType(leavePlayer) == "player" then local theTeam = getPlayerTeam(leavePlayer) if theTeam and getTeamName(theTeam) == "Policia Militar" or getTeamName(theTeam) == "BMV - Staff" then moveObject(gate, 2500, 1447.200, 663.869, 11.98) end end end addEventHandler("onMarkerLeave", marker, moveBack)
  19. Thanks again You guys are great about it
  20. one more thing is this correct? setPlayerWantedLevel(source, +1)
  21. Perfect, thanks for the help. I put "hitElement" and it worked. triggerServerEvent ( "wanted", hitElement, weapon )
  22. not worked I took a photo of the criminal and he does not get star I took a final, you put one more. Client: function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if getPlayerTeam(hitElement) == getTeamFromName("Bandido") then if weapon == 43 and getElementType(hitElement)=="player" then triggerServerEvent ( "wanted", localPlayer ) end end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) Server: addEvent("wanted",true) addEventHandler("wanted",root, function(weapon) if weapon == 43 and getElementType(source)=="player" then if getPlayerTeam(source) == getTeamFromName("Bandido") then setPlayerWantedLevel(source, 1) end end end )
  23. The player does not get the team star, why? addEvent("wanted",true) addEventHandler("wanted",root, function() if weapon == 43 and getElementType(source)=="player" then if getPlayerTeam(source) == getTeamFromName("Bandido") then if setPlayerWantedLevel(source, 1) then end end end end )
  24. Thank you and Anubhav Solidsnake14 If it were not for you guys would be all wrong now, you guys are geniuses. vip = {} function VIPMENUTRIGGER ( thePlayer , commandName ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent ( thePlayer, "GUIVIP", thePlayer) if isElement(vip[thePlayer]) then destroyElement (vip[thePlayer]) end else outputChatBox ( "Voce nao e vip, para comprar fale com alguem da staff",thePlayer) end end addCommandHandler ( "vip", VIPMENUTRIGGER ) function vehiclecar (id) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local x,y,z = getElementPosition ( source ) vip[source] = createVehicle ( id, x + 3, y, z + 1 ) warpPedIntoVehicle(source, vip[source]) setElementModel(source, id) outputChatBox("[VIP] Veiculo criado",source,255,255,0,false) end end addEvent( "carr", true ) addEventHandler( "carr", getRootElement(),vehiclecar )
×
×
  • Create New...