Jump to content

Black2

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by Black2

  1. Hello, I was wondering because if I just change the command the resource does not work? for example the first with "givecash" command works but the second with the command "test" does not work because it happens that someone could explain to me? Thank you 1 function consoleGiveCash ( thePlayer, command, amount ) givePlayerMoney ( thePlayer, amount ) end addCommandHandler ( "givecash", consoleGiveCash ) 2 function consoleGiveCash ( thePlayer, command, amount ) givePlayerMoney ( thePlayer, amount ) end addCommandHandler ( "test", consoleGiveCash )
  2. Hello, I was wondering how I can do to run the Test2 function when in a specific car, let's say infernus whose ID is 411, when driving with the vehicle perform this function, instead of with the command,would be grateful for your help, thank you If you have not understood very well,I made a script and it performs the function with the command, I want to convert it to work when you are inside the vehicle and driving,Thx again addCommandHandler( "Test", Test2 )
  3. Hello, I've been having a problem to cancel an event if someone help me I thank you. Well I want setElementData (hitElement, "Test2", true) is only available if the player is on the mark but to leave it still continues because it does not work? Does anyone have any ideas ? Thank you for your help. ^^ function Test( hitElement ) if getElementType ( hitElement ) == "player" then setElementData ( hitElement, "Test2", true ) end function markerLeave( leaveElement, matchingDimension ) if getElementType( leaveElement ) == "player" then outputChatBox ( "Player has left a marker", getRootElement(), 255, 255, 0 ) setElementData ( hitElement, "Test2", false ) end end addEventHandler( "onMarkerLeave", myMarker, markerLeave )
  4. Hello anyone know what is vehicle plate ID ? Thx
  5. Hello,anyone know how i can remove the text of area.Thx Here a photo: http://prntscr.com/b59l7x
  6. Hello, I was wondering how I can do to open a brand with button. Example: Say a brand open a window, I was wondering how I do to the window only open if I'm on the mark and press a key to open Thanks for helping
  7. Hello,How can I do to disable the collision between the players of the server? Thx
  8. still does not work
  9. Hello, I found this race script and it works to hit the mark, but leave the marking and is well away from her the race starts, I want you to work only when the marking, Can anyone help me? Thank you very much in advance I do not know how, maybe if it is false setElementData (hitElement, "race_isSignedUp", true) for setElementData (hitElement, "race_isSignedUp", false) but I could not someone have any idea, thx function onSignUpMarkerHit( hitElement ) if getElementType ( hitElement ) == "player" then if not getElementData ( hitElement, "race_isSignedUp" ) then if getPedOccupiedVehicle ( hitElement ) then if getVehicleController ( getPedOccupiedVehicle ( hitElement ) ) == hitElement then local playerTeamName = getTeamName ( getPlayerTeam( hitElement ) ) if not copTeams[playerTeamName] then table.insert ( signedUpPlayers, hitElement ) exports.DENdxmsg:createNewDxMessage ( hitElement, "You succesfully signed up!", 0, 255, 0 ) setElementData ( hitElement, "race_isSignedUp", true ) else exports.DENdxmsg:createNewDxMessage ( hitElement, "Law can't sign up for a street race!", 255, 0, 0 ) end end else exports.DENdxmsg:createNewDxMessage ( hitElement, "You need a vehicle to sign up!", 255, 0, 0 ) end end end end
  10. Why this don't work ? can anyone help?,Thx function test2 () dxDrawText("Test", (sx-612), (sy-29), 780, 752, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, true, false) end addCommandHandler( "test", test2 )
  11. [Help]Export - Resolved
  12. I want all objects of a certain Id have another scale. Example:All objects have a scale of 1, I want all id 1234 object has the scale 2. How i can make this ?
  13. Black2

    [Help]Textures

    Not giving more error in debugscript but still does not work. I wonder why ? Image http://i.imgur.com/2GwDDHl.png
  14. Hello,Why can't I add a texture? I need .dff too ? i can't use only .txd ? jump = engineLoadTXD ( "jump.txd" ) engineImportTXD ( jump, 1634 ) thanks for helping. :3
  15. Hello,I want that after a while,the ped back to do the animation was doing. whats wrong ? Thx. function refresh ( ) setPedAnimation, 5000, 1, ped1,"DANCING","DAN_Down_A", -1, false, false, false end setTimer ( refresh, 30000, 1 ) ---- function pedcreate () ped1 = createPed ( 83, 2353, 2143, 10.68, 90 ) pedanim = setTimer (setPedAnimation, 5000, 1, ped1,"DANCING","DAN_Down_A", -1, false, false, false ) setElementFrozen ( ped1, true ) end addEventHandler ( "onResourceStart", getRootElement(), pedcreate ) I know that if I use pedanim = setTimer (setPedAnimation, 5000, 1, ped1,"DANCING","DAN_Down_A", -1, true, true, false ) he will not lose the animation but this is only an example
  16. Black2

    [Ped]Godmode

    Hi,Someone has an idea of how I can make a godmode ped to NPC.Thx Example: createPed ( 255, 0, 0, 0 )
  17. Hello,why this don't work ? I want put Infernus with 50000000 extra health more don't work Thx for you time. function test ( ) local id = getElementModel ( theVehicle ) id == 411 then exports [ "extra_health" ]:setElementExtraHealth(id, 50000000) end addEventHandler("onResourceStart",getRootElement(),test) The Export Script by castillo14 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5195
  18. ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) function peddestroy ( thePlayer ) if ( isPedDead (ped1) ) then outputChatBox ( "Ped is dead", thePlayer ) killTimer( pedanim ) --stop ped anim timer when destroying the ped destroyElement( ped1 ) --removed timer here, to prevent your code conflicting with the ped's respawn end end addEventHandler("onPedWasted", getRootElement(), peddestroy ) function pedrespawnafterdeath () ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) end addEventHandler ( "onPedWasted", ped1, pedrespawnafterdeath ) this work,but if i kill ped 2 times he don't respawn why ?
  19. Hi,how i can do for the ped respawn after death ? I try it but don't work function pedcreate () ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) --added variable here, to help clean up timers end function peddestroy ( thePlayer ) if ( isPedDead (ped1) ) then outputChatBox ( "Ped is death", thePlayer ) killTimer( pedanim ) --stop ped anim timer when destroying the ped destroyElement( ped1 ) --removed timer here, to prevent your code conflicting with the ped's respawn end end addEventHandler("onPedWasted", getRootElement(), peddestroy ) function pedrespawnafterdeath () ped1 = createPed(56, -2225.376953125, 2333.6584472656, 7.546875) pedanim = setTimer ( setPedAnimation, 5000, 0, ped1, "ped", "SEAT_idle" ) --again, define timer variable end function pednewadeath( thePlayer ) if ( isPedDead (ped1) ) then setTimer ( pedrespawnafterdeath, 5000, 1 ) outputChatBox ( "Ped Respawn work!", thePlayer ) end end addEventHandler("onPedWasted", getRootElement(), pednewadeath ) function pedspawn ( thePlayer ) setTimer ( pedcreate, 5000, 1 ) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), pedspawn ) --changed to resource root element - attaching to root element would trigger a new ped on every new resource starting subenji99 Trick Posts: 226 Joined: Sat Jan 03, 2009 8:48 pm
  20. Black2

    [HELP]Peds

    i packed,but he still does not give rotation if frozen and if addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) the ped not run the animation function pedLoad () ped1 = createPed ( 83, 2353, 2143, 11, 90 ) setPedAnimation ( ped1,"DANCING","DAN_Right_A", -1, true, true, false, true ) setElementFrozen ( ped1, true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
  21. Black2

    [HELP]Peds

    Hello mates,I have a problem here. I want the ped be frozen but the rotation does not apply to ped if it is frozen and kill him he still stands how i can fix it ?,Thx. function pedLoad () Ped1 = createPed ( 83, 2353, 2143, 11 ) setTimer(setPedRotation,5000,1,Ped1,270 ) setTimer(setPedAnimation,5000,1,Ped1,"DANCING","DAN_Right_A",-1,true,true,false,true ) setPedFrozen ( Ped1, true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
  22. hello, I created a dxreactangle and it works right in my resolution but the other is not how I fix this? local Width,Height = 400, 17.23 local X = (sx/1.68) - (Width/2) local Y = (sy/1.018) - (Height/1.018) ------ local Z = (sx/1.67) - (Width/2) local M = (sy/1.017) - (Height/1.018) --------- dxDrawRectangle(X, Y, Width, Height, tocolor(0, 0, 0, 180), false) dxDrawText("test", Z, M, 780, 752, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
  23. addEventHandler ( "onClientPlayerDamage", root, function ( _, weapon ) if ( weapon and weapon ~= 38 and getTeamName ( getPlayerTeam ( localPlayer ) ) == "Civilians" ) then cancelEvent(); end end ); this script was for civilian team not taking damage with minigun,why don't work ?
  24. Hello,I want to put this text dxDrawText("Destination: "..dest..", in "..city..". Distance: "..math.floor(dist).."m", (sx/2)-381,sy-31, 0,0, tocolor(0,0,0,200), 0.7, "bankgothic" ) Within a rectangle dxDrawRectangle( ( rx-205 ), ( ry-78 ), 199, 17, tocolor(0, 0, 0, 180), true) Anyone can ride for me to see how I can do? Thx
×
×
  • Create New...