Jump to content

Pembo

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Pembo

  1. If the sound is created inside an interior which is in another dimension then you must use setElementDimension() on the sound directly after for it to work.
  2. Hey my name is Brad and I am an MTA programmer. I am currently looking for a partner to work on a project with me that I am very passionate about but feel I need someone to guide me, someone to give a second opinion on the things the project needs etc. The project itself is an RPG server for MTA so it will take quite some time to complete, especially with me being not even 5% into it yet so patience is a requirement. I am not looking for another programmer or a designer as such but someone who can help with just simply putting me in the right direction and someone who is actually wanting to be a part of this project from the start and so on. If you have any experience in something like programming or whatever then that is even better but it is NOT a requirement since its not what I need. Please contact me via PM if you are interested and have the time to commit yourself to such a project and we will talk more. Thanks.
  3. Your function 'getAmmoPerClip' is returning a string so the line: setWeaponProperty( id , "std", "maximum_clip_ammo", tmp) will not run because it expects a number at argument 4. Show your definition for the 'getAmmoPerClip' function and it can be fixed.
  4. Well the first thing you MUST do in order to script for MTA is learn Lua. If you do not have any Lua knowledge then you can not expect to be able to script. To learn Lua visit here: https://www.lua.org/manual/5.3/ Also this topic is a good source for references on learning Lua: After you have experience in Lua you will be able to start programming in MTA. To start doing that you must visit here: https://wiki.multitheftauto.com/wiki/Scripting_Introduction and start messing around with some basic scripts and resources.
  5. Pembo

    Crosshair

    Wops misread your question. The only solution I can think of is to draw a custom crosshair on the screen and just disable the real crosshair.
  6. Pembo

    Crosshair

    Shared function: setPlayerHudComponentVisible(player, "crosshair", true)
  7. Yeah sorry didn't mention the dxDrawImageOnElement function its really useful along with dxDrawTextOnElement which will draw text on an element so if you wanted to put text above a player too then you can use that
  8. Use the dx drawing functions and use the event "onClientRender" to draw it for the client.
  9. Pembo

    Jail system

    addEventHandler("onPlayerJoin", root, --for the purpose of this tutorial only, really you should use a saving system function() setElementData(source, "wantedLevel", 0) end ) function warpToJail(wantedLevel) if (getElementType(source) == "player") then if getElementData(source, wantedLevel) == 3 then setElementInterior(source, interior) --insert interior of jail setElementPosition(source, posX, posY, posZ) --insert position of jail setElementRotation(source, rotX, rotY, rotZ) --set the players rotation if need be outputChatBox("You have been sent to jail!", source, 255, 0, 0) --output a message to the player who was jailed end end end addEventHandler("onElementDataChange", root, warpToJail) Then you will need a system to add wanted levels to players and preferably a saving system to save the wanted level for each player. To accomplish this you should use MySQL or SQLite to save the players data into a table in a database every time they log out and retrieve it when they log back in.
  10. Pembo

    image on text

    Use these functions: addEventHandler("onClientRender", root, function() dxDrawImage(...) dxDrawText(...) end ) Obviously you must supply the correct arguments in to parameters of the dxDrawImage and dxDrawText to set the positioning and how you want it to appear for the client. The reason you use "onClientRender" is because if you just used the dx functions alone it would create it for one frame only resulting in basically nothing (unless the clients PC has like 1 FPS, in which case he/she would see it for 1 second) so this will allow the client to see the image on every frame. An alternative is to use the GUI functions and create the image and text as GUI elements for the client. see: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#GUI_functions_2
  11. Pembo

    bad argement

    Variable 'vehicle' will be assigned a boolean value if the client is not in a vehicle.
×
×
  • Create New...