Jump to content

The gui show upp for all when a player die


villr

Recommended Posts

Posted

ohh u mean debugline that put out when player die?

I will check if it come any in window about it and if not are coming is it not working or what?

I will try and se in my "private"server

Posted

yea code is coming and i tryed on an "online"server witch people can enter and when a player die that message come "player have died"And no error messages but it show up for all still beacuse i have not edit the script, only now tested it

Posted

We have a working code now BUT when a player die it dont show up again but it dont show upp for all

Here is the code

addEventHandler( "onClientPedWasted", getLocalPlayer( ), 
  function( ) 
    if source == getLocalPlayer( ) then -- Wojak forgot about "then" here 
      local name = getPlayerName(source) 
      outputDebugString("player that died: "..name..", local player: "..getPlayerName(getLocalPlayer())) 
      guiSetVisible (spawnmenugrid, true ) 
      guiSetVisible(spawnmenumemo,true) 
      showCursor ( true ) 
      showPlayerHudComponent("radar",false) 
      showChat(false) 
    end 
  end 
) 
  

What is wrong now? :?::?:

Posted

any messages in debug window?

try to add more debug:

  
if source == getLocalPlayer( ) then -- Wojak forgot about "then" here 
      outputDebugString("ped died") 
      local name = getPlayerName(source) 
      -- rest of code 
  

  • 3 weeks later...
Posted

Right now code is

addEventHandler( "onClientPlayerWasted", getLocalPlayer( ), 
  function( ) 
    if source == getLocalPlayer( ) then -- Wojak forgot about "then" here 
      local name = getPlayerName(source) 
         outputDebugString("ped died") 
      outputDebugString("player that died: "..name..", local player: "..getPlayerName(getLocalPlayer())) 
      guiSetVisible (spawnmenugrid, true ) 
      guiSetVisible(spawnmenumemo,true) 
      showCursor ( true ) 
      showPlayerHudComponent("radar",false) 
      showChat(false) 
    end 
  end 
) 

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...