Turbesz Posted August 18, 2016 Posted August 18, 2016 (edited) sorry for my bad english.. this script take money from all players instead of one player, but why? --client addEvent( "hp", true ) addEventHandler( "hp", root, function (thePlayer) setElementHealth (thePlayer, 200) end ) addEvent( "pa", true ) addEventHandler( "pa", root, function (thePlayer) setPedArmor( thePlayer, 100 ) end ) function takeCash ( ) -- when the takecash command is called takePlayerMoney ( source, 7000 ) -- take the amount of money from the player end addEvent( "penzhp", true ) addEventHandler( "penzhp", root, takeCash ) function drift (thePlayer) setElementPosition ( thePlayer, -1910, 832, 36 ) outputChatBox ('#1E90FF[ #FFFFFFKajálda#1E90FF ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #C0C0C0 Elteleportált #FF0000! #1E90FF/kajalda', root, 255, 255, 255, true) end addCommandHandler ( "kajalda", drift ) --server local marker = createMarker(-1912.09, 828.07, 34.20,"cylinder",1.2,235,0,0,235) local GUIEditor = { button = {}, window = {}, staticimage = {} } GUIEditor.window[1] = guiCreateWindow(537, 334, 383, 229, "FullFunPlay ~ Egyedi kajálda /by Turbesz/", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF4EFE00") GUIEditor.staticimage[1] = guiCreateStaticImage(18, 21, 174, 142, "hamburger.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(209, 31, 164, 121, "sor.png", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(25, 153, 157, 32, "Hambi ~ 200 HP ~ 7000Ft", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(209, 153, 157, 32, "Sör ~ 100 Pajzs ~ 8000Ft", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(89, 193, 203, 26, "BEZÁRÁS BEZÁRÁS BEZÁRÁS ", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") guiSetVisible (GUIEditor.window[1], false) addEventHandler("onClientMarkerHit", marker, function (p) if p == localPlayer then count = 10 --addEventHandler("onClientPreRender", getRootElement(), draw); guiSetVisible(GUIEditor.window[1], true) --guiSetVisible(GUIEditor.memo[1], true) showCursor(true) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[3] then guiSetVisible(GUIEditor.window[1],false) showCursor ( false ) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then triggerServerEvent ("penzhp", root, getLocalPlayer()) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then triggerServerEvent ("penzap", root, getLocalPlayer()) end end ) function health() triggerServerEvent ("hp", root, getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], health, false ) function armor() triggerServerEvent ("pa", root, getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], armor, false ) Edited August 18, 2016 by Guest What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Turbesz Posted August 18, 2016 Author Posted August 18, 2016 triggerServerEvent ("penzhp", getLocalPlayer()) Thanks! What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
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