Jump to content

Xwad

Members
  • Posts

    1,090
  • Joined

  • Last visited

Everything posted by Xwad

  1. no it does not work:/
  2. what??xdSo need i write in lua this? local weaponsToDamageRhino = { [35] = true, -- basis RPG [36] = true, -- Heatseaking RPG -- You can add different weapons too apart from RPG, if not then a table isn't necessarily needed. -- The [number] is the weapon ID, true means it's valid, every other number returns false. } function handleRhinoDamage(attacker, weapon, loss, x, y, z, tyre) if (weapon and getElementModel(source) == 432 and loss > 0) then -- if the weapon exists and the vehicle being shot is a Rhino and -- the damage dealt isn't 0 but any number higher then do the following. if (weaponsToDamageRhino[weapon]) then -- if the weapon is one of the valid ID's above (35 'true' and 36 'true') then do the following. setElementHealth(source, getElementHealth(source) - loss) -- set the health (life points) of the Rhino (source is the vehicle being shot) -- too the current health minus the loss. end end end addEventHandler("onClientVehicleDamage", root, handleRhinoDamage)
  3. this? -- Only let these weapons damage a Rhino local weaponsToDamageRhino = { [38] = true, -- minigun [33] = true, -- country rifle [34] = true, -- sniper rifle [30] = true, -- AK-47 [31] = true, -- M4 } function handleRhinoDamage(attacker, weapon, loss, x, y, z, tyre) if (weapon and getElementModel(source) == 432 and loss > 0) then if (weaponsToDamageRhino[weapon]) then setElementHealth(source, getElementHealth(source) - loss) end end end addEventHandler("onClientVehicleDamage", root, handleRhinoDamage)
  4. oh ok but i have a disable teamkill script so i dont need this script anymore but thanks your help!
  5. where must i write the [/lua] and the [lua]?
  6. function showTeamFunction ( command, teamName ) -- Find and show all the players in the team that was specified with the console command local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) -- Loop through the player table for playerKey, playerValue in ipairs ( players ) do outputChatBox ( getPlayerName(playerValue) ) end end end ??
  7. what? what should i do now?? it does now work
  8. is it so goos? function takeCash ( thePlayer, command, 1349 ) -- when the takecash command is called takePlayerMoney ( thePlayer ) -- take the amount of money from the player end addCommandHandler ( "takecash", takeCash )
  9. is it so good? -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, addEventHandler("onResourceStart", resourceRoot, function () for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end)
  10. but where must i place this folder? in the rescources or in gameplay?
  11. does not work i start the script in the admin panel but it does not work
  12. it does not work:( i have did this Meta.xml teamkill.lua function takeCash ( thePlayer, command, amount ) -- when the takecash command is called takePlayerMoney ( thePlayer, tonumber(1350) ) -- take the amount of money from the player end addCommandHandler ( "takecash", takeCash )
  13. It dosent work:((( i tested it with my friend and he can kill me when we are in one team! Have i do something wrong? META.XML teamkill.lua -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end
  14. so need i create a meta and a lua file and write this in the lua?
  15. Hi is there any script or rescource that makes possible to kill rhino with rpg? Becaouse i cant kill the rhino with RPG
  16. Thanks i tryed to do that but it does now work:( i do something wrong. Can you make possibly that script for me?
  17. oh ok but unfortunately i cant do that script i need help:(
  18. What is math.cos, math.sin?
  19. how to make more range shoot?
×
×
  • Create New...