Jump to content

motax

Members
  • Posts

    28
  • Joined

  • Last visited

motax's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. motax

    Faster running

    Damn' i totally forgot that is possible.. Thanks!
  2. motax

    Faster running

    Is there any way to speed up a player's running speed? Expect setElementVelocity because that's don't works, only when the player jumps, or is there a way to get setElementVelocity working without jumping?
  3. if AdminGate then destroyElement ( AdminGate ) end local AdminGate = createObject ( 971, -504.7998046875, 2592.599609375, 56.200000762939, 0, 0, 90 ) local state = 0 --this is the state, if 0 gate closed if 1 it's open function move() if state == 0 then --it's closed so open it moveObject ( AdminGate, 2500, -504.79998779297, 2592.6000976563, 62.099998474121) --Time means how fast the object'ill be moved. state = state + 1 elseif state == 1 then --it's open so close it moveObject ( AdminGate, 2500, -504.7998046875, 2592.599609375, 56.200000762939) state = state - 1 end end addCommandHandler("admin75", move )--this one creates a command "/gate" wich'll start the move function
  4. The problem is in here: moveObject ( AdminGate, 2500, -504.7998046875, 2592.599609375, 56.200000762939,) You dont need that comma in the end of the line
  5. Lua is case sensitive so maybe it's because the big M, but maybe because there is a "." and not a "_" int the move_gate.lua try using something easier, simpler name like gate.lua and also dont forget to change the name in the meta
  6. motax

    help

    peds = createPed(7, -1560.013671875, 660.078125, 7.0390625) marke = createMarker(-1559.30859375, 654.59375, 7.0390625 -1, "cylinder", 2, 255, 0, 0, 100) function shotplayer ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer then localPlayer = getLocalPlayer() x, y, z = getElementPosition(localPlayer) setPedAimTarget(peds, x, y, z) setPedLookAt(peds, x, y, z,-1) end end addEventHandler("onClientMarkerHit", marke, shotplayer) Maybe this one'll be good. Because: bool setPedLookAt ( ped thePed, float x, float y, float z [, int time = 3000 [, int blend = 1000 ], element target = nil ] ) "time: the time, in milliseconds, during which the ped will look at the target. Once this time has elapsed, he will look ahead again like before the function was applied. A time of 0 will immediately stop any lookat.A negative time will make the ped look at the target indefinitely."
  7. motax

    help

    peds = createPed(7, -1560.013671875, 660.078125, 7.0390625) marke = createMarker(-1559.30859375, 654.59375, 7.0390625 -1, "cylinder", 2, 255, 0, 0, 100) function shotplayer ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer then localPlayer = getLocalPlayer() x, y, z = getElementPosition(localPlayer) setPedAimTarget(peds, x, y, z) setPedLookAt(peds, x, y, z) count= setTimer(shotplayer ,50,0) end end addEventHandler("onClientMarkerHit", marke, shotplayer) Maybe a timer like this could help
  8. You should use "and" instead of "or"
  9. STAFF EDIT/NOTE: Easiest is just downloading this ready to go Moving gates script: https://community.multitheftauto.com/?p=resources&s=details&id=14987 Of course you need meta you always need a meta file for a new resource. The meta.xml should look something like this: "Your_Name" name="resource_name" version="1.0" type="script"/> Then the "move_gate.lua" --create the gate local gate = createObject ( ObjID, Pos_X, Pos_Y, Pos_Z, Rot_X, Rot_Y, Rot_Z ) local state = 0 --this is the state, if 0 gate closed if 1 it's open function move() if state == 0 then --it's closed so open it moveObject ( gate, Time, New_X, New_Y, New_Z) --Time means how fast the object'ill be moved. state = state + 1 elseif state == 1 then --it's open so close it moveObject ( gate, Time,Old_X, Old_Y, Old_Z) state = state - 1 end end addCommandHandler("gate", move )--this one creates a command "/gate" wich'll start the move function This script is written by xScatta and also can be found in the forum here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=63339&p=602320#p602320 and you should also start reading the wiki page because you can find all these stuff there.
  10. motax

    Skin problem

    addEventHandler( "onPlayerWasted", getRootElement( ), function() skin = getElementModel ( source ) setTimer( spawnPlayer, 4000, 1, source, 1177.5682373047, -1323.2587890625, 14.077121734619,0,skin ) end ) Do you mean something like this?
  11. Dont use integer. Use float instead and it'll be fine.
  12. motax

    sql

    tableName, columnName, columnValue variables should contain strings except maybe the columnValue it depends on what kind of data do you want to store there. like: tableName = "users" columnName = "money" columnValue = 5000 dbExec( char_db, "UPDATE `??` SET `??`=?", tableName, columnName, columnValue ) but that's a bad example.. hmm tableName = "users" columnName = "username" columnValue = user dbExec( char_db, "UPDATE `??` SET `??`=?", tableName, columnName, columnValue )
×
×
  • Create New...