-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
It loops all the items in the table ( the marker elements ) and attaches the event handler to these markers only.
-
Tried checking if the event is being triggered?
-
That's because there is a typo at "updateReputationName" function, instead of "player" it says "killer". function updateReputationName( player ) local repPoints = getElementData(player, "Reputation.points") or 0 local newRepName = getReputationName( repPoints ) setElementData(player, "Reputation.status", newRepName) end Use that.
-
Maybe the data is nil, so do tostring ( win ), tostring ( dead ) in the client side.
-
markers = { createMarker( -1620, 685, 6, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 2242, 2450, 9.75, "cylinder", 1.5 , 0, 0, 255, 100), createMarker( 1555, -1675.5, 15.2, "cylinder", 1.5, 0, 0, 255, 100) } vehiclemarkers = { createMarker( 1556, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 1566, -1612, 12.5, "cylinder", 1.5, 0, 0, 255, 100) } LSPoliceBlip = createBlip( 1554, -1675, 15, 30, 2) SFPoliceBlip = createBlip( -1620, 685, 8, 30, 2) LVPoliceBlip = createBlip( 2242, 2450, 11, 30, 2) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, marker in ipairs ( markers ) do addEventHandler ( "onClientMarkerHit", marker, PoliceGUI ) end end ) function PoliceGUI (hitPlayer, matchingDimension ) --Message that you enered the Marker outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker", 255, 255, 0 ) --Window/GUI policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob", true ) --Tap Panel policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) --Tab's policeMap = guiCreateTab( "Job Information", policePanel ) scriptinformation = guiCreateTab( "Script Information", policePanel ) --PoliceTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "Welcome to the Police Department", true, policeMap) guiCreateLabel(0.02, 0.08, 0.94, 0.92, "Press 'Accept' to accept the Job and get your Equipment", true, policeMap) guiCreateLabel(0.02, 0.12, 0.94, 0.92, "Press 'Exit' to close this gui and exit", true, policeMap) guiCreateLabel(0.065, 0.5, 0.94, 0.92, "Please choose a Skin:", true, policeMap) guiCreateStaticImage( 350, 75, 350, 175, "images/police-tape.png", false, policeMap ) LS = guiCreateRadioButton(50,200,100,16,"LS Skin",false, policeMap) guiRadioButtonSetSelected(LS,true) SF = guiCreateRadioButton(50,220,100,16,"SF Skin",false, policeMap) LV = guiCreateRadioButton(50,240,100,16,"LV Skin", false, policeMap) exitbutton = guiCreateButton( 0.5, 0.85, 0.2, 0.1, "Exit", true, policeMap ) acceptbutton = guiCreateButton( 0.1, 0.85, 0.2, 0.1, "Accept", true, policeMap ) showCursor ( true ) --ScriptInformationTab guiCreateLabel(0.02, 0.04, 0.94, 0.2, "This script is made by Alexander Wolf©", true, scriptinformation) guiCreateLabel(0.02, 0.08, 0.94, 0.2, "Do you like my script? Visit my Website alexwo.com/scripting for more!", true, scriptinformation) end function wclose (state) if state == "left" then if source == exitbutton then outputChatBox("You left the Job Marker "..getPlayerName(localPlayer).."!", 255, 100, 0) guiSetVisible(policeWindow, false) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), wclose) function acceptjob (state) if state == "left" then if source == acceptbutton then if(guiRadioButtonGetSelected(LS))then triggerServerEvent("giveEquipmentLS", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") elseif(guiRadioButtonGetSelected(SF))then triggerServerEvent("giveEquipmentSF", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") guiSetVisible(policeWindow, false) showCursor(false) elseif(guiRadioButtonGetSelected(LV))then triggerServerEvent("giveEquipmentLV", getLocalPlayer(), thePlayer) guiSetVisible(policeWindow, false) showCursor(false) local acceptsound = playSound("sounds/accept.mp3") end end end end addEventHandler("onClientGUIClick", getRootElement(), acceptjob)
-
We don't give support with leaked scripts. Topic locked and code removed.
-
You want to spawn these bots inside the radar area, but they are spawning outside of it?
-
1. Did you edit the ACL while the resource was running? 2. Do you get any error in the debugscript? /debugscript 3 ingame.
-
I really doubt they are worth buying, since you can get a level system in the MTA community and the skin shop is easy to make. But well, that is just my opinion, good luck with the sale!
-
Mta Server [L.A-CHILE] Drifters For Life
Castillo replied to joaquifs's topic in Servidores en donde jugar
Tema cerrado a petición. -
You could try creating a pickup directly using the object ID, see if it's supported.
-
Try adding that function after setCameraMatrix.
-
local x, y = guiGetScreenSize ( ) local nev = "" local reason = "" local reasons = { [ "unknown" ] = "Ismeretlen.", [ "quit" ] = "Kilépett.", [ "kicked" ] = "Kirúgva.", [ "banned" ] = "Kitiltva.", [ "bad connection" ] = "Rossz kapcsolat.", [ "timed out" ] = "Idotúllépés.", } function drawCsatlakozas ( ) -- 1411, 228, 269, 84 dxDrawRectangle(x*0.83988, y*0.217142, x*0.160119, y*0.08, tocolor(0, 0, 0, 125), true) -- 1411, 312, 269, 21 dxDrawRectangle(x*0.83988, y*0.297142, x*0.160119, y*0.02, tocolor(0, 0, 0, 185), true) -- 1411, 228, 269, 21 dxDrawRectangle(x*0.83988, y*0.217142, x*0.160119, y*0.02, tocolor(245, 140, 20, 200), true) -- 1425, 234, 1680, 244 dxDrawText("Csatlakozás / Kilépés", x*0.848214, y*0.2228571, x*1, y*0.23238, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) -- 1430, 453, 1680, 244 dxDrawText("CoreGaming", x*0.8511904, y*0.380952, x*1, y*0.23238, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) -- 1465, 249, 1657, 280 dxDrawText(nev, x*0.872023, y*0.237142, x*0.985, y*0.266666, tocolor(255, 255, 255, 255), 1.15, "default-bold", "center", "center", false, false, true, false, false) -- 1455, 285, 1675, 302 dxDrawText("csatlakozott a szerverre.", x*0.8660714, y*0.271428, x*0.99702, y*0.28761, tocolor(255, 255, 255, 255), 1.10, "default", "center", "center", false, false, true, false, false) end function drawKilepes( ) -- 1411, 228, 269, 110 dxDrawRectangle(x*0.83988, y*0.217142, x*0.160119, y*0.104761, tocolor(0, 0, 0, 125), true) dxDrawRectangle(x*0.83988, 338, x*0.160119, y*0.02, tocolor(0, 0, 0, 185), true) dxDrawRectangle(x*0.83988, y*0.217142, x*0.160119, y*0.02, tocolor(245, 140, 20, 200), true) dxDrawText("Csatlakozás / Kilépés", x*0.848214, y*0.2228571, x*1, y*0.23238, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) -- 1430, 453, 1680, 244 dxDrawText("CoreGaming", x*0.8511904, y*0.430952, x*1, y*0.23238, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) -- 1465, 249, 1657, 280 dxDrawText(nev, x*0.872023, y*0.237142, x*0.985, y*0.266666, tocolor(255, 255, 255, 255), 1.15, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("lecsatlakozott a szerverrol.", x*0.8660714, y*0.271428, x*0.99702, y*0.28761, tocolor(255, 255, 255, 255), 1.10, "default", "center", "center", false, false, true, false, false) -- 1455, 340, 1675, 302 dxDrawText("[ " .. tostring ( reason ) .." ]", x*0.866071, y*0.3238095, x*0.99702, y*0.28761, tocolor(255, 255, 255, 255), 1.10, "default", "center", "center", false, false, true, false, false) end addEventHandler ( "onClientPlayerJoin", root, function ( ) removeEventHandler ( "onClientRender", root, drawCsatlakozas ) nev = getPlayerName ( source ) addEventHandler ( "onClientRender", root, drawCsatlakozas ) local sound = playSound ( "bip.wav" ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, drawCsatlakozas ) end ,5000, 1 ) end ) addEventHandler ( "onClientPlayerQuit", root, function ( reason_ ) removeEventHandler ( "onClientRender", root, drawKilepes ) nev = getPlayerName ( source ) reason = reasons [ reason_:lower ( ) ] addEventHandler("onClientRender", root, drawKilepes) local sound = playSound ( "bip.wav" ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, drawKilepes ) end ,5000, 1 ) end )
-
Did you fade the camera in? fadeCamera ( true )
-
It means it'll loop from 1 until the number given after the comma.
-
You could create a single window and use radio buttons, then you can use a table to store them and do something like this: local radioButtons = { guiCreateRadioButton ( args... ), guiCreateRadioButton ( args... ), guiCreateRadioButton ( args... ), guiCreateRadioButton ( args... ), guiCreateRadioButton ( args... ), guiCreateRadioButton ( args... ) } function setRadioButtonsVisible ( ) for index = 1, 6 do guiSetVisible ( radioButtons [ index ], false ) end for index = 1, getPlayerWantedLevel ( ) do guiSetVisible ( radioButtons [ index ], true ) end end
-
What do you mean by "it's not the same camera type"?
-
The only way to do this is to create your own nickname system.
-
Well, having buttons in a GUI to control it isn't such a good idea, it's slow and boring, having to click everything to do it reminds me of Warcraft 1. I would suggest to use either the arrows or the numeric keyboard to drive it.
-
Se pueden remplazar pickups, el tema es que creo que no funciona al 100%. Tenes que usar: engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel
-
El tema es que si no le das unbindKey, entonces se te pondra el bind varias veces. Te sugiero que lo pongas al unirse el jugador y al iniciar el recurso para todos los jugadores.
-
bindKey server-side como primer argumento necesita un elemento de jugador.