Jump to content


  • Posts

  • Joined

  • Last visited


About Dziugasc

  • Birthday 22/08/2002


  • Location
    Compton, Lithuania

Recent Profile Visitors

2,473 profile views

Dziugasc's Achievements

Punk-@ss B*tch

[email protected] B*tch (12/54)



  1. It does not output in chat EDIT: It works if I add event such as onMarkerHit, so it means anEvent doesnt work 2#, It also returns outputChatBox("you have to play:"..money); money nil value
  2. Basically, I want to make a car performance tuning shop with scrollbars, and I am at point where gui shows getOriginal Something like this, and when player clicks buy, it would close window and take away money and finally setVehicleHandling with my written formula. Also, I would want to save handlings to database, but for now I try with elementData. And my script fails where I want to transfer vMax or accelaration value from client to server (vehicle speed is defined as 240+232=472 as a number, but as a string in GUI) I think all problems is in ElementData place, and doesn't save speed value to elementData, I have pretty much 0experience in ElementData. Now I am trying: Client function clickHandling( ) if (source == button3) then guiSetVisible (window1, not guiGetVisible ( window1 ) ) showCursor(false) setElementFrozen ( theVehicle, false ) local vMax = tonumber(getVehicleOriginalProperty( theVehicle, "maxVelocity" )+math.round(guiScrollBarGetScrollPosition( scrollbar1 )*tonumber(getVehicleOriginalProperty( theVehicle, "maxVelocity" ))/207*2 )) local money = tonumber(guiGetText(label13)) -- triggerServerEvent('anEvent',localPlayer) -- triggerServerEvent('anEvent',localPlayer,vMax) end end addEventHandler ( "onClientGUIClick", resourceRoot, clickHandling) addEvent("getPrice",true) addEventHandler("getPrice", resourceRoot, clickHandling) Server function getSelectedHandling(thePlayer) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if getElementType(thePlayer) ~= "player" then return end if theVehicle then triggerClientEvent ( thePlayer , "onClientGUIClick" , theVehicle ) outputChatBox("you have to pay:"..money) else outputChatBox ( "You do not have a Vehicle!", thePlayer, 255, 0, 0, true ) end end addEvent("anEvent", true) addEventHandler ( "anEvent", resourceRoot, getSelectedHandling) I am pretty confused right now. serverside seems not to be working
  3. Hello, Basically today I wanted to finish my car performance tuning system, and I have few problems. When I start resource, it searches for vehicle that player is occupied and only runs once, so basically if player left/wasn't in car performance tuning wont work, or if vehicles were changed it will say oldCar Perfomance Tuning and will show oldCar getVehicleOriginalProperty, not new one that player is in. I tried many ways, but couldn't get working transfer of tonumber(guiText) from client to server. CLIENT local theVehicle = getPedOccupiedVehicle(localPlayer) window1 = guiCreateWindow(475, 225, 416, 309, getVehicleName( theVehicle ).." VAŽIOKLĖS TUNINGAS", false) --.................................................. addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if (source == button3) then guiSetVisible (window1, not guiGetVisible ( window1 ) ) showCursor(false) local label = tonumber(getVehicleOriginalProperty( theVehicle, "maxVelocity" )+math.round(guiScrollBarGetScrollPosition( scrollbar1 )*tonumber(getVehicleOriginalProperty( theVehicle, "maxVelocity" ))/207*2 )) local money = tonumber(guiGetText(moneyLabel)) if getElementType(localPlayer) ~= "player" then return end if getPlayerMoney(localPlayer) >= money then takePlayerMoney ( money ) setElementFrozen ( theVehicle, false ) setElementData ( theVehicle, "maxVelocity", label) else outputChatBox("[error] No money") setElementFrozen ( theVehicle, false ) end end end ) SERVER I tried using getElementData, but it doesnt work function getHandling(theVehicle) local data = getElementData( theVehicle, "maxVelocity" ) outputChatBox( tostring(data) ) end addCommandHandler("get",getHandling) function setHandling(theVehicle) --setVehicleHandling ( theVehicle, "maxVelocity", label) outputChatBox(tostring(data)) end addCommandHandler("set",setHandling) I am trying to solve this whole morning, in future if I can I want to make this work with database to save vehicle handling to players account(garage)
  4. Hello, I am dealing with this problem for 5+ hours, basically it works without team 100%, but with teams only 1st line in table teams works, if for example if I remove Truckers, only Police works and so on. local teams = { --{"team",x,y,z,rotation,skinid, weapon1, weapon2, weapon3} {"Truckers",-2057.91650, -236.21437, 35.32031,0,206,22,25,5}, {"Police",-1636.95337, 691.31042, 7.16481,0,280,22,25,3}, {"Mafia",-2306.69556, 277.60596, 35.36875,0,126,30,28,24} } local guestSpawns = { --{x,y,z,rotation,skinid} {-1794.5,1212.2,32.7,0}, {-2519.6001, 1216, 37.4, 0}, {-1645, 1202.4, 32.9, 0}, {-1592.9, 1271.6, 7.2, 0}, {-1481.1, 686, 1.3, 0}, {-1747.5, 210.89999, 3.6, 0}, {-2031.1, -52.7, 35.4, 0}, {-2678.2, -280.10001, 7.2, 0}, {-2582.7, 319.5, 5.2, 0}, {-2749.3994, -48.90039, 6.8, 0}, {-2443.1001, 752, 35.2, 0}, {-2154.1001, -421.70001, 35.3, 0}, {-2238.8999, 112.5, 35.3, 0}, {-2197.3999, 288.39999, 35.3, 0} } function getRandomSpawnpoint() randomNum = math.random(#guestSpawns) return randomNum end function spawnOnWasted() cancelEvent() fadeCamera(source, true) local num = getRandomSpawnpoint() local ammo = 1000 local playerTeam = getPlayerTeam(source) -- source is the player who died onPlayerWasted local teamName = getTeamName(playerTeam) -- we get the team name for _, v in pairs(teams) do if teamName == v[1] then local thePlayer = source return setTimer(function() -- we return this spawnPlayer(thePlayer ,v[2],v[3],v[4],v[5],v[6],0,0,playerTeam) giveWeapon(thePlayer , v[7],ammo,false) giveWeapon(thePlayer , v[8],ammo,false) giveWeapon(thePlayer , v[9],ammo,false) end,2000,1) -- if it doesn't match (the player has no team or not specified team inside team table else for i,source in ipairs(getElementsByType("player")) do return setTimer(function() spawnPlayer(source,guestSpawns[num][1],guestSpawns[num][2],guestSpawns[num][3],guestSpawns[num][4],guestSpawns[num][5],0,0,playerTeam) -- giveWeapon(source, weapon,ammo,false) end,2000,1) end end end -- if player is in team but doesnt have spawnpoint use general spawnpoint end addEventHandler("onPlayerWasted", root,spawnOnWasted)
  5. Hello, I want to make camera animation when player dies, he respawns and camera starts above him. I tried using this code: function deathcinema() local x1,y1,z1 = getElementPosition( LocalPlayer ) local smoothMoveCamera ( x1, y1+10, z1, x1, y1, z1, x1, y1, z1, x1+5, x1, z1, 20000 ) end addCommandHandler("test", deathcinema) but nothing happens if I type command "test", and then when I use addEventHandler with OnPlayerWasted and it acts same.
  6. damn, these looks nice all objects are default?
  7. Hello, so I got this Playtime script and problem is that it counts time only for 1player and I cant find any solution to it Server.lua
  8. I agree with people who say this is garbage, I played a bit and most of scripts are just made by OwlGaming, I dont quite see any originality in scripts. But worst part that noone is friendly in server
  9. there is no Event Handler https://wiki.multitheftauto.com/wiki/OnPlayerWasted
  10. If Accounts are in SQL, that means you might not enter right admin Username, so it can't give administrator permissions on login, try going to ACL.xml in Server and search for Admin group and see what accounts are in admins group.
  11. Hello, Today I started making my own turf (colshape) system for gangs to capture. But, I really confused in few things: I want make turf system with requiredMembers to Capture, for example bigger turf more player it needs. Also every player would have a timer, which it was in turf and if he dies or leaves the turf it decreases time from total capturing time, for example time is 4:31 and 1player leaves turf and it increases time to 5:01 and then he rushes back to turf and then it decreases time by 30seconds (time it was in turf) No Military vehicles like Hydra, SS, Rhino or Hunter can shoot in capturing zone until it finishes. It would notify enemy gang if it's turf is being capturing and would display timer on top, Other gangs couldn't kill neither Attacker or Defender because it would be Teaming with another gang which is not fair. Attack Defend There would be 5types of Turfs Huge - it would require 5people to capture turf and hourly payment for every would be 100k to Gang Bank. ( 8 minutes) Big - 4 People and it would give 70k hourly ( 6:30 minutes) Normal - 3 People 40k (5 minutes) Little - 2 People and 25k (3 Minutes) Base - It would require 3players and it would be where gang could buy stuff from Gang Bank (6Minutes) I had never made turf system, so I dont know what things to use, and need your help.
  12. It looks really great.
  13. Hello, I spent few hours trying to fix my code, but it didn't work for me CODE: (client) local skins = {7,124,69} addEvent( "PlayerCharacterSelection", true) local spawnPed = createPed ( 7, -1969.93103, 158.23845, 27.68750 , 180 ) local PedDimension = setElementDimension(spawnPed,2) setPedAnimation(spawnPed, "DANCING", "dnce_M_c") function setCameraOnClothes() setCameraMatrix( -1969.69775, 155.04910, 26.78750, -1970.17273, 162.80780, 29.77750) end addCommandHandler( "PlayerCharacterSelection", setCameraOnClothes) function pedRotateE ( ) local rotX, rotY, rotZ = getElementRotation(spawnPed) setElementRotation(spawnPed,0,0,rotZ+10,"default",true) end addCommandHandler ( "e", pedRotateE ) function pedRotateQ ( ) local rotX, rotY, rotZ = getElementRotation(spawnPed) setElementRotation(spawnPed,0,0,rotZ-10,"default",true) end addCommandHandler ( "q", pedRotateQ ) function bindTheKeys () bindKey ( "mouse_wheel_down", "down", pedRotateQ ) bindKey ( "mouse_wheel_up", "down", pedRotateE ) end addEventHandler ( "onClientResourceStart", root , bindTheKeys ) function getSelectedSkin( ) local selectedSkin = skinTable[skins] return selectedSkin end function setPedSkin2() local selectedSkin = GetSelectedSkin setElementModel(spawnPed,selectedSkin) end function changeSkin() skins = skinTable totalSkins = #skinTable selectedSkin = 7 setPedSkin2() end function selectNextSkin() if selectedSkin == totalSkins then selectedSkin = 7 else selectedSkin = selectedSkin+1 setPedSkin2() end end addCommandHandler("next", selectNextSkin) function selectPrevSkin() if selectedSkin == totalSkins then selectedSkin = 7 else selectedSkin = selectedSkin-1 setPedSkin2() end end addCommandHandler("prev", selectPrevSkin)
  14. So, basically I downloaded Drift Paradise project from github, and noticed some missing stuff, and I tried fixing it for a while but couldn't do anything. Problem is that I can't apply vinyls,decals on cars, many people told I need to unwrap UV but I don't know how to properly do it and tutorials don't really help in this case. any help would be appreciated.
  • Create New...