-
Posts
1,390 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Et-win
-
Resource 'ac-police' is not running. First download this resouce and start it before using this one.
-
You are welcome. For the interested people: It seems to be a bug in Admin Panel. http://bugs.mtasa.com/view.php?id=8446
-
Nothing starts the function. :3
-
Server-Side: function muteHandler() local mutedPlayers = {} for placeNumber, playerData in ipairs(getElementsByType("player")) do if (isPlayerMuted(playerData) == true) then table.insert(mutedPlayers, playerData) end end triggerClientEvent("onServerSendMutedPlayers", getRootElement(), mutedPlayers) end addEventHandler("onPlayerMute", getRootElement(), muteHandler) addEventHandler("onPlayerUnmute", getRootElement(), muteHandler) " Client-Side: mutedPlayers = {} function receiveMutedPlayers(gMutedPlayers) mutedPlayers = gMutedPlayers end addEvent("onServerSendMutedPlayers", true) addEventHandler("onServerSendMutedPlayers", getRootElement(), receiveMutedPlayers) function testing() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for placeNumber, playerData in ipairs(mutedPlayers) do tx, ty, tz = getElementPosition( playerData ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 32.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( playerData, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.30 ) local x1,y1 = getScreenFromWorldPosition( sx, sy, sz + 0.35 ) local r,g,b = getPlayerNametagColor(localPlayer) scale = 0.65 if x then dxDrawText( "Muted", x, y, x, y, tocolor(r, g, b), scale + ( 15 - dist ) * 0.02, "bankgothic" ) end end end end end addEventHandler("onClientRender",root,testing) Only thing I could think of to 'solve' it. EDIT: I did some tests, and as soon as you put event 'onPlayerMute' in the same resource as where event 'onPlayerUnmute' is, then it doesn't set the element data anymore. So I will report it.
-
If check or the 'hitElement' is a player! if (getElementType(hitPlayer) == "player") then
-
Like I said before, I tested it in my server. For some kind of reason, it's not setting the data with 'setElementData' on the player. It does by event 'onPlayerMute', but it doesn't do it by event 'onPlayerUnmute'. Still, the code 'setElementData' does return 'true', which means it was set. I checked it with a command handler, but it doesn't change at all. I would guess it's a bug in event 'onPlayerUnmute', but I'm not sure. I will try something different now.
-
getZoneName (I think)
-
Just saying, but next time put it between this tags: stuff here [/.code]This is just a huge spam. (Without dots)
-
I agree with everything here above, but still remember that MTA is made out of free time and out of free will.
-
Does not matter. I can decompile both. Tough guy. But the majority can't. Even if only 1 can, that 1 can share it and ruin it. Anyway, sorry I really have no idea about compiling and encrypting, so what is the difference about compiling, encrypting and both together?
-
Tested it in my server. Everything is fine, but it seems that this is not setting the data, but it does return 'true': function isNotMuted() lol = setElementData(source,"playermuted",0) outputChatBox(tostring(lol)) end addEventHandler("onPlayerUnmute",root,isNotMuted) I guess a... bug?
-
Max+, that's useless. When she/he gets muted again it will not run.
-
Weird... In my eyes it just should work. Maybe someone else knows. Are you sure she/he gets unmuted?
-
Change this: if getElementData(localPlayer,"playermuted") == 1 then to: if getElementData(v,"playermuted") == 1 then
-
-.- Why don't you try it by yourself? Use command in-game: /debugscript 3 and give us the errors as soon as you start the resource if any.
-
If it doesn't has ACL, then search further. And what do you want with ACL and Ranks? Because your explanation is a bit, horrible.
-
<script src="server.lua" type="server" /> You forgot type.
-
As long as you choose an item which you don't want to use it doesn't matter.
-
This is like the 10th topic in 4 days lol. How about searching by yourself or learn scripting? https://community.multitheftauto.com/
-
By just starting installing XAMPP and then setting it up by yourself. And if you don't know how, just use Google for explanation.
-
Will report this, since nobody knows the answer
-
https://wiki.multitheftauto.com/wiki/Cl ... _functions
-
How to take the position rectangle of mini-map please ?
Et-win replied to Furious^ONE!'s topic in Scripting
getElementPosition getElementsByType("blip") -
Anything in debugscript 3? Otherwise what doesn't work? (Until where it works)
