Jump to content

Eelke

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Eelke

  1. Eelke

    2 questions...

    Hello, i have 2 questions.. 1. I use https://community.multitheftauto.com/index.php?p=resources&s=details&id=1152 << this spawn script, and every spawn i use i get the ARMY skin, but in the file it has the good skin id... 2. I want to lock cars / spawns for a acl or team.. how can i do that? Greetz, Eelke
  2. and if i want to add a paintjob to the infernus i also need to do dff modification?
  3. Hi, i want to add a paintjob to the hotringracer.. but i dont know how i can add paintjobs to cars that normally dont have a paintjob.. Greetz, Eelke
  4. Eelke

    Gate scripting.

    Someone can help? the gui doesnt even open anymore -.-
  5. I made a gate in a51 with keypad from this tut: https://wiki.multitheftauto.com/wiki/Scripting_the_GUI_-_Tutorial_2#Creating_the_GUI But the buttons dont work... this is my script.lua: function createKeypad() -- get the screen width and height local sWidth, sHeight = guiGetScreenSize() -- create the window, using some maths to find the centre of the screen local Width,Height = 142,276 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) keypadWindow = guiCreateWindow(X,Y,Width,Height,"Keypad",false) -- don't allow people to resize the keypad guiWindowSetSizable(keypadWindow,false) -- create buttons labeled 0-9, "*", "#", "Enter" and "C" (clear) keypadButton1 = guiCreateButton(13,68,37,36,"1",false,keypadWindow) keypadButton2 = guiCreateButton(53,68,37,36,"2",false,keypadWindow) keypadButton3 = guiCreateButton(93,68,37,36,"3",false,keypadWindow) keypadButton4 = guiCreateButton(13,108,37,36,"4",false,keypadWindow) keypadButton5 = guiCreateButton(53,108,37,36,"5",false,keypadWindow) keypadButton6 = guiCreateButton(93,108,37,36,"6",false,keypadWindow) keypadButton7 = guiCreateButton(13,148,37,36,"7",false,keypadWindow) keypadButton8 = guiCreateButton(53,148,37,36,"8",false,keypadWindow) keypadButton9 = guiCreateButton(93,148,37,36,"9",false,keypadWindow) keypadButtonAsterix = guiCreateButton(13,188,37,36,"*",false,keypadWindow) keypadButton0 = guiCreateButton(53,188,37,36,"0",false,keypadWindow) keypadButtonHash = guiCreateButton(93,188,37,36,"#",false,keypadWindow) keypadButtonExit = guiCreateButton(13,228,37,36,"Exit",false,keypadWindow) keypadButtonEnter = guiCreateButton(53,228,37,36,"Enter",false,keypadWindow) keypadButtonClear = guiCreateButton(93,228,37,36,"Clear",false,keypadWindow) -- create a gridlist to act as a backdrop on the kaypad display keypadGridlistDisplay = guiCreateGridList(13,25,117,33,false,keypadWindow) guiGridListSetSelectionMode(keypadGridlistDisplay,2) guiSetAlpha(keypadGridlistDisplay,0.6) -- create a label so we can write text on the keypad display keypadLabelDisplay = guiCreateLabel(14,26,115,30,"Enter Keycode.",false,keypadWindow) guiLabelSetColor(keypadLabelDisplay,255,000,000) guiLabelSetVerticalAlign(keypadLabelDisplay,"center") guiLabelSetHorizontalAlign(keypadLabelDisplay,"center",false) guiSetVisible(keypadWindow,false) end -- create the GUI when the resource starts addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createKeypad) function updateDisplay(text) -- if we are passing some text if text then -- if its a digit or * or #, then append it to the end of the display if tonumber(text) or text == "*" or text == "#" then guiSetText(keypadLabelDisplay,guiGetText(keypadLabelDisplay) .. text) -- otherwise replace the display with the new text else guiSetText(keypadLabelDisplay,text) end -- if we pass nil, clear the display entirely else guiSetText(keypadLabelDisplay,"") end end local keypadCodes = { ["a51MainGateKeypadCode"] = "4455*#" } addEvent("verifyKeypadCode",true) addEventHandler("verifyKeypadCode",root,function(code,keypadID) if code then -- using the table we created earlier, check if the code supplied is the same as the code for this gate if code == keypadCodes[keypadID] then -- if it is, tell the client that it was successful triggerClientEvent(client,"onKeypadVerificationSuccessful",client,keypadID) else -- if it is not, tell the client that it was not successful triggerClientEvent(client,"onKeypadVerificationFailed",client,keypadID) end end end) addEvent("onKeypadVerificationSuccessful",true) addEventHandler("onKeypadVerificationSuccessful",root, function() -- hide the keypad and reset the display text ready for next time guiSetVisible(keypadWindow,false) updateDisplay("Enter Keycode.") showCursor(false,false) end ) addEvent("onKeypadVerificationFailed",true) addEventHandler("onKeypadVerificationFailed",root, function() -- update the display text to show the code was invalid updateDisplay("Invalid Keycode.") end ) addCommandHandler("a51gate",function() guiSetVisible(keypadWindow,true) showCursor(true,true) setElementData(keypadWindow,"keypadID","a51MainGateKeypadCode") end) addEventHandler("onKeypadVerificationSuccessful",root, -- keypadID is sent back from the server function(keypadID) -- get the gate object (this is where the id="a51MainGateKeypadCode" tag in the map file becomes useful) local gate = getElementByID(keypadID) -- if we found the object if gate then -- get the new position (as we defined in the map file) local x = tonumber(getElementData(gate,"newPosX")) local y = tonumber(getElementData(gate,"newPosY")) local z = tonumber(getElementData(gate,"newPosZ")) -- move the gate moveObject(gate,1500,x,y,z) -- get the original position x = tonumber(getElementData(gate,"posX")) y = tonumber(getElementData(gate,"posY")) z = tonumber(getElementData(gate,"posZ")) -- set a timer to close the gate in 5 seconds setTimer(moveObject,5000,1,gate,1500,x,y,z) end end )
  6. Hi.. I downloaded a lot of versions off RCG but no one works Most of the times i click checkpoint and than i get the same window as if i click on the track icon can someone help me?
  7. Eelke

    MTA Crashes

    I installed new driver i deleted the d3d9 file and i reinstalled GTA but nothing works My OS is: Windows 7 Home Premium 64 Bits
  8. Eelke

    MTA Crashes

    When i start mta and choose a server it loads to the half and than my whole pc is stuck What do i need to do? Greetz Eelke
  9. Eelke

    AddClothes

    i just need to know what the type is from the shirt shoes and more
  10. Eelke

    AddClothes

    But i was on my own server and in the f9 menu it says under freeroam that there is a /ac command
  11. Eelke

    AddClothes

    Hi If i try to use the command it doesnt work i type /ac Torso vest vest but it doesnt work? what is the model of it? and how can i find?
  12. This is my meta file: <meta> <info author="Eelke" type="script" name="My Server" description="Garages" /> <script src="script.lua" /> </meta> And this is my script.lua file GARAGE_ID = 18 -- create a collision shape and attach event handlers to it when the resource starts addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(1337, 194, 28, 6, 10, 4) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(GARAGE_ID)) then -- open the door setGarageOpen(GARAGE_ID, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(GARAGE_ID)) then -- close the door setGarageOpen(GARAGE_ID, false) end end end But it doesn't open..
  13. I totally can not script.. So i don't understand how to do it..
  14. But, what has the file where i can find that code, or how do i need to name the file?
  15. Hi, how can i put a code on a garage so i can open it? Greetz Eelke
×
×
  • Create New...