-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
This event triggers only when a player hit's it. function onmarker(player) local vehicle = getPedOccupiedVehicle (player) if vehicle and getElementData( vehicle,"club") then outputChatBox("This vehicle is a " .. tostring(vehicle) .. "!") -- user data.... end end addEventHandler("onClientMarkerHit", root, onmarker) club = setElementData(vehcreates[1],"club",true) AND YES IT MUST BE UNDER THE TABLE...... You can't do something with an element that doesn't exist yet........
-
Wrong section. Click
-
LED display. View from camera in real time on e.g. billboard
IIYAMA replied to polakg1140's topic in Scripting
use: setCameraMatrix Require the X,Y,Z of the place were the camera starts, and the X,Y,Z were the billboard is. function myFunction () end addEventHandler("onClientRender",root,myFunction) getTickCount() variables..... maybe a table for the camera locations. You don't need: setTimer -- because you have tickCount..... dxCreateScreenSource -- why you need this? setCameraTarget -- because that isn't just going to work on objects..... And no I am not going to build it for you. -
Because it will trigger for all players except for your self. Also you forgot to define the root element. Use: addEventHandler("onClientResourceStart",resourceRoot, cmatrix) Also: fadeCamera(true)
-
You must be standing inside a colshape with elementdata set: "purpose" to "zombiewood" It is what the script tells me, nothing more, nothing less.
-
May I ask what line it is on this post? Because at line 38 there isn't a table. Line 36, you defined source, while addCommandHandler doesn't have a source, only event's have. MutedPlayer[source] = setTimer(function()
-
I would choose for something similar to the resource mission timer. 1 Timer to manage the future time of the saved mutes and saving lots of memory.
-
muted = setTimer(function(), MutedPlayers[SerialB] = nil end, MutedTime, 1) function(), muted = setTimer(function() MutedPlayers[SerialB] = nil end, MutedTime, 1) Also put a break when you found your target. (can save you some memory by ending up the loop) function addMutedPlayer(thePlayer, cmd, Target, time) for i,v in ipairs(getElementsByType("player")) do local playername0 = string.gsub(getPlayerName(v), "#%x%x%x%x%x%x", "") local playername1 = string.lower(playername0) if string.match(playername1, Target) then local serialA = getPlayerSerial(thePlayer) local serialB = getPlayerSerial(v) MutedPlayers[serialB] = serialA MutedTime = time * 1000 muted = setTimer(function() MutedPlayers[SerialB] = nil end, MutedTime, 1) break -- save memory! end end end addCommandHandler("mp", addMutedPlayer, false,false)
-
But then it loses it's event's.
-
No need to use table.insert. Because it is already doing that, except it isn't making use of a function. But the best way is using a table in a table: MutedPlayers[serialB] = {manager=serialA,muteTime=getTickCount()+30000,reason=""} Everybody has it's own way of writing down tables. I do it like this: MutedPlayers[serialB] = {["manager"]=serialA,["muteTime"]=getTickCount()+30000,["reason"]=""} It gives the same result. UPDATED
-
True, but he will overwrite it. Just like a wrapper, won't cause any serious problems afk. But it should be prevented, the mta function will not be able to use in that script.(if it isn't redefined)
-
Why don't you try: MutedPlayers[serialB] = serialA
-
You should take a look at the stealth laser. It isn't perfect, but it gives a little result. It uses: getPedBonePosition
-
That is why I always work alone.....
-
It is incomplete. There are no setPlayerWantedLevel functions in the second part, your levels aren't dropping with time. Except by killing your self >part1.
-
I don't know that guy. But if you want help, you must make it easier for people to help you, by giving the information they are asking for.
-
Of course, it is just adding more time for wanted levels. I only can't find the timer that drops the wanted level. But is this all? Can you show me where you got this? (Then I can take a closer look.)
-
nope. Btw this timer doesn't drop the wantedLevel, where is that part?
-
See line "32" there you can set up the time (5000 ms /5 sec) local wantedLevels = getPlayerWantedLevel ( source) local wantedTime = wantedLevels * 5000 if wantedTime > 50 then -- set the timer or do what you want. end
-
Identify Mortal Strike with knife in "KILL_Knife_Player"
IIYAMA replied to ronaldoguedess's topic in Scripting
Why waste the source? why waste data? The source isn't a parameter, it something that get created automatic when an event got trigged. function onStealthKill(source, targetPlayer) triggerServerEvent("onPedGetsKilledStealthKill", source, targetPlayer) end addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), onStealthKill) function PedKilledgggg(targetPlayer) if isElement(source) then setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) end end addEvent("onPedGetsKilledStealthKill", true) addEventHandler("onPedGetsKilledStealthKill", getRootElement(), PedKilledgggg) Also:(bugged) setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) setElementData(source, "Pedkilled", (getElementData(source, "Pedkilled")or 0) + 1) BTW: If you don't do anything extra clientside, then do it serverside, as you did first. https://wiki.multitheftauto.com/wiki/On ... tealthKill -
My script looks like that, except it is more to sync the player movement and damage. I don't kick players for lagg, I kill them. It even uses tables to manage player their health so no other things can change values from it. It is one of the biggest reasons why my servers don't have players, because the less lagg you have the better you can damage others elements. But I don't really care, the scripting is more fun then the use of it.
-
@1w#ALBANDER Some lagg can't be prevent with that (especially short timed outs), they come close to cheating but they are more or less gone for some time and always show up at the wrong time and place. mtasa://85.159.113.61:22014 Or click on the servers in my signature.
-
It means getting 10% from 0 euro donations and yes that is very funny.
-
Danny, thank you very much! It works great! Bandi thanks for explaining about the camera rotation. It seems it didn't needed the Y rotation after all. Also thanks to everybody that replied on this topic.
-
You also can try to use a timer to reset the nitro count.