-
Posts
667 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Mr.Loki
-
I use this to notify me of potential lag switchers... function packetLossCheck() for i,plr in pairs(getElementsByType'player')do local loss = getNetworkStats(plr)["packetlossLastSecond"] if (loss > 40) then outputDebugString("Packet loss detected from player: "..getPlayerName(plr)..".",3,0,0,255) end end end setTimer(packetLossCheck, 1000, 0) in combination with the example for onClientPlayerNetworkStatus
-
most of the doors in the map editor do what you're asking.
-
server function hideGUIOnPlayerDeath() triggerClientEvent( source, "closePANEL", source ) end addEventHandler( "onPlayerWasted", root, hideGUIOnPlayerDeath ) client function hideGUIOnPlayerDeath() if guiGetVisible( GUIEditor.window[3] ) then guiSetVisible( GUIEditor.window[3], false ) end end addEvent("closePANEL",true) addEventHandler( "closePANEL", root, hideGUIOnPlayerDeath )
-
you have not inserted clans[cName] into the clans table yet
-
What he s saying is that the language in the window does not update until he restarts the window so he's wondering if he should set F2 to create and destroy the window so that the language updates in it
-
MAKE SURE YOUR SERVER ISN'T RUNNING go to the link above and download either 32 or 64 bit... you should know what bit your server is, if you aren't sure just go with 32 then open the tar.gz file with an archiver(7-zip,winrar,etc...) then open the ftp and go to this location: open the tar.gz file you downloaded then open the the multitheftauto_linux-1.5.0 folder. put everything in the folder into the ftp location from before when its done just start the serer
-
it sounds like you have dayz version 0.9.x and those files are cmompiled you need to wait till they release version 1.0.0 then the script will be decompiled so get to learning about scripts while you can
-
i have seen this in a server already and it looked cool but im not sure how they made it, try attaching a dxDrawImage to the player's blip when he is a heli and just rotate it
-
do you have a linux server or is the server on your computer?
-
If you are using the acl for a vip group you need to trigger it from the server side then send the info to client side so the server file you would need to check if the player is in an acl group, I just used a timer for example!: setTimer(function() for i,plr in pairs(getElementsByType"player")do inAcl = x if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "vip" ) ) then inAcl = true else inAcl = false end triggerClientEvent( plr, "aaaaaa", plr, inAcl) end end,5000,0) when the client file is triggered it will be updated function asdf(vip) local C8 = guiCreateLabel(80,25,500,500,"",false,VipWindow) if vip then-- If the player is vip then put this label guiSetFont(C8, "default-bold-small") guiLabelSetColor(C8, 0, 255, 0) guiSetText(C8,"ACTIVE") else-- else if the player isn't vip put this label guiSetFont(C8, "default-bold-small") guiLabelSetColor(C8, 255, 0, 0) guiSetText(C8,"NOT ACTIVE") end end addEvent("aaaaaa",true) addEventHandler( "aaaaaa", root, asdf ) edit: I'm not that good with acl... i barely use it
-
create the label then set the text if the player's vip status is changed function asdf() local C8 = guiCreateLabel(80,25,500,500,"",false,VipWindow) if getElementData(localPlayer, "vip") then-- If the player is vip then put this label guiSetFont(C8, "default-bold-small") guiLabelSetColor(C8, 0, 255, 0) guiSetText(C8,"ACTIVE") else-- else if the player isn't vip put this label guiSetFont(C8, "default-bold-small") guiLabelSetColor(C8, 255, 0, 0) guiSetText(C8,"NOT ACTIVE") end end
-
maybe show some code so we can try to help you?
-
there's a nice resource here with some exports
-
@t3wz it did and @stefutz101 it should be something like this, thanks to t3wz function setInince(thePlayer) if hasObjectPermissionTo(thePlayer, "function.banPlayer") then if getElementData(thePlayer, "INV") then setElementData(thePlayer,"INV", false) outputChatBox("You are no longer Invincible", thePlayer) else setElementData(thePlayer,"INV", true) outputChatBox("You are now Invincible", thePlayer) end else outputChatBox("You do not have permission for this", thePlayer) end end addCommandHandler("inv", setInince) addEventHandler ( "onElementDataChange", root, function ( name ) if getElementData(source, "INV") then if name == "blood" and getElementData ( source, name ) ~= 12000 then setElementData ( source, name, 12000 ) elseif name == "thirst" and getElementData ( source, name ) ~= 100 then setElementData ( source, name, 12000 ) elseif name == "food" and getElementData ( source, name ) ~= 100 then setElementData ( source, name, 100 ) elseif name == "brokenbone" and getElementData ( source, name ) ~= false then setElementData ( source, name, false ) elseif name == "bleeding" and getElementData ( source, name ) ~= 0 then setElementData ( source, name, 0 ) elseif name == "pain" and getElementData ( source, name ) ~= false then setElementData ( source, name, false ) end end end ) everything is server sided
-
it will work it will but also cause a C stack overflow It triggers itself over and over because "setElementData ( source, name, oldValue )" triggers onElementDataChange and an overflow = lag
-
do you mean somthing like this? mrker = createMarker( 2.2910349369049, 10.279877662659, 3.1096496582031 ,"cylinder") dir = .1 setTimer( function() if dir == -.1 then dir = .1 elseif dir == .1 then dir = -.1 end end,1000,0 ) addEventHandler("onClientRender", root, function() local x, y, z = getElementPosition( mrker ) setElementPosition( mrker, x, y, z+dir ) end )
-
onClientKey to get the key, then if it's pressed cancelEvent
-
there was a typo change lcalPlayer to localPlayer
-
this is not from the mine script you are posting about the code is correct source = mine and player = player From what you posted and im guessing is the reason why the script isn't working is because your "setTimer" checks if the player is near the mine only once. In line 12 you need to change 1 to 0 0 = always check if the player is near but... i could be wrong since i dont know what triggers the boomMine
-
Well... what I'd do is: If your admin powers are controlled by element data i'd do client.lua or somewhere in 1 of the server sided part of the script I'd add this code server.lua then go back to the script file you posted and change "bindKey ( "f5", "down", Gizle )" to: client.lua
