Jump to content

redditing

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by redditing

  1. I wanted to ask if there is a possibility of the disappearance of the weapon that we are currently holding ... for example, I will enter a function in the script addEventHandler(" onResourceStart ", root, function () giveWeapon (source, 31, 69) end) And the gun I got, I want her to disappear. So how can I do that?
  2. And this will help me get the positions of the NEAREST target I am aiming for?
  3. I have a problem with setElementTarget recently, because I would like to make a script in which when I aim at something, "CreateWeapon" will shoot in that direction, but no matter what I do, it shoots too close or crooked. Anyone got any idea for this?
  4. I am creating a new weapon, M16 I found an old model in GTA SA and wanted to use it, now I am in the phase of creating weapons in the weapon the point is that I have CreateWeapon and shoot as I wanted, but when the M4 created by CreateWeapon is aimed, it is set differently and additionally shoots otherwise, not where it aims, but somewhere above or below it depends on where you are looking By the way, I mention that M16 and CreateWeapon are attached to the bone 25 (12) Okay, never mind, I found the setWeaponTarget function by entering coordinates, but thanks for helping me :D
  5. There is one problem with that when aiming with a gun, then the Bone 25 doesn't work well, because the rifle is positioned differently and the bone 25 doesn't hold well.
  6. How to get the weapon position we are currently holding?
  7. setPedAnimation(getLocalPlayer(), "shop", "shp_gun_aim") I would like my character to move with this animation, which means that when I aim a normal weapon, e.g. M4, I can move, but I can't move with this animation. Please help!
  8. I am creating a new weapon, and is in the aiming phase, but I would like to set the aiming position for the player, that createWeapon ("m4", 0, 0, 0) would aim where the player is aiming, and that the animation set by me [setPedAnimation (getLocalPlayer (), "shop", "shp_gun_aim", -1, true, true, false, false, 250, true)] aimed where the player looks while holding the right mouse button, How can I do it? By the way, I would like to ask if it is possible for the player not to hit when the animation is on?
  9. I have a question, I would like to know if it is possible to make a shot effect, it means that when I hold the M4, it shoots and you can see where these bullets are falling and at what speed, and I would like to recall these bullets. If it is not known what is going on, I did the "M1" weapon model and I would like to make this model as a new weapon, and if the player was holding this M1 then it would have to shoot and the bullets would fall out of the weapon. At the beginning I was thinking about the "CreateWeapon" function but it is possible that there is another option because on average I know this function and if there was any other option it would be great
  10. Good idea but i think about lags with server after that
  11. And will remove this button event for each player on the team? ("OnClientGUIClick ')
  12. removeEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL1) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL2)
  13. People, I want to change the event not for one player but for one team in which the player is. So how can I do it? Because if I click this button, this button changes only for one person and not for the whole team
  14. My goal is that when the player clicks on the first button, the function for this button is to change for each player in his team, but unfortunately the function changes only for the person who clicked. --client side local Button1 = guiCreateButton(--There are no valid arguments ) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL1) function OnTeamPlayerClickLVL1() for i, v in pairs(getPlayersInTeam(getPlayerTeam(getLocalPlayer()))) do outputChatBox("U bought level 1 for your TEAM ^^", 0, 255, 0) removeEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL1) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL2) end end function OnTeamPlayerClickLVL2() for i, v in pairs(getPlayersInTeam(getPlayerTeam(getLocalPlayer()))) do outputChatBox("U bought level 2 for your TEAM ^^", 0, 255, 0) removeEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL2) end end -- server side RED = createTeam("Red Team", 255, 0, 0) BLUE = createTeam("Blue Team", 0, 0, 255) Here is my code that works only for ONE person and I want for the current team
  15. I need to send the element to the client, because I want to write some text "dxDrawTextOnElement" on this element, that's why I want to know what I need to do to return the element from the server to the client
  16. Can I send it using trigger client event? e.g. the variable responsible for the vehicle? and if so how can I do it so that I can understand how it works ...
  17. The question is the following needs to get an item from the server side to the client side, how can I do it? (Elements such as markers, vehicles etc.)
  18. I dont use it bcs i know that broken script, but how i can return marker from server side to client side?
  19. -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) -- /\ -- old marker So yes, I added a new script in meta.xml after changing a few things, but also nothing happened, so I decided to copy another marker from another script and paste it where there is this "error", and it turned out that it works and this is the problem do you notice any here?
  20. Okay, I have an idea, I'll create a new script and see if I have the same problem
  21. -- meta.xml <script src="Testing.Lua" type="server"/>
  22. -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if isElementWithinMarker(playerhit, Cylinder1) then outputChatBox("U hit marker", root) end end addEventHandler("onMarkerHit", Cylinder1, TEST) I am surprised because I am sure that everything is fine but when I stick to the "cylinder1" marker, nothing happens, and according to the script it should show me that I hit this marker, but nothing is happening, someone has some idea because it is very strange..
  23. I only know about this, when I try to get an item from the server to the client or vice versa, getElementData () returns false
×
×
  • Create New...