• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Puma

  • Rank
    Red-Headed Stepchild
  • Birthday 06/11/1991


  • Location
    The Netherlands
  • Interests
    GTA, modding, MTA, music

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Modeling in SketchUp can be a bitch, but if you know what to do to create models that don't bug ingame (and SU is quite famous for that) AND you know how to create proper models at all, it can be a very handy programme. I have never used programmes other than SketchUp for moddeling and was able to create mods varying from vehiclemods to skinmods and mapmods ( http://www.gtagarage.com/mods/results.php?S=1152437 ). I'm not posting this to promote my mods, I just want to disprove the idea that Sketchup is not a good programme for GTAModding. At the end of the road you still need 3dsMax for proper conversion to SA though, for example to prelight your model, add reflection to textures et cetera.
  2. Read the first post, it's all there.
  3. Hi, Long time no see Picked up Lua today and decided to make something other people would like to have, so here's a script that basically alters vehicledoors. Syntax (clientside): setVehicleDoorType ( vehicle, doorType ) Reset doortype by not filling in a doortype. My script uses elementdata, so when you set doortype for a vehicle at client 1, the altered doortype on that vehicle is also visible to all other players. Default doortypes are "scissor" and "butterfly". Small vid: Script: (feel free to implement it in your own scripts, some credit would be nice) -- Special doors script by Puma -- Free to use and free to edit, but please aks me for approval if you want to release a significantly altered version of this script -- YOU CAN EDIT THIS: local doorTypeRotation = { ["scissor"] = {72, 0, 0}, ["butterfly"] = {0, -60, 60} } -- add doortypes ----------------------- -- HOW TO USE THIS for douchebags ----------------------- -- Just put this somewhere in your script and fill in a vehicle and a doortype (see above for available doortypes) -- setVehicleDoorType ( v, type ) -- If you want to reset the doortype, just use setVehicleDoorType ( v ) without filling in a type -------------------------------- -- Now comes the part you shouldn't mess with -------------------------------- -- Defining som shit ----------- local p = getLocalPlayer() local doorAnimTime = 350 local doorIDComponentTable = { [2] = "door_lf_dummy", [3] = "door_rf_dummy", [4] = "door_lr_dummy", [5] = "door_rr_dummy" } local doorTypes = {} for doorType, doorTable in pairs ( doorTypeRotation ) do table.insert ( doorTypes, doorType ) end local vDoorType = {} for i, v in pairs ( getElementsByType("vehicle")) do local doorType = getElementData ( v, "vDoorType" ) if doorType then vDoorType[v] = doorType end end local function vRemoveDoorTypeFromTable ( v ) if isVehicle(v) then vDoorType[v] = nil oldDoorRatios[v] = nil doorStatus[v] = nil doorTimers[v] = nil end end function vehicleDestroyed () vRemoveDoorTypeFromTable(source) end addEventHandler ( "onClientElementDestroy", root, vehicleDestroyed ) addEventHandler ( "onClientVehicleExplode", root ,vehicleDestroyed ) -- MAIN ----------------------------------------------------------------------- function setVehicleDoorType ( v, type ) if v and isElement(v) and getElementType(v) == "vehicle" then if type and tostring(type) and isDoorType(type) then setElementData ( v, "vDoorType", type ) else setElementData ( v, "vDoorType", nil ) vRemoveDoorTypeFromTable ( v ) end end end local function elementDataChange ( key, oldValue ) if key == "vDoorType" and isVehicle(source) then vDoorType[source] = getElementData ( source, "vDoorType" ) end end addEventHandler ( "onClientElementDataChange", root, elementDataChange ) local oldDoorRatios = {} local doorStatus = {} local doorTimers = {} local function preRender () for v, doorType in pairs ( vDoorType ) do if isElement(v) then if not doorTimers[v] then doorTimers[v] = {} end local doorRatios = {} for i=1, 4 do local i = i + 1 -- leftfront=2, rightfront=3, leftrear=4, rightrear=5 local doorRatio = getVehicleDoorOpenRatio ( v, i ) if doorRatio and oldDoorRatios[v] and oldDoorRatios[v][i] then local oldDoorRatio = oldDoorRatios[v][i] if not doorStatus[v] then doorStatus[v] ={} end local doorPreviousState = doorStatus[v][i] if not doorPreviousState then doorPreviousState = "closed" end if doorPreviousState == "closed" and doorRatio > oldDoorRatio then doorStatus[v][i] = "opening" doorTimers[v][i] = setTimer(function(v,i)doorStatus[v][i]="open" doorTimers[v][i]=nil end,doorAnimTime,1,v,i) elseif doorPreviousState == "open" and doorRatio < oldDoorRatio then doorStatus[v][i] = "closing" doorTimers[v][i] = setTimer(function(v,i)doorStatus[v][i]="closed" doorTimers[v][i]=nil end,doorAnimTime,1,v,i) end elseif not oldDoorRatios[v] then oldDoorRatios[v] = {} end if doorRatio then oldDoorRatios[v][i] = doorRatio end end else vDoorType[v] = nil oldDoorRatios[v] = nil doorStatus[v] = nil doorTimers[v] = nil end end for v, doors in pairs ( doorStatus ) do local doorType = vDoorType[v] local rx, ry, rz = unpack ( doorTypeRotation[doorType] ) for door, status in pairs ( doors ) do local ratio = 0 if status == "open" then ratio = 1 end local timer = doorTimers[v][door] if timer and isTimer ( timer ) then local timeLeft = getTimerDetails ( timer ) ratio = timeLeft/doorAnimTime if status == "opening" then ratio = 1 - ratio end end local dummyName = doorIDComponentTable[door] if dummyName then local rx, ry, rz = unpack(doorTypeRotation[doorType]) local rx, ry, rz = rx*ratio, ry*ratio, rz*ratio if string.find(dummyName,"rf") or string.find(dummyName,"rr") then ry, rz = ry*-1, rz*-1 end setVehicleComponentRotation ( v, dummyName, rx, ry, rz ) end end end end addEventHandler ( "onClientPreRender", root, preRender ) -- UTILS ----------------------------------------------------------------- local function isDoorType ( type ) if type and tostring(type) then for i, t in pairs ( doorTypes ) do if t == type then return true end end end end local function pv (player) if not player then return getPedOccupiedVehicle ( p ) elseif isPlayer(player) then return getPedOccupiedVehicle ( player ) end end local function isPlayer ( player ) if player and isElement ( player ) and getElementType(player) == "player" then return true end end local function isVehicle ( vehicle ) if vehicle and isElement ( vehicle ) and getElementType(vehicle) == "vehicle" then return true end end Have fun with it, you can add your own doortypes at the top of the script, if you want to. It's not perfect, but it's fun to mess around with and if there's someone who wants to optimize it: feel free to do so! Just let me know if you want to release it somewhere. Have fun with it. Let me know if I forgot something.
  4. And another option: try an older version of TXD-Workshop. I personally don't like the new versions, too much options..
  5. I added 'and state =="down"'. Without it the script runs twice when you press the button: when you press it and when you release it.
  6. You need to edit the toptimes scripts. I haven't tested this myself, but you could try this: Go to the race_toptimes resource and open toptimes_client.lua. Go to line 609: if self.startshow then Replace it with: local ddMap = true if #getElementsByType("checkpoint") > 0 then -- checkpoints = racemap ddMap = false else -- checking if there is a Hunter-pickup for i, pickup in pais ( getElementsByType ( "racepickup" ) ) do local type, vehicle = getElementData(pickup,"type"), getElementData(pickup,"vehicle") if type == "vehiclechange" and vehicle and tonumber(vehicle) == getVehicleModelFromName("Hunter") then ddMap = false end end end if not ddMap then Again, I haven't tested this, so no guarantee that it works.
  7. Puma

    [REL] Better Physics

    Nice concept, but it isn't very smooth. The ped starts rotating all of a sudden and only rotates around its x-axis.
  8. Try replacing 50 in createPickup by your timeout variable.
  9. Just check the list of client scripting events next time. https://wiki.multitheftauto.com/wiki/Cl ... ing_Events It''s right there. onClientGUIClick + guiGridListGetSelectedItem
  10. Reconsider this. Do you realize that when you download and save maps for the client, everyone can start stealing those maps? I mean, it's possible, but you gotta encryp them somehow.
  11. What do you mean with a specific number per row?
  12. Second one is better. Get the data from the database and store it into a table when it is needed: a MySQL connection is quite fast, don't worry about lag. You can request all 50 objects using 1 query.
  13. Puma


    The rotation you put into moveObject is ADDED to the current rotation. So, in abrir2 it should be 0, -270, 0 And in cerrar2 it should be 0, 270, 0 If I understand your script correctly.
  14. No. For example, you want to display a text on your screen when a player enters a marker. A lot of things, like displaying text, are only clientside available (simply because the server is just passing through and modifying data between clients and not rendering anything), so you do a clientside script using onClientMarkerHit.
  15. accountname = getAccountName (getPlayerAccount(playerElement)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "vip" ) ) then Fixed, you forgot the opening " to vip.