Jump to content

Xwad

Members
  • Posts

    1,090
  • Joined

  • Last visited

Everything posted by Xwad

  1. you mean in spawn script??
  2. this is the part where the Heavy class is. (Spawn_locations.map) "Heavy" friendlyfire="false" > "Heavy's have more hp and more weapon demage."/> "0" green="0" blue="205" /> "SS-soldier" id="11" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier2" id="12" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier3" id="13" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier4" id="14" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier5" id="15" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier6" id="16" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier7" id="17" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier8" id="18" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier9" id="19" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "SS-soldier10" id="20" > "-2368.8291015625" y="-2185.1970214844" z="33.529106140137" rot="91.98" /> "46" ammo="1" /> "16" ammo="2" /> "23" ammo="24" /> "31" ammo="200" /> "36" ammo="4" /> "-2098.5178222656" y="-2079.3725585938" z="71.461433410645" /> "-2313.4711914063" y="-2294.9970703125" z="50.461433410645" />
  3. i tryed this but this is also not working!! why the fuck is the script bugging!!?? addEventHandler("onPlayerSpawn", root, function() if getElementData(source, "Class") == "Heavy" then setPedArmor(source, 100) end end) addEventHandler("onPlayerSpawn", root, function() if getElementData(source, "Class") == "Medic" then setPedArmor(source, 0) end end) addEventHandler("onPlayerSpawn", root, function() if getElementData(source, "Class") == "Engineer" then setPedArmor(source, 0) end end) addEventHandler("onPlayerSpawn", root, function() if getElementData(source, "Class") == "Sniper" then setPedArmor(source, 0) end end)
  4. i already edited this spawn script!!!
  5. i know this medic script is right i just wrote it becaouse its similar then the heavy armor script. And the amror script is not working becaouse sometime other classes get the armor too.
  6. I have a similar script that makes possible if i choose medic class then i can heal myself with pressing H function heal () local theHealth = getElementHealth (localPlayer) if getElementData(localPlayer,"Class") == "Medic" then if ( theHealth < 100 ) then setElementHealth ( localPlayer, getElementHealth(localPlayer) + 50 ) unbindKey("h","down",heal) setTimer (bindTheKeys , 7000, 1 ) end end end function bindTheKeys () bindKey ( "h", "down", heal ) end bindTheKeys()
  7. i use this spawn script https://community.multitheftauto.com/?p= ... ls&id=1152
  8. TAPL i tryed your script but its the same it gives the armor sometime to other calsses
  9. Sry I forgot to write the code ( i wrote it to my last post)
  10. only this is working but it gives the armor higgledy-piggledy sometimes it gives the armor for other classes.. And no debugscript. addEventHandler('onPlayerSpawn',root, function () if getElementData( source, 'Class' ) == 'Heavy' then setPedArmor( source,100 ) end end )
  11. Xwad

    ammo

    is it server sided ?becaouse its not working i got 200 ammo:/ But it dosent metter im not patient anymore.. thanks for helping:) maxAmmo = { ["m4"] = 200, ["mp5"] = 128, ["grenade"] = 5, ["colt45"] = 30, ["silenced"] = 24, ["deagle"] = 24, ["shotgun"] = 30, ["uzi"] = 120, ["ak47"] = 200, ["rifle"] = 30, ["sniper"] = 30, ["rocketlaucher"] = 4, ["heatseeker"] = 4, ["moltov"] = 5 } -- And use like this: if ammo >= maxAmmo[wep] then setWeaponAmmo(player, wep, maxAmmo[wep]) end -- server sided.
  12. Xwad

    Trip mine script

    but i dont understand becaouse th setelemnt must working
  13. Xwad

    Trip mine script

    maybe its becaouse my spawn script?
  14. not works:( I thing the problem is becaouse my spawn script.
  15. Xwad

    ammo

    or wait!! What functions need i use to make a script that makes possible to set the max ammo that a player can carry for the weapons??
  16. Xwad

    ammo

    its working but the problem is that i get 200 ammo for coket laucher becaous eits local weapon and i will get for all weapon 200 ammo if i enter How can i fix that?
  17. Xwad

    Trip mine script

    the problem is that is not demaging
  18. no i just want to try it out. But how could players try it out when its not working?!
  19. Then how could players play on it??! And if I try MTA 1.0? There must be a way to fix that
  20. There are no gamemodes like this:(((( I must try it out:(( maybe if I rin it in mta 1.3 will it work.
  21. It was since 2008 . I wrote a comment but he didnt answer.
  22. Xwad

    Trip mine script

    my god not working!! function Object ( name ) setElementCollisionsEnabled(createObject ( 1211, -1467.2827, -1287.6701, 99.1, 0, 0, 0 ), false) -- this creates an object colShape = createColSphere ( -1746, -1743, 28, 3) end addEventHandler ( "onResourceStart", resourceRoot, Object ) function Mine(thePlayer, matchingDimension) if getElementType ( thePlayer ) == "player" then if source == colShape then local pX, pY, pZ = getElementPosition ( thePlayer ) -- get the player's position createExplosion ( pX, pY, pZ, 6, thePlayer ) -- and create an explosion there local theHealth = getElementHealth(thePlayer); if ( theHealth < 100 ) then setElementHealth(thePlayer, theHealth - 70); outputChatBox("You stepped on a Mine!",thePlayer,255,109 ,109 ) -- outputs a chatbox end end end end addEventHandler("onColShapeHit",root,Mine)
  23. Xwad

    Trip mine script

    yes its becaouse my spawn script!! So i used SetElementHealth for the script but dosent work function Object ( name ) setElementCollisionsEnabled(createObject ( 1211, -1467.2827, -1287.6701, 99.1, 0, 0, 0 ), false) -- this creates an object colShape = createColSphere ( -1746, -1743, 28, 2) end addEventHandler ( "onResourceStart", resourceRoot, Object ) function Mine(thePlayer, matchingDimension) if getElementType ( thePlayer ) == "player" then if source == colShape then local pX, pY, pZ = getElementPosition ( thePlayer ) -- get the player's position createExplosion ( pX, pY, pZ, 6, thePlayer ) -- and create an explosion there if ( theHealth < 100 ) then setElementHealth ( source, theHealth - 70) outputChatBox("You stepped on a Mine!",thePlayer,255,109 ,109 ) -- outputs a chatbox end end end end addEventHandler("onColShapeHit",root,Mine)
  24. Xwad

    Trip mine script

    wait its not demaging i think its becaouse my spawn script!
×
×
  • Create New...