Search the Community
Showing results for tags 'delay'.
-
So basically I want it to work in this way -> The car enters the cylinder then some text gonna appear in chat like "repairing is under process" and you should wait for example 10 seconds before the starting of the function. The function and everything is below in my script. Can someone help in adding this into it? The script: spray1 = createMarker ( -2437.853515625, 1036.1303710938, 49.5, "cylinder", 5, 0, 255, 0, 50 ) function Reparar ( thePlayer ) local dinero = getPlayerMoney ( thePlayer ) local vehicle = getPedOccupiedVehicle ( thePlayer ) if ( not vehicle ) then outputChatBox( "#c8c8c8Steven: #ffffffGuruljon be a járműjével ide Uram, ha szervízre van szüksége. ", thePlayer, 255, 0, 0, true ) return end if ( dinero >= 300 ) then takePlayerMoney( thePlayer, 300 ) fixVehicle( vehicle ) outputChatBox ( "#c8c8c8Steven: #00ff00Sikeresen megjavítottam a járművét Uram!", thePlayer, 0, 255, 0, true ) else outputChatBox ( "#c8c8c8Steven: #ff1100Ne vesztegesse itt az időmet! 300$ alatt nem vállalok javítást!", thePlayer, 255, 0, 0, true ) end end addEventHandler( "onMarkerHit", spray1, Reparar ) spray2 = createMarker ( 1219.9140625,188.96229553223,18.952247619629, "cylinder", 5, 0, 255, 0, 50 )
-
I have this: function Salir() if isElement(tableVehicles[source]) then destroyElement(tableVehicles[source]) end end addEventHandler("onPlayerVehicleExit",getRootElement(),Salir) This function destroys the vehicle when the player leaves, I want this to happen after a second and not immediately, i need to use "Set timer", but I do not know how to use it, I tried different ways but none of them
-
I have been having a lot of trouble with my mouse lately that's causing it to have a very large delay on MTA which makes it LITERALLY impossible to play on a server normally. Although the issue originally arose some time last year, it is only now it has came to my proper attention again as I wish to be able to play on a server. I have tried many things to fix this and I can safely dismiss it being the mouse simply because it does this on MTA only; and on my other two PC's as well. Does anyone have any idea what the issue is and how I can solve it? I have tried quite a few things now but there are hardly any topics related to this kind of issue.
-
Hello friends, I have a problem. I have a little delay when I watch the player. Code: function randomSpectatePlayer() local playerGroup = getElementData(localPlayer, "player:group") or false if playerGroup then local inGame = getElementData(localPlayer, "player:game") or false for k,v in ipairs(playerGroup) do if isElement(v) and getElementData(v, "player:game") and getElementData(localPlayer, "player:onSpawn") then if v ~= localPlayer then setElementFrozen ( localPlayer, true ) oldDim = getElementInterior(localPlayer) oldInt = getElementDimension(localPlayer) setElementInterior(localPlayer, getElementInterior(v)) setElementDimension(localPlayer, getElementDimension(v)) setCameraInterior(localPlayer, getCameraInterior(v)) spectating = v setCameraTarget ( v ) outputChatBox("[SPECTATE] #ffffffYou spectating now "..getPlayerName(v), 255,100,100,true) outputChatBox("[SPECTATE] #ffffffIf you want back to lobby use #ff0000/back #ffffffcommand.", 255,100,100,true) addCommandHandler("back", onStopSpectating) end end end end end
-
I'd like to sugest a delay() function because, in my opinion, it will be helpful and it will save you from using plenty of setTimers or any function like that. How can this function can be helpful?: Delay between two actions( switching two images ) Some interesting effects etc... (I'm sorry if this kind of function exists, i didn't notice it)