Jump to content

denny199

Members
  • Posts

    877
  • Joined

  • Last visited

Everything posted by denny199

  1. Why doing so hard? Just use playSound3D, and then attach it on the vehicle. As I said, you need to search better: https://community.multitheftauto.com/in ... ls&id=3104
  2. Cache worked already in the older versions, I don't know how the caching works, but one thing I know, it wont be saved to the players hard-drive. BTW, The one who said that he has all your resources/scripts might be jealous, if you want to troll the stealer then build in a backdoor(just in case you can track back your script if someone has stole it.), and then simpely compile it with a costum compiler. ^.^
  3. You can calculate it easy. Go to my post> viewtopic.php?f=91&t=57776 Like: --converted a bit for dxDrawing. -- since there isn't a 'element' for dxDrawing you need to remove the function and se the 'x' and the 'y' local screenW,screenH=guiGetScreenSize() --it's stil the same. local windowW,windowH=500,500 --see down why. -- You need to put here your variables ( like the width and height ) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 -- this will center the rectangle preciese like the default function --and then you can use this: addEventHandler("onClientRender", root, function () dxDrawRectangle ( x, y, 500, 500, tocolor ( 0, 0, 0, 150 ) ) -- for example a rectangle. end)
  4. Just trigger it. There's no need for element data.. IDK what you are trying to make. [maybe we can request getPedAnimation on server side]
  5. ... if getElementData(source,"invincible") then Source is nothing, please try my code.
  6. You only need to set the data of the player "invincible" to "true". addEventHandler ( "onClientPlayerDamage",root,function () if (getElementData(getLocalPlayer(),"invincible") == "true") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), function () if (getElementData(getLocalPlayer(),"invincible") == "true") then cancelEvent() end end) addEventHandler( 'onClientRender', root, function () for _, player in ipairs( getElementsByType( 'player')) do if (getElementData(player,"invincible") == "true") then local x, y, z = getElementPosition( player ) local cx, cy, cz = getCameraMatrix( ) if getDistanceBetweenPoints3D( cx, cy, cz, x, y, z ) <= 15 then local px, py = getScreenFromWorldPosition( x, y, z + 1.3, 0.06 ) if px then dxDrawText( "I have godmode....", px, py, px, py, tocolor( 255, 255, 255, 255 ), 1, "arial-bold", "center", "center", false, false, false , true ) end end end end end) Not tested.
  7. can you show me the "targetPlayer" function? And why are you using getElementHealth ( player, -8 ) ?
  8. http://www.lua.org/pil/4.2.html
  9. or https://wiki.multitheftauto.com/wiki/SetElementVelocity
  10. Show your part of the code, so we can edit it
  11. Show the part of the code what you are using.
  12. Remove the SPACES: so rename it to for example: "CIT_Party_Island_Project"
  13. denny199

    Memory crash?

    Hi there, My friend have some problems when he's starting MTA, we already looked at google but we didn't found the good answer. The error code onstart: DXDiag:
  14. Use variables on the server side... For example: local canjoin = true addEventHandler( "onPlayerJoin", root, -- or onPlayerLogin function () if ( canjoin == false ) then outputChatBox ( "You can't join the spy-vs-spy game, spectator mode started.", source, 255,0,0, true ) elseif ( canjoin == true ) then outputChatBox ( "You joined the spy-vs-spy game!", source, 255,0,0, true ) end end) And then you should edit your system ;p It's the fasted way. edit: or contact me on skype edit2: If you want to get it on the client side you need to store the data in a table, and then trigger the tabledata to the client, but I prefer server side. edit3(0.o):Why do you actaully want this on your new gamemode , it's just funnier to play direct instead of waiting..
  15. I didn't understand that at all You want to chek if the player is logged in or so from the client? or do you want to chek if the player has logged in but not the people who are joined? Can you tell it me maybe what you trying to do?
  16. Yes, but still when it's scaled there isn't a good collision anymore then
  17. Better use /refresh, or just make a dummy script which is restarting all the loaded resources.
  18. denny199

    race Help

    That's because you used here: PlayerName = addTeamColor(player) without LOCAL so it will NOT be for the function. after that you are not showing your full code at all. Please, post serverside and al the needed functions like addTeamColor, and explain a bit more what you are trying to accomplish. -You didn't showed the addTeamColor function -You didn't show the trigger -Your scripts have errors because nothing triggers the function with onClientRender (addEventHandler ( "onClientRender", getRootElement(), WinTextRendering )) Kindly regards, Danny
  19. A: I'm sure 0,o Q: What do you think of hardcore?
  20. A: My skype is: danny-denr ( feel free to add me ) Q: Why do you need it? ^.^
  21. A: porn?, it's usefull for everone Q: Or something else?
  22. A: IDK, just need some ideas Q: What kind of script?
  23. A: To much people, just search already for "roleplay" Q: What gamemode/script would you like to see on opensource? (just like for example a prone script, a real computer, etc. )
  24. A: meh :>, I need to habituate it. Q:Should abxf aka Samer update the list of idiots?
  25. Hi there, I searched recently on the wiki and the forums for some help, but those help didn't worked for me. I've made a apartement with arround 100~200 objects arround it, and I have created a system that is loading for each apartement the interiors. But when I'm inside the apartement ( objects are loaded on the client ) it will load very slow like this: On the left side: On the right side: BTW: engineSetModelLODDistance isnt working! Kindly regards, Danny
×
×
  • Create New...