-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Check the wiki arguments for these functions and you'll know which ones are the coordinates.
-
function nome() Maingui = guiCreateWindow(390,70,232,350,"Select Floor",false) abutton = guiCreateButton(56,247,135,45,"1",false,Maingui) bbutton = guiCreateButton(55,156,135,45,"2",false,Maingui) cbutton = guiCreateButton(52,70,135,45,"3",false,Maingui) guiSetVisible(Maingui, false) end addEventHandler("onClientResourceStart",resourceRoot, nome) mymarker = createMarker(591, -3417, 61.5, "cylinder", 1, 255, 255, 255, 140) function Visible(thePlayer) if (thePlayer == localPlayer) then guiSetVisible(Maingui, true) end end addEventHandler("onClientMarkerHit", mymarker, Visible)
-
Create a new resource in your "resources" folder and create two files: First: script.lua Then open it and copy this into it: gateCol = createColTube(275.57169, 190.07436, 1006.17188, 2, 2.5) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 3000, 280.03125, 189.408203125, 1007.171875) setTimer(moveObject,6000,1,gate,3000,277.03125, 189.408203125, 1007.171875) end) Save the file and close it. Second: meta.xml Then open it and copy this into it: Save the file and close it. And third (last step): type /refresh in-game (logged in as admin) or refresh in server console, then start the resource.
-
Read this: https://wiki.multitheftauto.com/wiki/Resources
-
-- server side: gateCol = createColTube(275.57169, 190.07436, 1006.17188, 2, 2.5) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 3000, 280.03125, 189.408203125, 1007.171875) setTimer(moveObject,6000,1,gate,3000,277.03125, 189.408203125, 1007.171875) end)
-
Quitaste la parte del server side, verdad? porque talvez sea eso.
-
As far as I know "gatemarker" uses teams to restrict gates, so you should be in a team to be able to open it.
-
And also it doesn't work for what he requires, so what's the point?
-
Where to put Mods/Resources in the MTA SA 1.2 folder
Castillo replied to stormchaser206's topic in Resources
Are you sure that the resource is valid? did you check if it has missing files/included resources? -
Then what are you asking? you want to a script to use that gate but not gatemaker?
-
Zango's code is A LOT more efficient than yours, you should use his. P.S: It's also a lot easier to add new entries.
-
Please avoid posting bull*** about the server, if you don't like it, just don't reply.
-
Unpack "gatemaker.zip" and open up "gates.xml", then copy your gate code into it. Like this: -- gates.xml: <gates> <gate x="277.03125" y="189.408203125" z="1007.171875" rx="0" ry="0" rz="0" x2="280.03125" y2="189.408203125" z2="1007.171875" rx2="0" ry2="0" rz2="0" objectID="974" team="false" collisionx="272.1728515625" collisionY="183.5166015625" collisionZ="1009.171875" collisionSize="10" raising="0" interiorID="3"></gate> </gates>
-
Ok, proba con esto: -- client side: GUIEditor_Label = {} GUIEditor_Label1 = {} theWindow1 = guiCreateWindow(350,50,250,350,"[Life]Petrolero",false) guiWindowSetSizable(theWindow1,false) guiSetVisible (theWindow1, false) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") aceptaBut1 = guiCreateButton(0.15,0.9,0.3,0.1,"Aceptar",true,theWindow1) closeBut1 = guiCreateButton(0.47,0.9,0.3,0.1,"Cerrar",true,theWindow1) info = guiCreateLabel(0.08,0.05,0.9,0.3,"¿Estas Listo para trabajar de Petrolero?",true,theWindow1) guiLabelSetColor(info, 0, 255, 0) info2 = guiCreateLabel(0.15,0.12,0.60,0.3,"Selecciona el Skin a Utilizar!",true,theWindow1) guiLabelSetColor(info2, 0, 255, 0) autos1 = guiCreateGridList ( 0.01, 0.19, 0.91, 0.70, true,theWindow1 ) column1 = guiGridListAddColumn( autos1, "Skins Disponibles", 0.93, true, theWindow1 ) skin1 = guiGridListAddRow( autos1 ) guiGridListSetItemText(autos1, skin1 , column1,"133",false,false) skin2 = guiGridListAddRow( autos1 ) theWindow2 = guiCreateWindow(350,50,250,350,"[Life]Petrolero",false) guiWindowSetSizable(theWindow2,false) guiSetVisible (theWindow2, false) guiLabelSetHorizontalAlign(GUIEditor_Label1[1],"left",false) guiSetFont(GUIEditor_Label1[1],"default-bold-small") aceptaBut2 = guiCreateButton(0.15,0.9,0.3,0.1,"Aceptar",true,theWindow2) closeBut2 = guiCreateButton(0.47,0.9,0.3,0.1,"Cerrar",true,theWindow2) info4 = guiCreateLabel(0.15,0.12,0.60,0.3,"Selecciona el Camion a Utilizar!",true,theWindow2) guiLabelSetColor(info4, 0, 255, 0) autos2 = guiCreateGridList ( 0.01, 0.19, 0.91, 0.70, true,theWindow2 ) column2 = guiGridListAddColumn( autos2, "Camiones Disponibles", 0.93, true, theWindow2 ) skin2 = guiGridListAddRow( autos2 ) guiGridListSetItemText(autos2, skin2 , column2,"Linerunner",false,false) --id nº 403 skin3 = guiGridListAddRow( autos2 ) guiGridListSetItemText(autos2, skin3 , column2,"Roadtrain",false,false) --id nº 515 function menuShow1 () visableornot = guiGetVisible (theWindow1) if (visableornot == true) then guiSetVisible (theWindow1, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow1, true) showCursor (true) end end addEvent ("menuShow1",true) addEventHandler ("menuShow1",getRootElement(),menuShow1) function menuShow2 () visableornot1 = guiGetVisible (theWindow2) if (visableornot1 == true) then guiSetVisible (theWindow2, false) showCursor (false) end if (visableornot1 == false) then guiSetVisible (theWindow2, true) showCursor (true) end end addEvent ("menuShow2",true) addEventHandler ("menuShow2",getRootElement(),menuShow2) function guiClick (button, state, absoluteX, absoluteY) if (source == aceptaBut1) then if (guiGridListGetSelectedItem (autos1)) then local carName1 = guiGridListGetItemText (autos1, guiGridListGetSelectedItem (autos1)) triggerServerEvent ("aceptar1", getLocalPlayer(), carName1) guiSetVisible ( theWindow1, false ) showCursor ( false ) end elseif (source == closeBut1) then guiSetVisible ( theWindow1, false ) showCursor ( false ) end if (source == aceptaBut2) then if (guiGridListGetSelectedItem (autos2)) then local carName2 = guiGridListGetItemText (autos2, guiGridListGetSelectedItem (autos2)) triggerServerEvent ("aceptar2", getLocalPlayer(), carName2) guiSetVisible ( theWindow2, false ) showCursor ( false ) end elseif (source == closeBut2) then guiSetVisible ( theWindow2, false ) showCursor ( false ) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) addEvent("enviarDestino",true) addEventHandler("enviarDestino",root, function (x,z,y) if isElement(theFinishMarker) then removeEventHandler("onClientMarkerHit", theFinishMarker, truckerJobMarkerHit) destroyElement ( theFinishMarker ) end if isElement(theFinishBlip) then destroyElement ( theFinishBlip ) end theFinishMarker = createMarker ( x, z, y, "cylinder", 4.5, 0, 255, 0, 90 ) theFinishBlip = createBlip ( x, z, y, 53, 2, 255, 0, 0, 255, 0, 99999.0 ) addEventHandler("onClientMarkerHit", theFinishMarker, truckerJobMarkerHit) end) function truckerJobMarkerHit ( hitPlayer, dim ) if (hitPlayer == localPlayer and dim and isPedInVehicle(localPlayer)) then local vehicle = getPedOccupiedVehicle(localPlayer) if (not getVehicleTowingVehicle(vehicle)) then outputChatBox ( "Necesitas el Trailer!!", 255, 0, 0 ) return end if (getElementModel(getVehicleTowingVehicle(vehicle)) ~= 584) then outputChatBox ( "Necesitas el Trailer!!", 255, 0, 0 ) return end if isElement(theFinishMarker) then removeEventHandler("onClientMarkerHit", theFinishMarker, truckerJobMarkerHit) destroyElement ( theFinishMarker ) end if isElement(theFinishBlip) then destroyElement ( theFinishBlip ) end triggerServerEvent("misionTerminada",localPlayer) end end
-
Just copy that line into "gates.xml" into "gatemaker" and restart the resource.
-
If you made it with "gatemaker" resource, then why don't you read how it works? it must have some kind of documentation.
-
A "RPG file"? is that a joke or something? or you're just new to MTA? if so, you must know that you can't just get a "RPG" server from the air, you must either script it yourself or pay someone to do it for you. P.S: You can search for resources here: https://community.multitheftauto.com/index.php?p=resources
-
Sounds like the object doesn't has collisions at all.
-
You want to kill the zombies or the players? because you just make no sense. First you ask a way to kill zombies who exist the desert, and now you ask to kill players... which one do you want?
-
Ok, I fixed the first error, but the second doesn't match the line in the script I gave you. P.S: Copy the server-side script again.
-
Read my post CAREFULLY: "Check the leave element type, if is a ped then kill him"
-
There is. onColShapeLeave -> Check the leave element type -> if is a ped -> killPed
-
Maybe you can make a big colshape and when they leave, kill them.
-
Any errors on debug script? also, are you driving a vehicle?
