Reinhard

Members
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Reinhard

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. just remove <anim name =" animation" /> line. if u want to remove a certain animation.
  2. function weapondamage() setWeaponProperty("minigun", "pro", "damage", 2) end try this... it's not a hard thing to do. anyways this topic should be moved to: https://forum.mtasa.com/forum/71-scripting/ please post at that link ^ next time, not here.
  3. if you're talking about a ped's animation. setPedAnimation ( theElement, false )
  4. function command() for i,v in ipairs(getElementsByType("ped")) do setPedAnimation( v, "", "") end end addCommandHandler("action", command) if u want all peds to do an anim u could do smth like this. *this is just an example*
  5. i tried some ways but failed. how to restrict this event handler to a certain team i don't want anyone who can use it so i guess that the "root" is causing it. i tried to change it but failed, and tried to use return end but failed. any help? i want only "Civillian" team can trigger this event. addEventHandler("onPlayerDamage",root, function(attacker, weapon) if weapon == 6 then setElementHealth(source, getElementHealth(source) - 50 ) end end)
  6. it'll only trigger when player spawns.
  7. you need an event to trigger that function. EX: when player spawns it will check if player is in team Militar function tag(thePlayer) local team = getPlayerTeam( thePlayer ) conta = getAccountName(getPlayerAccount(source)) if ( getTeamName( team ) == "**Militar**" ) then aclGroupAddObject (aclGetGroup("Militar"), "user."..conta) end end addEventHandler("onPlayerSpawn", getRootElement(), tag)
  8. Reinhard

    why

    why am i getting destroyElement expected element at argument 1 warning???? it's pretty annoying. when i spawn as different teams over and over again... function scheck() if source and getElementType ( source ) == 'player' then local team = getPlayerTeam(source) local teamname = getTeamFromName("Survivors") if getTeamName(team) == "Survivors" then setTimer(function() blips[vehicles] = createBlipAttachedTo(vehicle, 51, nil,nil,nil,nil,nil,nil,nil,nil) end , 1000, 1) end if not blips[vehicles] then return end destroyElement(blips[vehicles]) end end addEventHandler("onPlayerSpawn", getRootElement(), scheck)
  9. Reinhard

    why

    found solution on this one.
  10. Reinhard

    why

    it works at the first time but the second time it doesnt... expected element at argument 10: got table, at line 3 e.e createBlipAttachedTo the problem is in the getPlayersInTeam it's arg 10. i tried this and it doesn't give the error anymore and it works.. but when there are many players in the server will it still work?? if getTeamName(team) == "Survivors" then blips[vehicles] = createBlipAttachedTo(vehicle, 51, nil,nil,nil,nil,nil,nil,nil,getPlayersInTeam("Survivors")) return end when i keep respawning over and over again with different teams it still shows the blip....
  11. Reinhard

    why

    When im alone in the server it works. but when there are many players it doesn't why does it still show the blip to the people not in the "Survivors" team? help please! function scheck() local team = getPlayerTeam(source) if getTeamName(team) == "Survivors" then blips[vehicles] = createBlipAttachedTo(vehicle, 51) return end destroyElement(blips[vehicles]) end addEventHandler("onPlayerSpawn", getRootElement(), scheck) function createVehicles ( ) loc = math.random ( #vehicles ) vehicle = createVehicle ( 609, vehicles[loc][1], vehicles[loc][2], vehicles[loc][3], 0, 0, 0) addEventHandler ( "onVehicleEnter", vehicle, start ) addEventHandler ( "onVehicleExit", vehicle, removedata2 ) addEventHandler ( "onVehicleExplode", vehicle, fail ) local theTeam = getTeamFromName("Survivors") if not theTeam then return end for k,v in ipairs(getPlayersInTeam(theTeam)) do blips[vehicles] = createBlipAttachedTo(vehicle, 51) outputChatBox("[Weapon Delivery] Weapon delivery truck available!", v, 100, 0, 0, true) end end
  12. Works now! thanks for the help y'all!