Search the Community

Showing results for tags 'weapon'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 35 results

  1. function StandardWep() local x, y, z = getElementPosition(getLocalPlayer()) wep = createWeapon("m4", x+5, y, z) setWeaponFlags(wep, "shoot_if_blocked", false) setWeaponFiringRate(wep, 35) setWeaponProperty(wep, "damage", 25) setWeaponClipAmmo(wep, 35) setWeaponAmmo(wep, 100) end addCommandHandler("OnStandardWep", function(command, state) local s = string.upper(state) if s=="ON" then setWeaponState(wepM16, "firing") elseif s=="false" then setWeaponState(wepM16, "ready") else outputChatBox("There is no such condition of the weapon, you can only use 'ON / OFF'", 255, 50, 0) end end ) The point is that it does not hurt other players, what's more, other players do not even see the line of fire (I mean the yellow line which means how fast the bullets are moving and in which direction) and the weapon itself (M4), I know that you need to use triggerClientEvent but no I know how to apply it, please help me with an example ; -;
  2. 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?
  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. How to get the weapon position we are currently holding?
  5. 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?
  6. 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
  7. Okay, so I would like to give M4 to each person from the "Red" team, and to every player from the "Blue" team I would like to give Ak47, How can I do it? -- server side red = createTeam("Red team", 255, 0, 0) blue = createTeam("Blue team", 0, 255, 0) giveWeapon("red team????", 31, 9999) giveWeapon("blue team????", 30, 9999) Something like this is on my mind but I do not know what to put in the "string" red team and blue team...
  9. I've made a server-type .Lua that should apply several 'setWeaponProperties' to the weapons. It works for some weapons, but not for others. For example, I've set the Deagle (replaced with a 6 bullet drum) to 'maxiumum_clip_ammo' = 6. This works correctly. However, with other weapons, it doesn't. Here's the script: function weaponProps () -- M9 -- setWeaponProperty(22, "pro", "maximum_clip_ammo", 14) -- Revolver -- setWeaponProperty(24, "pro", "maximum_clip_ammo", 6) -- Shotgun -- setWeaponProperty(25, "pro", "maximum_clip_ammo", 7) -- Uzi -- setWeaponProperty(28, "pro", "maximum_clip_ammo", 30) -- AKMS -- setWeaponProperty(30, "pro", "maximum_clip_ammo", 35) -- G36 -- setWeaponProperty(31, "pro", "maximum_clip_ammo", 40) -- Kar -- setWeaponProperty(33, "pro", "maximum_clip_ammo", 5) -- Mosin -- setWeaponProperty(34, "pro", "maximum_clip_ammo", 1) end addEventHandler ("onResourceStart", getRootElement(), weaponProps) Essentially, it runs as soon as the resource is started. As a beginner's test, I'm only modifying the max ammo clip. It works for: - Deagle (Revolver) - Shotgun - AK-47 (AKMS) - M4 (G36) - Rifle (Kar) - Sniper (Mosin) It doesn't work for: - Colt (M9) - UZI
  10. I've been messing around with 'setWeaponProperty' in order to understand how it works. I changed how the deagle is handled. Decided to undo the changes and, upon resetting everything, the weapon bugged. Image Any script with 'setWeaponProperty' has been removed, and the resource has been stopped and removed from metaserver.conf. Fixed after several restarts and total wipe of downloaded resources.
  11. Estou tentando fazer um script de recuo que funcione de forma mais realista mexendo o eixo Z também, porém da forma que tentei fazer não funcionou, se alguém puder me dar uma ajuda fico grato. local weap = {shot=false,timer=false} addEventHandler("onClientPlayerWeaponFire", localPlayer, function() local rot = getPedCameraRotation(localPlayer) if (isTimer(weap.timer)) then killTimer(weap.timer); end if (not weap.shot) then setCameraMatrix (x, y-0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = true weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot+0.28)) else setCameraMatrix (x, y+0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = false weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot-0.28)) end end)
  12. Preciso que quando o player pegue determinada arma na mão o dx fica visible e quando ele coloca outra arma diferente daquela em sua mão o dx fica invisível, como posso fazer isso ? Se puderem me informar como consigo colocar apenas 2 linhas de escrito no canto direito da tela em qualquer resolução me ajudaria demais, desde já agradeço! PS: Nunca fiz um DX.
  13. Sorry by my english. I need to get a value with the whole number of weapons the player has. (Whole Number from player's weapon). I'm trying to do this, but with no sucess: function getPedWeapons(ped) local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=2,9 do local wep = getPedWeapon(ped,i) if wep and wep ~= 0 then table.insert(playerWeapons,wep) end end else return false end return playerWeapons end function SaberArmas (player) outputChatBox("Armas (Caso tenha armas elas serão listadas abaixo!)",player,255,0,0) for i,wep in ipairs(getPedWeapons(player)) do outputChatBox("Você tem: " .. getWeaponNameFromID(wep),player,0,255,0) end end addEventHandler("onMarkerHit", MarkerInfo, SaberArmas) The script is making a list not a Whole Number. Someone can help me ?
  14. Gente eu to criando um script e sou novato com programação em Lua queria saber se existe algum codigo, algum jeito de mudar o estilo de segurar da arma no caso o estilo de mira. Um exemplo seria fazer o jogador segurar a colt 45 como se fosse a desert eagle. Nessa foto ai o policial segura uma COLT como se fosse uma DESERT eu queria algo assim pros players
  15. Ola gente, então eu to tentando criar um script e me deparei com um problema pra resolver eu iria precisar fazer com que uma certa arma n atirasse ou conseguisse ficar com ela na mão munição. Alguem sabe me dizer se isso é possivel?
  16. Bom, to tentando mudar o dano das armas, só que quando o player fica com 34% de vida, a arma(MP5) não tira mais dano, o mesmo acontece com a M4, AK, DESERT, SNIPER (mas com vida diferente de 34%) To sentindo que ta faltando alguma coisa, mas não sei o que. setWeaponProperty ( 24, "pro", "damage", 150 ) -- DESERT setWeaponProperty ( 29, "pro", "damage", 200 ) -- MP5 setWeaponProperty ( 30, "pro", "damage", 230 ) -- AK47 setWeaponProperty ( 31, "pro", "damage", 230 ) -- M4 setWeaponProperty ( 31, "pro", "maximum_clip_ammo", 30) setWeaponProperty ( 34, "pro", "damage", 240 ) -- Sniper Qualquer ajuda é bem vinda!
  17. Here is the "nemesis" script: function boss ( ) Nemesis = exports [ "slothBot" ]:spawnBot ( -1935.5480957031, 665.44055175781, 47.0, 90, 312, 0, 0, Nemesis, 0, "chasing", true ) exports.extra_health:setElementExtraHealth ( Nemesis, 2500 ) outputChatBox ("Nemesis!!!") myBlip = (createBlipAttachedTo ( Nemesis, 23 )) setElementData ( Nemesis, "nemesis", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss ) In which line and what should I add to make the slothbot (nemesis) have any weapon? Please help :|
  18. To com uma duvida, eu tenho uma colt45.ifp, mas quando vou tentar colocar no servidor, ele fica bugado O que eu posso fazer nessa situação? Alguma alternativa? PS: Eu tbm estou com um ped.ifp, tem algum problema? script abaixo: local animTable = { ifp = {}, anims = { "abseil", "ARRESTgun", "ATM", "BIKE_elbowL", "BIKE_elbowR", "BIKE_fallR", "BIKE_fall_off", "BIKE_pickupL", "BIKE_pickupR", "BIKE_pullupL", "BIKE_pullupR", "bomber", "CAR_alignHI_LHS", "CAR_alignHI_RHS", "CAR_align_LHS", "CAR_align_RHS", "CAR_closedoorL_LHS", "CAR_closedoorL_RHS", "CAR_closedoor_LHS", "CAR_closedoor_RHS", "CAR_close_LHS", "CAR_close_RHS", "CAR_crawloutRHS", "CAR_dead_LHS", "CAR_dead_RHS", "CAR_doorlocked_LHS", "CAR_doorlocked_RHS", "CAR_fallout_LHS", "CAR_fallout_RHS", "CAR_getinL_LHS", "CAR_getinL_RHS", "CAR_getin_LHS", "CAR_getin_RHS", "CAR_getoutL_LHS", "CAR_getoutL_RHS", "CAR_getout_LHS", "CAR_getout_RHS", "car_hookertalk", "CAR_jackedLHS", "CAR_jackedRHS", "CAR_jumpin_LHS", "CAR_LB", "CAR_LB_pro", "CAR_LB_weak", "CAR_LjackedLHS", "CAR_LjackedRHS", "CAR_Lshuffle_RHS", "CAR_Lsit", "CAR_open_LHS", "CAR_open_RHS", "CAR_pulloutL_LHS", "CAR_pulloutL_RHS", "CAR_pullout_LHS", "CAR_pullout_RHS", "CAR_Qjacked", "CAR_rolldoor", "CAR_rolldoorLO", "CAR_rollout_LHS", "CAR_rollout_RHS", "CAR_shuffle_RHS", "CAR_sit", "CAR_sitp", "CAR_sitpLO", "CAR_sit_pro", "CAR_sit_weak", "CAR_tune_radio", "CLIMB_idle", "CLIMB_jump", "CLIMB_jump2fall", "CLIMB_jump_B", "CLIMB_Pull", "CLIMB_Stand", "CLIMB_Stand_finish", "cower", "Crouch_Roll_L", "Crouch_Roll_R", "DAM_armL_frmBK", "DAM_armL_frmFT", "DAM_armL_frmLT", "DAM_armR_frmBK", "DAM_armR_frmFT", "DAM_armR_frmRT", "DAM_LegL_frmBK", "DAM_LegL_frmFT", "DAM_LegL_frmLT", "DAM_LegR_frmBK", "DAM_LegR_frmFT", "DAM_LegR_frmRT", "DAM_stomach_frmBK", "DAM_stomach_frmFT", "DAM_stomach_frmLT", "DAM_stomach_frmRT", "DOOR_LHinge_O", "DOOR_RHinge_O", "DrivebyL_L", "DrivebyL_R", "Driveby_L", "Driveby_R", "DRIVE_BOAT", "DRIVE_BOAT_back", "DRIVE_BOAT_L", "DRIVE_BOAT_R", "Drive_L", "Drive_LO_l", "Drive_LO_R", "Drive_L_pro", "Drive_L_pro_slow", "Drive_L_slow", "Drive_L_weak", "Drive_L_weak_slow", "Drive_R", "Drive_R_pro", "Drive_R_pro_slow", "Drive_R_slow", "Drive_R_weak", "Drive_R_weak_slow", "Drive_truck", "DRIVE_truck_back", "DRIVE_truck_L", "DRIVE_truck_R", "Drown", "DUCK_cower", "endchat_01", "endchat_02", "endchat_03", "EV_dive", "EV_step", "facanger", "facgum", "facsurp", "facsurpm", "factalk", "facurios", "FALL_back", "FALL_collapse", "FALL_fall", "FALL_front", "FALL_glide", "FALL_land", "FALL_skyDive", "Fight2Idle", "FightA_1", "FightA_2", "FightA_3", "FightA_block", "FightA_G", "FightA_M", "FIGHTIDLE", "FightShB", "FightShF", "FightSh_BWD", "FightSh_FWD", "FightSh_Left", "FightSh_Right", "flee_lkaround_01", "FLOOR_hit", "FLOOR_hit_f", ":Ou", "gang_gunstand", "gas_cwr", "getup", "getup_front", "gum_eat", "GunCrouchBwd", "GunCrouchFwd", "GunMove_BWD", "GunMove_FWD", "GunMove_L", "GunMove_R", "Gun_2_IDLE", "GUN_BUTT", "GUN_BUTT_crouch", "Gun_stand", "handscower", "handsup", "HitA_1", "HitA_2", "HitA_3", "HIT_back", "HIT_behind", "HIT_front", "HIT_GUN_BUTT", "HIT_L", "HIT_R", "HIT_walk", "HIT_wall", "Idlestance_fat", "idlestance_old", "IDLE_armed", "IDLE_chat", "IDLE_csaw", "Idle_Gang1", "IDLE_HBHB", "IDLE_ROCKET", "IDLE_stance", "IDLE_taxi", "IDLE_tired", "Jetpack_Idle", "JOG_femaleA", "JOG_maleA", "JUMP_glide", "JUMP_land", "JUMP_launch", "JUMP_launch_R", "KART_drive", "KART_L", "KART_LB", "KART_R", "KD_left", "KD_right", "KO_shot_face", "KO_shot_front", "KO_shot_stom", "KO_skid_back", "KO_skid_front", "KO_spin_L", "KO_spin_R", "pass_Smoke_in_car", "phone_in", "phone_out", "phone_talk", "Player_Sneak", "Player_Sneak_walkstart", "roadcross", "roadcross_female", "roadcross_gang", "roadcross_old", "run_1armed", "run_armed", "run_civi", "run_csaw", "run_fat", "run_fatold", "run_gang1", "run_left", "run_old", "run_player", "run_right", "run_rocket", "Run_stop", "Run_stopR", "Run_Wuzi", "SEAT_down", "SEAT_idle", "SEAT_up", "SHOT_leftP", "SHOT_partial", "SHOT_partial_B", "SHOT_rightP", "Shove_Partial", "Smoke_in_car", "sprint_civi", "sprint_panic", "Sprint_Wuzi", "swat_run", "Swim_Tread", "Tap_hand", "Tap_handP", "turn_180", "Turn_L", "Turn_R", "WALK_armed", "WALK_civi", "WALK_csaw", "Walk_DoorPartial", "WALK_drunk", "WALK_fat", "WALK_fatold", "WALK_gang1", "WALK_gang2", "WALK_old", "WALK_player", "WALK_rocket", "WALK_shuffle", "WALK_start", "WALK_start_armed", "WALK_start_csaw", "WALK_start_rocket", "Walk_Wuzi", "WEAPON_crouch", "woman_idlestance", "woman_run", "WOMAN_runbusy", "WOMAN_runfatold", "woman_runpanic", "WOMAN_runsexy", "WOMAN_walkbusy", "WOMAN_walkfatold", "WOMAN_walknorm", "WOMAN_walkold", "WOMAN_walkpro", "WOMAN_walksexy", "WOMAN_walkshop", "XPRESSscratch" } } addEventHandler("onClientResourceStart", resourceRoot, function() animTable.ifp["block"] = "ped" animTable.ifp["ifp"] = engineLoadIFP("ped.ifp", animTable.ifp["block"]) for _, v in ipairs(animTable.anims) do engineReplaceAnimation(localPlayer, "ped", v, animTable.ifp["block"], v) end end ) local customBlockName = "Colt455" colt45Animations = { "2guns_crouchfire", "colt45_crouchfire", "colt45_crouchreload", "colt45_fire", "colt45_fire_2hands", "colt45_reload", "sawnoff_reload" } local IFP = engineLoadIFP( "colt45.ifp", customBlockName ) if IFP then for i,v in pairs(colt45Animations) do engineReplaceAnimation( localPlayer, "colt45", v, customBlockName, v ) end else print('Failed to load - ','colt45.ipf') end
  19. MTA • Звездный Десант. Вас на нашем проекте будут ждать: а) арахниды - основной боевой материал пауков; б) летающие пауки - арахниды с возможностью полета и истребления летательной техники в) альфа жуки - арахниды которые в разы сильнее обычных жуков г) жуки плазмоиды - система пво жуков. д) танкер - жук который поливает все живое огнем. и многие другие виды. - Огромный звездолет - Крейсер Роджер Янг - Уникальная погода - Уникальное оружие - Уникальное и не повторяющееся сопоставление нескольких планет: а) марс б) нептун Работа над проектом идет полным ходом! Вы уже можете посетить наш сервер. ◘ Хороший паук - мертвый паук Открытие сервера состоялось 1.03.2019года. Уже сейчас все перечисленное выше. Например, - система бронирования своя (на данный момент состоит из 12 сборных частей брони). В настоящее время идет работа над дополнительными видами, которые позволят сделать около 30 различных видов каждой детали бронекостюмы, что позволит максимально кастомизировать вашего персонажа) - Квестовая система, где Игровые НПС помогут вам освоить наш проект. Наша группа в ВК: Ип адрес проекта: П.с. как говорится убивай всех у кого больше двух ног! Не давай им пощады! Вы же хотите чтобы Вас помнили ?!)
  20. Help! How to disable weapon muzzle (fire) from replaced weapons? I even replaced the textures of the new weapon models in the txd workshop, but this did not help. I will be grateful
  21. I want create custom weapons, anyone teach me to create custom weapons please
  22. Hello! i triyin create a new script but u have some problems... the purpose of the script is get maximun stats of all weapons a every players in the spawn. I look the wiki but dont it doesnt help... Thanks
  23. Hello.... i need help. i starting scripting and i need support whit this script. function giveWeaponsOnPlayerSpawn (TheSpawnpoint, theTeam) giveWeapon (source, 26, 20) -- sawed-off and 20 ammo end addEventHandler ("onPlayerSpawn", getRootElement (), giveWeaponsOnSpawn) META: <meta> <script src="script.lua" type="server"/> <meta> ¿wich is the problem here? thanks
  24. Hello community! I'm developing a "different textures in the same gun" project, but I need to replace the original model with a transparent DFF and TXD, but I do not have it. Could any of you pass me the transparent DFF and TXD so I can replace it with the weapons model?
  25. Hi guys! How can i create skins for a weapon? For example a default M4 and a Gold M4.