Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. sayRadius = 50 function sayHandler(message, msgType) local sender = getPlayerName(source) local posX, posY, posZ = getElementPosition(source) saySphere = createColSphere( posX, posY, posZ, sayRadius ) nearbyPlayers = getElementsWithinColShape( saySphere, "player" ) destroyElement( saySphere ) for index, nearbyPlayer in ipairs( nearbyPlayers ) do outputChatBox(""..sender.." dit : "..message.."", nearbyPlayer, 255, 255, 255, true) end end addEventHandler( "onPlayerChat", getRootElement(), sayHandler )
  2. Wei

    Acl Team

    You're welcome
  3. This is hard script, it would take some time to edit it and make it bugfree. Setting zombie to another dimension is easy, but to you must get dimension of player too. I don't realy have time to edit it
  4. You may need to use shaders as far I checked on forum...
  5. If you have zombies, you must find how peds(zombies) are made, and then when the are made to they change the dimension to 2. You may need to edit whole script to get it working...
  6. If you start play gamemode, you will be able to do that or function spawnJoin () spawnPlayer (source, 0, 0, 5, 0, math.random (0,288), 0, 0) -- you may need to change that fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("onPlayerJoin", getRootElement(), spawnJoin)
  7. you can use camera like from wiki example setCameraMatrix function setCameraOnPlayerJoin() -- slowly fade the camera in to make the screen visible fadeCamera(source, true, 5) -- set the player's camera to a fixed position, looking at a fixed point setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) or/and you can use server sided text functions as this example here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=57111&p=550949p550949
  8. You must modify resource and add setElementDimension(zombie, dimensio)
  9. Wei

    fetchRemote

    Thanks I will try
  10. local sWidth, sHeight = guiGetScreenSize() local Width,Height = 445,445 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) rulesWindow = guiCreateWindow(X,Y,Width,Height,"Rules",false) guiWindowSetMovable(rulesWindow,false) guiWindowSetSizable(rulesWindow,false) rulesLabel = guiCreateLabel(10,25,425,359,[[ Welcome to my mta server! Please carefully read the rules before accepting. By accepting the rules, you are agreeing to play by them. Anyone caught breakin these rules will be kicked and/or banned from this server. 1: No cheating. 2: No bug abuse. 3: No mods to your game. 4: No flaming. 5: Respect other players. 6: Be nice!]],false,rulesWindow) guiLabelSetHorizontalAlign(rulesLabel,"center",true) guiSetVisible(rulesWindow, false) function showHelp () if (guiGetVisible(rulesWindow)) then guiSetVisible(rulesWindow, false) else guiSetVisible(rulesWindow,true) end end bindKey ("F2", "down", showHelp) --// binding that on resource start is not needeed anyways this was the problem visableOrNot = guiSetVisible (rulesWindow)
  11. Wei

    fetchRemote

    I've made a car mod downloader, but when player is downloading mods it uses all of his download and it starts to lagg (high ping, impossible to play) how can I reduce that download does not use all of player brandwitch. I am using fetchRemoteto download mods
  12. local x, y = guiGetScreenSize() local yourXresolution, yourYresolution = 1280, 1024 --// Change that to your resolution local sx, sy = (x/yourXresolution), (y/yourYresolution) function showGUI() dxDrawRectangle(sx*628.0,sy*309.0,664.0,498.0,tocolor(0,0,0,210),false) dxDrawRectangle(sx*779.0,sy*374.0,496.0,414.0,tocolor(90,134,255,180),false) dxDrawRectangle(sx*779.0,sy*348.0,86.0,26.0,tocolor(90,134,255,180),false) dxDrawRectangle(sx*628.0,sy*258.0,664.0,51.0,tocolor(90,134,255,210),false) dxDrawImage(sx*871.0,sy*272.0,178.0,27.0,"report.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end
  13. I just added event, I didn't look carefuly
  14. You can also use sha512 encryption with mabako sha module, or intergrated sha256 function...
  15. This code is wrong ... txd engineLoadTXD ( string txd_file [, bool filteringEnabled = true ] ) bool engineReplaceModel ( dff theModel, int modelID [, bool alphaTransparency = false ] )
  16. function replaceModel() txd = engineLoadTXD ( "bobcat.txd" ) engineImportTXD ( txd, 422) dff = engineLoadDFF ( "bobcat.dff", 422) engineReplaceModel ( dff, 422) end addEventHandler("onClientResourceStart", resourceRoot, replaceModel) That should work
  17. function replaceModel() txd = engineLoadTXD("bobcat.txd", 422 ) engineImportTXD(bobcat.txd, 422) dff = engineLoadDFF("bobcat.dff", 422 ) engineReplaceModel(bobcat, 422) end addEventHandler("onClientResourceStart", resourceRoot, replaceModel)
  18. Wei

    SQLite

    v["id"] should be v["ID"]
  19. Wei

    SQLite

    Gues not then, I did it with mysql connection and everything worked fine, so it's working now ?
  20. Wei

    SQLite

    I think that dbQuery should work
×
×
  • Create New...