PhantomDamn Posted July 15, 2013 Share Posted July 15, 2013 este gamemode esta bueno pero hay una falla que cuando disparan en la pierna o te hieren el jugador queda cojo y debe reconectar para que se desbuguee.. esto esta en el script pblips.lua pero no se que lineas eliminar o modificar... tengo como 4 meses sin practicar lua y ahora estoy hecho %$# una ayuda --THIS PART MAKES NOISE WHEN A PLAYER GETS HURT bodyPartAnim = { [7] = { "DAM_LegL_frmBK", 42 }, [8] = { "DAM_LegR_frmBK", 52 }, } function damagenoise ( attacker, weapon, bodypart, loss ) soundlevel = soundlevel+2 restartdamagedetect = setTimer ( readddamage, 1000, 1 ) --Only continue if our bodypart is one of the legs if ( bodypart ~= 7 ) and ( bodypart ~= 8 ) then return end local isplayerlimping = getElementData ( getLocalPlayer (), "legdamage" ) if isplayerlimping ~= 1 then if (attacker) then local attackerteam = getPlayerTeam (attacker) local yourteam = getPlayerTeam (getLocalPlayer ()) if attackerteam == yourteam then if getTeamFriendlyFire ( yourteam ) == false then --do nothing return end end if not getElementData ( source, "armor" ) then --outputChatBox("You've been hit in the leg.", 255, 69, 0) setPedAnimation ( getLocalPlayer(), "ped", bodyPartAnim[bodypart][1], true, true, false ) setTimer ( setPedAnimation, 600, 1, getLocalPlayer() ) setElementData ( getLocalPlayer (), "legdamage", 1 ) --Blood stuff local function blood() local boneX,boneY,boneZ = getPedBonePosition(getLocalPlayer(), bodyPartAnim[bodypart][2]) local rot = math.rad(getPedRotation ( getLocalPlayer() )) fxAddBlood ( boneX,boneY,boneZ, -math.sin(rot), math.cos(rot), -0.1, 500, 1.0 ) end blood() setTimer(blood,50,50) -- local makeplayerlimp = setTimer ( limpeffect, 1000, 1, source, key, state ) end end end end function readddamage () -- addEventHandler ( "onClientPedDamage", getLocalPlayer (), damagenoise ) end Link to comment
Recommended Posts