Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Zakna, lo que yo le dije es mas bien lo que vos decis, pero distinto.
  2. Zakna, mas bien, lo que el usuario esta preguntando es como aprender a programar/scriptear.
  3. What the... is that? Edit: Oh, i see, a library to make things easier for newbies
  4. I would remove this resource, https://community.multitheftauto.com/index.php?p= ... ls&id=1955 nothing at it is from him, and also contains at least 3 car mods.
  5. Castillo

    gta 3 img

    That's right, but that has nothing to do with gta3.img as far as i know.
  6. I think you don't know how MTA scripting system works, right? there's no such function, teleport2:setExitAngle(0) teleport2:keepVelocityOnExit() teleport2:addHandler(hitTeleport) teleport3:setExitAngle(0) teleport3:keepVelocityOnExit() teleport3:addHandler(hitTeleport2) I don't know where you got this from, but it's epicly incorrent o,o. try learning some stuff from the wiki. https://wiki.multitheftauto.com/wiki/Main_Page
  7. You should use xmlUnloadFile after saving it! if i'm right it can cause problems.
  8. Why do you need such thing? you could easily use element data and then loop with every pickup. --client side addEventHandler("onClientClick", getRootElement(), function (button, state, ax, ay, wx, wy, wz) if state=="up" and button=="left"then triggerServerEvent("onPickupBiznesCreate",getLocalPlayer(), wx, wy, wz) end end) function endBiznesCreation() for i,v in pairs(getElementsByType("pickup")) do if getElementData(v,"text") then local px, py, pz = getElementPosition (getLocalPlayer()) local wx, wy, wz = getElementPosition(v) dist = getDistanceBetweenPoints3D ( px, py, pz, wx, wy, wz ) if dist < 20.0 then local x, y = getScreenFromWorldPosition ( wx, wy, wz ) if x then dxDrawText("Biznes",x,y+2,x+2,y,tocolor(0,0,0),1,"default-bold","center","center") dxDrawText("Biznes",x,y,x,y,tocolor(49,140,231),1,"default-bold","center","center") end end end end end addEventHandler("onClientRender",getRootElement(),endBiznesCreation) --server side function pickupBiznes(wx, wy, wz) pickup = createPickup(wx,wy,wz,3,1273) setElementData(pickup,"text",true) end addEvent("onPickupBiznesCreate", true) addEventHandler("onPickupBiznesCreate", getRootElement(), pickupBiznes) Should work (not tested)
  9. Castillo

    admin

    Well, firstly, you need to create your ACL groups, Admin1, Admin2, etc, and then you can easily script this. Level10list = "" Level9list = "" Level8list = "" Level7list = "" function createAdminList() Level10list = "" Level9list = "" Level8list = "" Level7list = "" for k, v in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(v)) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin")) then Level10list = Level10list .. " " .. getPlayerName(v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin9")) then Level9list = Level9list .. " " .. getPlayerName(v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin8")) then Level8list = Level8list .. " " .. getPlayerName(v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin7")) then Level7list = Level7list .. " " .. getPlayerName(v) end end end end function adminList(sourcePlayer) createAdminList() if (Level10list == "") then outputChatBox("There is no level 10 Admins !", sourcePlayer, 255, 0, 0 ) else outputChatBox("Admins Level 10 : " .. tostring(Level10list), getRootElement (), 255, 255, 0, true) end if (Level9list == "") then outputChatBox("There is no level 9 Admins !", sourcePlayer, 255, 0, 0 ) else outputChatBox("Admins Level 9 : " .. tostring(Level9list), getRootElement (), 255, 255, 0, true) end if (Level8list == "") then outputChatBox("There is no level 8 Admins !", sourcePlayer, 255, 0, 0 ) else outputChatBox("Admins Level 8 : " .. tostring(Level8list), getRootElement (), 255, 255, 0, true) end if (Level7list == "") then outputChatBox("There is no level 7 Admins !", sourcePlayer, 255, 0, 0 ) else outputChatBox("Admins Level 7 : " .. tostring(Level7list), getRootElement (), 255, 255, 0, true) end end function checkCommand ( message, messageType ) if ( messageType == 0 ) then if ( message == "!admins" ) then setTimer( adminList, 100, 1, source ) end end end addEventHandler ( "onPlayerChat", getRootElement(), checkCommand ) Should work, it is server side.
  10. Aren't the DFF file(s) model(s)?
  11. Well, those aren't too much changes (there could be more, like: mini games, colours added, and so on)
  12. I'am Chaos District scripter, and we're working hard on it, trying to make a perfect server.
  13. Castillo

    gta 3 img

    It doesn't detects for mods such as vehicles...
  14. lol, sorry, i forgot to edit something, copy again the code.
  15. Castillo

    2 things.

    That still in developement by someone, if i'm right.
  16. Castillo

    Race Stats

    Usually when we say "SQL" we're referring to "SQLite"
  17. You are right Citizen, i forgot about that
  18. Castillo

    2 things.

    Colshapes are very easy to draw, and no, there isn't any resource to draw them.
  19. Well, bindKey in server side is different than client side. ambulances = { [416]=true } perso = { ["urgences"]=true } addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function () for i,v in pairs(getElementsByType("player")) do bindKey(v,"num_1","down",sirenAmu1) end end) -- sirenes ambu function sirenAmbu1 ( player ) local commandant = getPedOccupiedVehicle(player) if ( ambulances[getElementModel(commandant)] ) and ( perso[getTeamName(getPlayerTeam( player ))] ) then triggerClientEvent ( "sirenAmbu1", getRootElement(), commandant ) end end Try it (not tested)
  20. Try this, function buildWindow() mainWindow = guiCreateWindow(getX(25), getY(25), getX(50), getY(50), "Double-click a destination!", false) guiWindowSetSizable(mainWindow,false) guiWindowSetMovable(mainWindow,false) guiSetVisible(mainWindow, false) taxiGridList = guiCreateGridList(getX(1), getY(2), getX(48), getY(47), false, mainWindow) guiGridListSetSortingEnabled ( taxiGridList, false ) guiGridListAddColumn(taxiGridList,"ID",0.05) guiGridListAddColumn(taxiGridList,"Description",0.-- s8) --> guiGridListAddColumn(taxiGridList,"Rate",0.13) addEventHandler( "onClientGUIDoubleClick", taxiGridList, submitTaxi, false) end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), buildWindow) function toggleTaxiWindow() if (guiGetVisible(mainWindow) == true) then guiSetVisible(mainWindow, false) showCursor(false) guiGridListClear(taxiGridList) else guiSetVisible(mainWindow, true) showCursor(true) triggerServerEvent("requestDestinations",getLocalPlayer()) end end bindKey("F2","down",toggleTaxiWindow) --Accepts the info from the server, adds to the gridlist. Event isnt triggered by this function. function populateGridList(id, name) local row = guiGridListAddRow(taxiGridList) guiGridListSetItemText ( taxiGridList, row, 1, tostring(id), false, false ) guiGridListSetItemText ( taxiGridList, row, 2, tostring(name), false, false ) guiGridListSetItemText ( taxiGridList, row, 3, "$1 / 20 KM", false, false ) end addEvent("receiveDestinations", true) addEventHandler("receiveDestinations", getRootElement(), populateGridList) function submitTaxi( button, state, sx, sy, x, y, z, elem, gui ) if ( source == taxiGridList and state == "down") then destId= guiGridListGetItemText (taxiGridList, guiGridListGetSelectedItem (taxiGridList), 1) outputChatBox(tostring(destId)) end end
  21. Castillo

    Maps <_<

    You could make a global variable with the map name and then stop it when another one starts.
  22. Quitale la IP del mtaserver.conf no es necesaria y puede causar errores, ademas checkea si tienes los puertos abiertos.
  23. Hola y bienvenido al foro! Yo aprendi en la wikipedia (aprendi ingles en el mta primero ), aca te dejo un link a la wiki en español (no esta todo traducido claro, pero algo es ) https://wiki.multitheftauto.com/index.ph ... _Principal
  24. It depends on which scoreboard do you use, there are two so far, normal scoreboard and dxscoreboard (this one allows colours by default) You can get it here: https://community.multitheftauto.com/index.php?p= ... ils&id=419
×
×
  • Create New...