Jump to content

Problem with freezing player


Michcio

Recommended Posts

I have problem with freezing player.

function wypadek (loss) 
    local gracz = getVehicleOccupant(source) 
    if(gracz) then 
        if loss >= 100 then 
            if countPlayersInTeam(getTeamFromName("Pogotowie")) == 0 then 
            outputChatBox("***| Masz wypadek! Aktualnie nie ma lekarzy na serwerze! Za 20 sekund sam się ockniesz! |***", gracz, 255,255,255,true) 
            setElementFrozen(gracz,true) 
            setTimer(unfreeze,20000,1,gracz,false) 
            else 
            outputChatBox("***| Masz wypadek! Zaraz przyjedzie pogotowie! |***", gracz, 255,255,255,true) 
            setElementFrozen(gracz,true) 
            end 
        end 
    end 
end 
  
addEventHandler("onVehicleDamage", getRootElement(), wypadek) 
  
function unfreeze (co,jak) 
setElementFrozen ( co,jak ) 
end 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...