DREFTHUN

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

1 Neutral

About DREFTHUN

  • Rank
    Square
  • Birthday 07/07/2002

Recent Profile Visitors

317 profile views
  1. DREFTHUN

    Help with custom chat commands

    Thank you IIYAMA! Your reply was helpful! ShayF Yeah, it's good, but when I want to type like /mute DREFTHUN 34 that script won't seperate the arguments. Anyway, thanks! I'm all good now.
  2. DREFTHUN

    Help with custom chat commands

    I made a custom chat, and I made it to recognize commands by using if string.sub(guiGetText(chatGUI),1,1) == "/" then It's all good, but then I can't get the arguments server side. Like when I type /mute Player12 30, I don't know how to seperate them, in 2 arguments. I just need a little help to get started with.
  3. I can script almost anything you want. You just need to go here: https://selly.gg/@DREFT (All information about the scripts are here) Here, you can select which service you want, you are going to get a file called TS3.txt, and you just have to join my TS3 server with the IP you can find in the file, and we can discuss your order. (I'm not always online. If I'm not online, you can use selly.gg to contact me!) You can use coupon 'MTAFORUM' for a 15% discount on every product (Limited to 50 people)
  4. I can script almost anything you want. You just need to go here: https://selly.gg/@DREFT (All information about the scripts are here) Here, you can select which service you want, you are going to get a file called TS3.txt, and you just have to join my TS3 server with the IP you can find in the file, and we can discuss your order. (I'm not always online. If I'm not online, you can use selly.gg to contact me!) You can use coupon 'MTAFORUM' for a 15% discount on every product (Limited to 50 people)
  5. DREFTHUN

    Add exceptions to the "max players"

    It won't do the trick better. The method I wrote down is easier then almost anything else. And check out the edited script too.
  6. DREFTHUN

    Add exceptions to the "max players"

    MaxPlayers = 48 allowedSerials = { [""]=true, } function playerJoinKick() serial = getPlayerSerial(source) if not allowedSerials[serial] and getPlayerCount() >= MaxPlayers then kickPlayer(source, "Console", "You tried joining in a reserved slot!") end end addEventHandler("onPlayerJoin", root, playerJoinKick) setTimer(function() if getPlayerCount() >= MaxPlayers then setMaxPlayers(getPlayerCount() + 1) else setMaxPlayers(MaxPlayers) end end,50,0) Try this.
  7. DREFTHUN

    Ped entering passenger seat.

    I want to do a Taxi Job on my server, but I can't get it to work. Is there any way to use the enter_passenger control on Peds? --Server taxiNPCk = {} function warpTaxiNPCInTaxi(player, skin, name, vehicle) taxiNPCk[player] = createPed(skin, 0, 0, 0) setElementData(taxiNPCk[player], "pedname", name) warpPedIntoVehicle(taxiNPCk[player], vehicle, math.random(2,3)) end addEvent("warpTaxiNPCInTaxi", true) addEventHandler("warpTaxiNPCInTaxi", root, warpTaxiNPCInTaxi) --Client NPCnevek = { {"Tom"}, {"Patrik"}, } NPCskinek = { {21}, {22}, {23}, } taxiNPCkLS = { {1173.0035400391, -1274.3172607422, 13.546875, 180}, {1313.7718505859, -1389.6131591797, 13.518327713013, 180}, } function taxiRender() if not isPedInVehicle(localPlayer) then return end x, y, z = getElementPosition(localPlayer) x1, y1, z1 = getElementPosition(taxiNPC) distance = getDistanceBetweenPoints3D(x, y, z, x1, y1, z1) outputChatBox(distance) if distance < 7 then ottVan = true end if ottVan then setPedRotation(taxiNPC, findRotation(x1, y1, x, y)) setControlState("handbrake", true) setPedControlState(taxiNPC, "forwards", true) setPedControlState(taxiNPC, "walk", true) if distance < 2.3 then triggerServerEvent("warpTaxiNPCInTaxi", localPlayer, localPlayer, getElementModel(taxiNPC), getElementData(taxiNPC, "pedname"), getPedOccupiedVehicle(localPlayer)) destroyElement(taxiNPC) setControlState("handbrake", false) toggleAllControls(true, true, true) removeEventHandler("onClientRender", root, taxiRender) ottVan = false setPedControlState(taxiNPC, "forwards", false) setPedControlState(taxiNPC, "walk", false) end end end function taxiSpawnNPC() if isElement(taxiNPC) then destroyElement(taxiNPC) end random1 = math.random(1, #taxiNPCkLS) random2 = math.random(1, #NPCnevek) random3 = math.random(1, #NPCskinek) taxiNPC = createPed(NPCskinek[random3][1], taxiNPCkLS[random1][1], taxiNPCkLS[random1][2], taxiNPCkLS[random1][3]) outputChatBox("-- Taxi NPC Spawned --") outputChatBox(" -Skin: "..NPCskinek[random3][1]) outputChatBox(" -Position (X, Y, Z): "..taxiNPCkLS[random1][1]..", ".. taxiNPCkLS[random1][2]..", ".. taxiNPCkLS[random1][3]) setPedRotation(taxiNPC, taxiNPCkLS[random1][4]) outputChatBox(" -Rotation: "..taxiNPCkLS[random1][4]) setElementData(taxiNPC, "pedname", NPCnevek[random2][1].." #7cc576(Pedestrian)") outputChatBox(" -Name: "..NPCnevek[random2][1].." #7cc576(Pedestrian)",255,255,255,true) addEventHandler("onClientRender", root, taxiRenderTeszt) end taxiSpawnNPC() function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end This is good enough too, but if possible, I would like to use the enter_passenger.
  8. DREFTHUN

    dxDrawText cropping

    Love you mate Tho you messed it up a little. dxDrawText("Test text please work already", 0, sy/2-15, startXTest, sy/2+15,tocolor(0,0,0,255),1,"arial","left","center",true,false,false) Thanks anyway Liked :DD
  9. DREFTHUN

    dxDrawText cropping

    Hey guys! I need help with dxDrawText cropping, cause I just can't get it to work. I used these lines of code startXTest = 0 function renderTest() sx, sy = guiGetScreenSize() startXTest = startXTest + sx/1000 if startXTest > sx then startXTest = 0 end dxDrawRectangle(startXTest, sy/2-15,3,30) dxDrawText("Test text please work already", 0, sy/2, startXTest+30, sy/2,tocolor(255,255,255,255),1,"arial","left","center",true,false,false) end addEventHandler("onClientRender", root, renderTest) but the only thing I get is... It should display the text within the line, shouldn't it? What should I do? Please help!
  10. DREFTHUN

    Dimension bug

    I use this: function getPos() x, y, z = getElementPosition(localPlayer) rot = getPedRotation(localPlayer) int = getElementInterior(localPlayer) dim = getElementDimension(localPlayer) position = x .. ", ".. y .. ", ".. z outputChatBox(position) outputChatBox("Rot: "..rot) outputChatBox("Int: "..int) outputChatBox("Dim: "..dim) setClipboard(position) end addCommandHandler("getpos", getPos) It is client-sided, and it still returns the dimension I gave... And no debug errors... Not even warnings... I tried even reinstalling the server, and everything... Just in case, I added that code to my script, to see what happens. http://kephost.com/image/wlEg Got the source of the problem! Gonna change hostings now! Thank you for your help anyways!
  11. DREFTHUN

    How to create anti-gravitygun script?

    Than I'm sorry, I don't know what to do
  12. DREFTHUN

    How to create anti-gravitygun script?

    --Clientside: if getElementData(getPedTarget(localPlayer), "antigravitygun") then return end --It has to look like this: if isElement(ggun_obj) and isTimer(buildupTimer) then --(Row: 30) if not isElement(ggun_obj) then ggun_obj = getPedTarget(localPlayer) end --(Row: 31) if getElementData(getPedTarget(localPlayer), "antigravitygun") then return end --(Row: 32) Though, others can still lift the vehicle you are sitting in.
  13. DREFTHUN

    How to create anti-gravitygun script?

    That just disables it for you.
  14. DREFTHUN

    Dimension bug

    Here is a video demostrating my problem: My friend doesn't disappear, he just gets desynced... function setdim(thePlayer, cmd, targetPlayer, num) num = tonumber(num) targetPlayer = getPlayerFromName(targetPlayer) setElementDimension(targetPlayer, num) outputChatBox("Succesfully set dimension to "..num,root, 255, 255, 255, true) end addCommandHandler("setdim", setdim, false, false)
  15. DREFTHUN

    How to create anti-gravitygun script?

    No problem!