-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
cause accuracy needs the property: "spread" also. But: "spread" = Get only ......................................................... and fire rate is "get only" also.
-
Correct some kind of flying bug cause of this function: setElementCollisionsEnabled Remove the collision of the attached elements instead of the vehicle. Or use this function instead at clientside: setElementCollidableWith
-
The reason for that is that you can't hit arms with a vehicle. Arms don't have collisions for vehicles or objects. Just like many other bodyparts. Maybe you noticed this: When you go sprint against a wall, 40% of your head is in the wall. Well here is one with a car ^^ http://img708.imageshack.us/img708/8164/4w9i.png ------------------------------------------------------------------------------------------- On the other hand everything can be calculated..... getPedBonePosition getDistanceBetweenPoints3D -- or processLineOfSight
-
Then you got a really slow pc O_o or you have put the code serverside...
-
and what should it have done and didn't do?
-
Try this: (added some delay for test) addEventHandler("onClientResourceStart",resourceRoot, function() setTimer(function () if isTransferBoxActive() then fadeCamera(false) else fadeCamera(true) end end,300,1) end) -- You don't need this line, resourceRoot is predefined in mta-- -- resourceRoot = getResourceRootElement(getThisResource()) --------------------------------------------------------------------------------
-
modification: You don't have to redefine the vehicle when the timer and the function are in the same block. But it is always handy to prevent errors by checking if elements still does exist. disco.timer[source] = setTimer( function() -- veh if isElement(vehicle) then setVehicleOverrideLights(vehicle, 2) setVehicleHeadLightColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255) ) end end, 150, 0)--vehicle
-
Serverside is for everybody visible, client only for the pc that executed it. - For client, BieHDC sample. <<< - For server if isElement(source) then --[[ or when you are to foolish to send a vehicle/object/ped instead of player then:]] if isElement(source) and getElementType(source) == "player" then Also: if ( getDistanceBetweenPoints3D(x, y, z, -23, 1423, -23) <= "20" ) then if ( getDistanceBetweenPoints3D(x, y, z, -23, 1423, -23) <= 20 ) then Also addCommandHandler doesn't give a player as source, if you did that!
-
Why not setElementPosition? Also: https://wiki.multitheftauto.com/wiki/IsPedInVehicle
-
np.
-
yes use tables + https://wiki.multitheftauto.com/wiki/OnClientWeaponFire Every shot the guns fires, the ammo will drop in the table data. If you don't understand tables then you can forget it.
-
<spawnpoint id="ranch" posX="-711" posY="957" posZ="12.4" rotation="90"></spawnpoint> <spawnpoint id="pirate" posX="2005" posY="1543" posZ="13.5" rotX="270"></spawnpoint> <spawnpoint id="grove" posX="2485" posY="-1667" posZ="13.3" rotX="0"></spawnpoint> <spawnpoint id="hill" posX="-2405" posY="-598" posZ="132.6" rotX="128"></spawnpoint> In the .map file.
-
this probably will work: addEventHandler("onClientResourceStart", resourceRoot, bindKey ("m", "down", function() showCursor( not isCursorShowing() ) end) end) Keys can't be set when the resource hasn't start yet, as far as I know.
-
wut ? O_o what kind of magic is it ?! "failing"
-
local vehicleCheck = {[523]=true, [598]=true, [596]=true, [597]=true, [599]=true} -- a both the function. -- ect if vehicleCheck[getElementModel(clickedElement)] then people, WTF!!!!????
-
true, unless you get it by it's name: https://wiki.multitheftauto.com/wiki/GetTeamFromName
-
what if you you give it first ammo? https://wiki.multitheftauto.com/wiki/SetWeaponAmmo
-
Solves most of latency trouble. isElement(element)
-
@ myonlake thank you very much
-
You should try to set the vehicle respawnable. (script)
-
Line 9 till 12 epic fail. setTimer only returns the timer. You should create a second function, a function you can call with your timers and do what you have to do. Because this doesn't make any sense.
