-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You can try OVH. http://www.ovh.co.uk/
-
My server also uses OVH, we have no problems so far.
-
Obvio, si no definiste la posicion en el server side... triggerClientEvent ( player, "beepbeep", player, getElementPosition ( vehicle ) )
-
triggerClientEvent ( player, "beepbeep", player, x, y, z )
-
Los unicos trucos que se pueden activar con una funcion son los de volar, conducir por el agua, saltar mas alto con la bicicleta y saltar mas alto como jugador.
-
fileRead lo unico que leera es el codigo compilado.
-
That's because it doesn't make any sense, what are you trying to do?
-
function DrawTableString ( ) local x,y = guiGetScreenSize ( ) for _, v in ipairs ( DrawStringTable ) do local vals = { } for _, value in ipairs ( string.split ( v, "," ) ) do table.insert ( vals, tonumber ( value ) ) end dxDrawRectangle ( unpack ( vals ) ) end end addEventHandler ( "onClientRender", getRootElement(), DrawTableString ) P.S: Why are you using a custom function to split it? MTA has "split" function which does the same.
-
Well, the thing is, they'll be strings now, not numbers.
-
You're welcome.
-
Please.Don't lie. You've stoled it from Server named Grafuroam. I don't think that's the case, if I'm correct, he took it from this topic: viewtopic.php?f=91&t=71604
-
local minutes = 5 --here change how many u want setTimer ( function ( ) local vehicles = getElementsByType ( "vehicle" ) if ( #vehicles > 0 ) then for _, vehicle in ipairs ( vehicles ) do if isVehicleEmpty ( vehicle ) then destroyElement ( vehicle ) end end end end , minutes * 60000, 0) function isVehicleEmpty( vehicle ) if not isElement( vehicle ) or getElementType( vehicle ) ~= "vehicle" then return true end local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
-
getPedOccupiedVehicle is used to get the vehicle out of a PLAYER/PED. To see if it's empty or not, use getVehicleOccupants. Or you can simply use this function: https://wiki.multitheftauto.com/wiki/IsVehicleEmpty
-
local job = {} local markers = { } createTheJobs = function() for a,b in ipairs(jobs) do marker = createMarker(b.markerX, b.markerY, b.markerZ, "cylinder", markerSize or 2, b.markerColorR, b.markerColorG, b.markerColorB) markers [ b.jobTitle ] = marker blip = createBlipAttachedTo(marker,b.blip) setElementVisibleTo (blip, root, b.alpha) setBlipVisibleDistance(blip, 500) setElementData(marker, "title", b.jobTitle) setElementData(marker, "group", b.group) setElementData(marker, "team", b.team) job[marker] = b.group setElementData(marker, "info", b.information) setElementData(marker, "skins", b.skins) addEventHandler("onMarkerHit", marker, handleJobMarkerHit) end end addEventHandler("onResourceStart", resourceRoot, createTheJobs) handleJobMarkerHit = function(player) local role = getElementData(source,"group") if (getElementType(player) == "player") then if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then if isPedInVehicle(player) then return end local info= getElementData(source, "info") local skin= getElementData(source, "skins") triggerClientEvent(player, "jobsystem.showJobGUI", root, getElementData(source, "title"), skin, info) else exports["TopBarChat"]:sendClientMessage("This marker is allowed for only "..role.." group.", player, 255, 0, 0) end end end onPlayerAcceptJob = function(job, skin) setElementModel(client, skin) setElementData(client, "Occupation", job) exports["TopBarChat"]:sendClientMessage("You're working as "..job, client, 0, 255, 0) local marker = markers [ job ] if ( marker ) then setPlayerNametagColor ( client, getMarkerColor(marker)) local team = getElementData(marker, "team") local team = getTeamFromName ( team ) if ( team ) then setPlayerTeam(client, team) end end addEvent("onPlayerAcceptJob", true) addEventHandler("onPlayerAcceptJob", root, onPlayerAcceptJob)
-
addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setPedCanBeKnockedOffBike ( localPlayer, false ) end )
-
Are you sure the problem is in that code? if your check to see if attempts are 0 or lower returns true, it means that the problem is where you decrease attempts variable.
-
dxDrawText doesn't return an element, it returns a boolean ( true/false ). To "destroy" it, just stop rendering it.
-
That doesn't make any sense.