sora+ Posted January 22, 2012 Share Posted January 22, 2012 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 Link to comment
FatalTerror Posted January 22, 2012 Share Posted January 22, 2012 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) Link to comment
bandi94 Posted January 22, 2012 Share Posted January 22, 2012 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) Link to comment
sora+ Posted January 22, 2012 Author Share Posted January 22, 2012 The gui menu works fine , nothing wrong with it. Btw , thanks it works! Link to comment
sora+ Posted January 22, 2012 Author Share Posted January 22, 2012 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) Link to comment
Castillo Posted January 22, 2012 Share Posted January 22, 2012 onPlayerWasted is server side, GUI is client side only. Why don't you just use onClientPlayerWasted? Link to comment
sora+ Posted January 22, 2012 Author Share Posted January 22, 2012 It does the same with clientSide too Link to comment
Castillo Posted January 22, 2012 Share Posted January 22, 2012 addEventHandler("onClientPlayerWasted", getRootElement(), function() if ( source == localPlayer and isPlayerDead ( localPlayer ) ) then guiSetVisible ( menu, true ) showCursor (true) end end) Link to comment
sora+ Posted January 24, 2012 Author Share Posted January 24, 2012 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... Link to comment
Castillo Posted January 24, 2012 Share Posted January 24, 2012 Yes, I forgot a ")" after isPlayerDead, copy the script code again. Link to comment
sora+ Posted January 24, 2012 Author Share Posted January 24, 2012 Got no idea but it still doesn't work , without any errors.. Link to comment
Castillo Posted January 24, 2012 Share Posted January 24, 2012 addEventHandler("onClientPlayerWasted", getRootElement(), function() if ( source == localPlayer ) then guiSetVisible ( menu, true ) showCursor (true) end end) Link to comment
TAPL Posted January 25, 2012 Share Posted January 25, 2012 addEventHandler("onClientPlayerWasted", localPlayer, function() guiSetVisible(menu,true) showCursor(true) end) Link to comment
CapY Posted January 25, 2012 Share Posted January 25, 2012 Sorry for the offtopic, but "sora+", do you use or did used the nickname below ? |S.s|SoRa<3SaRa Link to comment
Evil-Cod3r Posted January 25, 2012 Share Posted January 25, 2012 yes he use it on Playing mta and he have server name sora Link to comment
CapY Posted January 25, 2012 Share Posted January 25, 2012 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 dipshit. Link to comment
sora+ Posted January 25, 2012 Author Share Posted January 25, 2012 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): Link to comment
CapY Posted January 26, 2012 Share Posted January 26, 2012 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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now