Jump to content

Axel

Members
  • Posts

    521
  • Joined

  • Last visited

Everything posted by Axel

  1. function joinHandler() local x = 1959.55 local y = -1714.46 local z = 10 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) addEventHandler ("onPlayerWasted",getRootElement(), function(totalammo,killer,killerweapon,bodypart,stealth) if getElementData(source,"account") ~= "none" then local x,y,z = getElementPosition (source) local sf = getDistanceBetweenPoints3D (x,y,z,-2655.16,639.467,14.4545) local lv = getDistanceBetweenPoints3D (x,y,z,1607.23,1816.24,10.82) local ls = getDistanceBetweenPoints3D (x,y,z,2035.995,-1403.73,17.27) if (sf < lv) then if (sf < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.16,639.467,14.4545,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.995,-1403.73,17.27,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) end else if (lv < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.23,1816.24,10.82,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.995,-1403.73,17.27,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) end end end end)
  2. Axel

    Help..

    function joinHandler() local x = 1658 local y = -2288 local z = -1 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outPutChatBox("Script Testing", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function createVehicleForPlayer(thePlayer, command, vehicleModel) local x,y,z = getElementPosition(thePlayer) x = x + 3 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) if (createdVehicle == false) then outPutChatBox("Your vehicle was not created.",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer)
  3. Axel

    Error

    I installed MTA on my wubi Linux and i get this error when i try to play Error Could not find loader dll at \host\Games\MTA Linux\mta\loader.dll
  4. Axel

    A error

    I installed MTA on my wubi Linux and i get this error when i try to play Error Could not find loader dll at \host\Games\MTA Linux\mta\loader.dll
  5. Is there a way to write the Ped's name on his head? Like in this picture: I'm using: taxiped3 = createPed(187,2568,1418,12,0) setPedRotation(taxiped3,90)
  6. I really want to open my server.. There are no other way right?
  7. No i don't have access to it becouse it's Defeault Gateway is 0.0.0.0!
  8. I posted a image, and the firewall is off.. Can someone help me?
  9. My Defeault GateWay is 0.0.0.0 and i can't open..
  10. Yes i did that, i connected on LAN but it is not on server browser, none can join, neighter download..
  11. What you mean by opening the server? It is working on LAN but other players can't connect...
  12. I tested opening ports and: Port 22126 UDP is closed. Players can not browse! Port 22003 UDP is closed. Players can not join! Port 22003 TCP is closed. Players can not download!
  13. If i don't have a Router but i have a Modem is there a way to start server using the modem?
  14. Axel

    Gang Creation

    I want to check if thePlayer entered the area, i used isInsideRadarArea and it does not work. function isElementInsideRadarArea(thePlayer,radar) local X,Y = getElementPosition(thePlayer) return isInsideRadarArea(radar,X,Y) outPutChatBox("Test",255,0,0) end
  15. Axel

    Gang Creation

    Is there a way to make like /creategang King 255 0 0 and to create a Gang with Name King and turf color red?
  16. Axel

    Gang Creation

    Thank you very much. I am still learning lua and i'm making stupid mistakes:D
  17. Axel

    Gang Creation

    Thanks. But now i am creating a truf in a zone and it does not appear. radar = createRadarArea(2444,-1720,100,100) color = setRadarAreaColor(radar,255,255,0,0) function createCommand ( thePlayer, command,gangname ) setElementData(thePlayer,"gang",gangname) g= getElementData(thePlayer,"gang") outputChatBox ("The gang "..g.." has been sucessfuly created!", thePlayer, 255, 0, 0, false ) end addCommandHandler ( "creategang", createCommand ,gangname) Should i use createColRectangle too?
  18. Axel

    Gang Creation

    So i made a command to create a gang using setElementData. But it will create a gang only named "King", how can i make to create a gang i want. Like /creategang Kingdom creates gang Kingdom. function createCommand ( thePlayer, command,gangname ) setElementData(thePlayer,"gang","King") g= getElementData(thePlayer,"gang") outputChatBox ("The gang "..g.." has been sucessfuly created!", thePlayer, 255, 0, 0, false ) end addCommandHandler ( "creategang", createCommand ,gangname)
  19. So i want to stop the spraycan damage. Is there a MTA function for such a script?
  20. Axel

    Save Car Position

    Does somebody knows how to save the car position?
  21. I want to save car position after logout/login and using the funciton Spawn to spawn at the location it is: function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("You haven't got a car.", source, 255, 0, 0) end else outputChatBox ("You're already in a car!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn)
  22. vehiclesystem+carshops : https://community.multitheftauto.com/index.php?p= ... ls&id=2603 Seems that the + sign makes a 404 error at the download. Thanks
  23. I uploaded again without the "+". Thank You very much.
×
×
  • Create New...