-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Postea tu meta.xml y el script donde usas esa fuente (el script entero).
-
You mean the script has an error and the whole gui.lua script isn't working? if so, do /debugscript 3 and tell us the errors.
-
What do you mean? we can't help you if you don't provide more information.
-
It should be client side, else everyone'll see the blips when someone presses 'I'. P.S: bindKey has 'player' argument on server-side.
-
local pos = { guiGetScreenSize() } local enabled = true gResRoot = resourceRoot function getMarkerByHousenumber (housenumber) for i,v in ipairs (getElementsByType("marker")) do if (getElementData (v,"housenumber") == tonumber(housenumber)) then return v end end end bindKey( 'i', 'both', function( key, keyState ) if (keyState == 'down') then for k, v in ipairs ( getElementsByType( "marker", gResRoot ) ) do if (getElementData(v,"housenumber")) then createBlipAttachedTo( v, 31, 2, 255,0,0,255,100,500 ); end end else for k, v in ipairs( getElementsByType( "marker", gResRoot ) ) do for k, elem in ipairs( getAttachedElements( v ) ) do if (getElementType(elem)=="blip") then destroyElement(elem) end end end end end) Try that, not sure if it'll work though.
-
......? CREA UN RECURSO NUEVO Y CREA DOS ARCHIVOS: script.lua Y meta.xml, luego metes el script en script.lua y en meta.xml pones esto: "Gates" author="BlackFun" version="1.0" type="script" />
-
You want to make custom blips? if so use the 'customblips' resource by Talidan. https://community.multitheftauto.com/index.php?p= ... ils&id=960
-
Case sensitive... it's SetLaserEnabled and IsLaserEnabled. addEventHandler("onPlayerSpawn",root, function() if not IsLaserEnabled(source) then SetLaserEnabled(source, true) end end)
-
Talvez la fuente no es valida?
-
Lee esto: https://wiki.multitheftauto.com/wiki/ES/Resources
-
Mira te digo, no creo que encuentres a alguien con experiencia suficiente solo por ser admin.
-
"si el escript es bueno le pagare y lo are admin en el server." Eso parece un chiste, porque vos definis si es bueno, si quieres pagar por algo, y que sea "bueno", entonces tienes que contratar a alguien con la experiencia necesaria para completar el trabajo, no a algun novato y esperar a que haga un milagro .
-
I don't know then, why should it work for me but not for you?
-
Are you sure that the team EXISTS? because it works fine here.
-
Did you change the hijackerTeam variable to your team name?? because if not, then of course it'll cause these errors. it worked perfectly here.
-
local hijackerTeam = "Criminal" local currentDriver = nil function create () hijackerv = createVehicle ( 500, 2071, -1332, 25, 0, 0, 0 ) carBlip = createBlipAttachedTo ( hijackerv, 53, 1 ) setElementVisibleTo(carBlip, getRootElement(), false) for index, player in ipairs(getPlayersInTeam(getTeamFromName(hijackerTeam))) do outputChatBox( 'hijacker has appeared, enter it and distribute it!', player, 0, 255, 125 ) setElementVisibleTo(carBlip, player, true) end addEventHandler ( "onVehicleEnter", hijackerv, getdriver ) addEventHandler ( "onVehicleExit", hijackerv, onExit ) addEventHandler ( "onVehicleStartEnter", hijackerv, onTryToEnter ) end function onTryToEnter ( thePlayer ) if (getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) ~= hijackerTeam and source == hijackerv) then outputChatBox("You cannot enter this vehicle", thePlayer, 255, 0, 0) cancelEvent() end end function getdriver ( driver ) if ( driver ) then outputChatBox( 'Those inside the car, hurry up!', driver ) marker = createMarker ( 2015, -2410, 12.5, "cylinder", 6, 255, 0, 0, 90 ) blip = createBlipAttachedTo ( marker, 51, 1 ) setElementVisibleTo(marker, getRootElement(), false) setElementVisibleTo(blip, getRootElement(), false) setElementVisibleTo(marker, driver, true) setElementVisibleTo(blip, driver, true) addEventHandler("onMarkerHit",marker,onMarkerHit) currentDriver = driver end end function onExit ( thePlayer ) if (getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) == hijackerTeam and currentDriver == thePlayer) then if isElement(blip) then destroyElement ( blip ) end if isElement(marker) then destroyElement ( marker ) end currentDriver = nil end end function onMarkerHit( thePlayer ) if (getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) == hijackerTeam and isPedInVehicle(thePlayer) and getPedOccupiedVehicle(thePlayer) == hijackerv) then local money = math.random(15000, 25000) givePlayerMoney ( thePlayer, money) outputChatBox ( "Well done, you get the money ".. tostring(money) .."$ !Good Work", thePlayer, 0,255,0 ) if isElement(marker) then destroyElement ( marker ) end if isElement(carBlip) then destroyElement ( carBlip ) end if isElement(blip) then destroyElement ( blip ) end if isElement(hijackerv) then destroyElement ( hijackerv ) end currentDriver = nil end end create()
-
My bad, I got confused with 'onMarkerHit' .
-
Evil-Cod3r, please don't reply when you have ABSOLUTELY NO IDEA. @Holsten: They won't be able to spawn inside the radar areas, but they will be able to enter. If you want to kill them on enter, then you must make create it by your own.
-
Why nobody reads the function arguments? Required Arguments leftX: A float representing the left 'x' position of the radar area. bottomY: A float representing the bottom 'y' position of the radar area. sizeX: A float representing the width of the radar area. sizeY: A float representing the height of the radar area. r: An integer representing the amount of red in the color. Maximum value is 255 g: An integer representing the amount of green in the color. Maximum value is 255 b: An integer representing the amount of blue in the color. Maximum value is 255 [b][u]a: An integer representing the amount of alpha in the color. This allows setting the transparency of the radar area. 255 is opaque and 0 is transparent.[/u][/b]
-
You can't set a vehicle visible to just some players, you should check if the player who tries to enter is a Car Jacker. function create () hijackerv = createVehicle ( 500, 2071, -1332, 25, 0, 0, 0 ) carBlip = createBlipAttachedTo ( hijackerv, 53, 1 ) outputChatBox( 'hijacker has appeared, enter it and distribute it!', 0, 255, 125 ) addEventHandler ( "onVehicleEnter", hijackerv, getdriver ) end function getdriver ( driver ) if ( driver ) then outputChatBox( 'Those inside the car, hurry up!', driver ) marker = createMarker ( 2015, -2410, 12.5, "cylinder", 6, 255, 0, 0, 90 ) blip = createBlipAttachedTo ( marker, 51, 1 ) addEventHandler("onMarkerHit",marker,onMarkerHit) end end function onMarkerHit( thePlayer ) local money = math.random(15000, 25000) givePlayerMoney ( thePlayer, money) outputChatBox ( "Well done, you get the money ".. tostring(money) .."$ !Good Work", thePlayer, 0,255,0 ) if isElement(marker) then destroyElement ( marker ) end if isElement(carBlip) then destroyElement ( carBlip ) end if isElement(blip) then destroyElement ( blip ) end if isElement(hijackerv) then destroyElement ( hijackerv ) end end create()
-
Sus padres eran unos hijos de p***, como vas a ponerle esos nombres jaja.
