Jump to content

onPlayerWasted


sora+

Recommended Posts

Posted

I've got no idea why this doesn't work , this is supposed to make a guiwindow popup when a player is wasted/killed..But nothing happens.

  
function visibility() 
        if ( isPlayerDead ( thePlayer ) ) then 
  GUIEditor_Memo[1] = guiCreateMemo(10,39,269,31,"You were killed by:"..killer.."",true,menu) 
  guiSetVisible ( menu, true ) 
  showCursor ( true ) 
end 
        end 
addEventHandler("onPlayerWasted", getRootElement(), visibility) 
  

client-sided

I can map with any gamemode and do basic scripts :P

Posted
  
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( isPlayerDead ( getLocalPlayer() ) ) then 
      GUIEditor_Memo[1] = guiCreateMemo(10,39,269,31,"You were killed by:"..killer.."",true,menu) 
      guiSetVisible ( menu, true ) 
      showCursor ( true ) 
    end 
end) 
  

Paid developer. Twitter: @willia_am -

http://www.williamdasilva.fr
Posted
  
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( isPlayerDead ( getLocalPlayer() ) ) then 
      GUIEditor_Memo[1] = guiCreateMemo(10,39,269,31,"You were killed by:"..killer.."",true,menu) 
      guiSetVisible ( menu, true ) 
      showCursor ( true ) 
    end 
end) 
  

he use bool relative true and he use pixel positions ....

  
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( isPlayerDead ( getLocalPlayer() ) ) then 
      GUIEditor_Memo[1] = guiCreateMemo(0.1,0.39,0.269,0.31,"You were killed by:"..killer.."",true,menu) --- x,y,w,h need to be numbers between 0-1 
      guiSetVisible ( menu, true ) 
      showCursor ( true ) 
    end 
end) 
  

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

The gui menu works fine , nothing wrong with it. Btw , thanks it works!

I can map with any gamemode and do basic scripts :P

Posted

I'm trying to make it appear only for the person who got killed , i mean when someone kills the player they will see this menu too..

Can someone help me out with this?

(server)

  
function visibility() 
      if ( isPedDead ( thisplayer ) ) then 
      guiSetVisible ( menu, thisplayer, true ) 
      showCursor (true) 
end 
addEventHandler("onPlayerWasted", getRootElement(), visibility) 
  

I can map with any gamemode and do basic scripts :P

Posted

onPlayerWasted is server side, GUI is client side only.

Why don't you just use onClientPlayerWasted?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( source == localPlayer and isPlayerDead ( localPlayer ) ) then 
      guiSetVisible ( menu, true ) 
      showCursor (true) 
    end 
end) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( source == localPlayer and isPlayerDead ( localPlayer ) then 
      guiSetVisible ( menu, true ) 
      showCursor (true) 
    end 
end) 

I get an error , something like expected ')' near 'end' , so i tried editing it and it still doesn't seem to work...

I can map with any gamemode and do basic scripts :P

Posted

Yes, I forgot a ")" after isPlayerDead, copy the script code again.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEventHandler("onClientPlayerWasted", getRootElement(), 
function() 
    if ( source == localPlayer ) then 
      guiSetVisible ( menu, true ) 
      showCursor (true) 
    end 
end) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEventHandler("onClientPlayerWasted", localPlayer, 
function() 
      guiSetVisible(menu,true) 
      showCursor(true) 
end) 

CiTLh.png
Posted

yes he use it on Playing mta and he have server name sora

My in-game nick is |['Dev-PoinT_SA']|

addEventHandler ( "onPlayerSpawn", getRootElement(),

function()

if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then

triggerClientEvent("BlaBlaBla",getRootElement())

DxDrawText("Hi Dev-PoinT")

end

end)

Posted
Sorry for the offtopic, but "sora+", do you use or did used the nickname below ?

|S.s|SoRa<3SaRa

That guy uses the nick as me , he's been using it for 5 months as i can remember. I've been playing mta for a whole year now so i'm pretty much original , even though i got so many DM / DD maps.

Don't get confused with me and that 13 year old , thanks ^^

-Edit-

Then i found one dumbf* :

viewtopic.php?f=5&t=39055&p=399058#p399058

#ff1000|S.s|SoRa<3SaRa logged in as 'sora' (IP: 94.96.5.117 Serial: F0441377B8B78A749549A1C84DBAA3B2)

Don't help to this :~.

I'm not even the "hacker" you're thinking of , don't believe me? Checkout my DM maps made for ffs , that hacker can't map.

To be more specific , i made 19 maps yet for DM.

Here are some , incase you don't believe me..

Oblivion:

Passion: https://www.youtube.com/watch?v=_EWFi16mlGE

Electro city: https://www.youtube.com/watch?v=0CxSOCZjZx8

Listen to your heart: https://www.youtube.com/watch?v=Ay2X9Fz4 ... re=related

It's a new generation: https://www.youtube.com/watch?v=O4-02sZE ... re=related

Epicity: https://www.youtube.com/watch?v=F_egVG5y6yc

Train system: https://www.youtube.com/watch?v=wKncL20V ... re=related

Not afraid: https://www.youtube.com/watch?v=fpkuhkG3 ... re=related

Eternal Universe:

Revolutionary Civilization(latestmap):

I can map with any gamemode and do basic scripts :P

Posted
Sorry for the offtopic, but "sora+", do you use or did used the nickname below ?

|S.s|SoRa<3SaRa

That guy uses the nick as me , he's been using it for 5 months as i can remember. I've been playing mta for a whole year now so i'm pretty much original , even though i got so many DM / DD maps.

Don't get confused with me and that 13 year old , thanks ^^

-Edit-

Then i found one dumbf* :

viewtopic.php?f=5&t=39055&p=399058#p399058

#ff1000|S.s|SoRa<3SaRa logged in as 'sora' (IP: 94.96.5.117 Serial: F0441377B8B78A749549A1C84DBAA3B2)

Don't help to this :~.

I'm not even the "hacker" you're thinking of , don't believe me? Checkout my DM maps made for ffs , that hacker can't map.

To be more specific , i made 19 maps yet for DM.

Here are some , incase you don't believe me..

Oblivion:

Passion: https://www.youtube.com/watch?v=_EWFi16mlGE

Electro city: https://www.youtube.com/watch?v=0CxSOCZjZx8

Listen to your heart: https://www.youtube.com/watch?v=Ay2X9Fz4 ... re=related

It's a new generation: https://www.youtube.com/watch?v=O4-02sZE ... re=related

Epicity: https://www.youtube.com/watch?v=F_egVG5y6yc

Train system: https://www.youtube.com/watch?v=wKncL20V ... re=related

Not afraid: https://www.youtube.com/watch?v=fpkuhkG3 ... re=related

Eternal Universe:

Revolutionary Civilization(latestmap):

Nevermind, alteast, i found the hacker ( not you, ofcourse ), that was some Arab, cheers.

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