
karlis
Members-
Posts
1,314 -
Joined
-
Last visited
Everything posted by karlis
-
The function is added client side from 1.1 but it works now but server side only. true, srry for msitake
-
[url=https://wiki.multitheftauto.com/wiki/FileDelete]https://wiki.multitheftauto.com/wiki/FileDelete[/url] note: from 1.1
-
np, report the results!
-
i think that normal obj won't work aswell, there will be needed to use a virtual object, which is drawn by a shader, only if the surface is open and pointing towards you. and colisons should be somehow made by different objs depending how big cascade of blocks are there.1col shape for each block would overload something im sure. basically you would need to make a complete new game, without using much of orginal gtasa engine.
-
local axeleration=0 local lastSpeed=0 local vehicle function getSpeed(veh) local x,y,z=getElementVelocity(veh) return (x^2+y^2+z^2)^0.5*161 end function getAxeleration(veh) if getElementType(veh)~="vehicle" then return end vehicle=veh return axeleration end setTimer(function() local speed=getSpeed(vehicle) axeleration=speed-lastSpeed lastSpeed=speed end,1000,0) getAxeleration(veh) returns axeleration in km/h in last 1second.
-
should work, didn't test it tough. function doesCollide(x1,y1,v1,h1,x2,y2,v2,h2) local horizontal=(x1)~=(x1+v1) or (x1>x2)~=(x1>x2+v2) local vertical=(y1)~=(y1+h1) or (y1>y2)~=(y1>y2+h2) return (horizontal and vertical) end
-
outputChatBox('[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0,true)
-
probably a test left in final release cuz of a mistake.
-
fr_server.lua line 320 replace the existing line with this one: elseif not table.find(getOption('vehicles.disallowed'), math.floor(vehID)) then after being in scripting forums for such a long time you should be able to fix this so very easily, shame that you still cant.
-
lineary moving the ball and attaching it will never give the feel of real game.
-
he means: [lua][/lua]
-
no problem
-
got it, lack of armor is not false/nil, its just 0,therefore it always exists. replace "if armor then" with "if armor>0 then" also you forgot to localize variables.
-
its not so efficent. checking is it right command in C++ is far more efficent then duing it in lua.
-
any errors?
-
yep, sorry for that, wasn't paying much attention, but no problem for the code.keep in mind that it wont work propertly with bigger hp values(like 200, when you have such stat/skill). to fix: hp=getElementHealth(v)/(1+math.max(getPedStat(v,24)-569,0)/431) --default hp skill for ped is 569, anything with less cant have 100hp, and with bigger values can have up to 200.
-
then he can just add another output to the func to include owner. plus your command handler is not way it should be.
-
setGameType(string gameType)
-
addCommandHandler("admins",function() all=aclGroupList () for _,v in ipairs(all) do local name=aclGetName(v) if name~="Everyone" then local objs=aclGroupListObjects(v) local tooutput={} for _,obj in ipairs(objs) do if string.find(obj,"user.") then table.insert(tooutput,obj:gsub("user.","")) end end outputChatBox("*"..name.."'s : "..table.concat(tooutput,", "),0,255,0,true) end end)
-
local players=getElementsByType( "player" ) addEventHandler("onClientPlayerQuit",getRootElement(),refresh) addEventHandler("onClientPlayerJoin",getRootElement(),refresh) function refresh() players=getElementsByType( "player" ) end function NameTags() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix() for k, v in ipairs( players) do tx, ty, tz = getElementPosition( v ) dist = ( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2)^0.5 --works too if dist < 10 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, Spieler ) then local sx, sy, sz = getPedBonePosition( v, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.3 ) local armor = getPedArmor( v ) local hp = getElementHealth( v ) local color if armor then color=tocolor(0,0,armor*2,200) elseif hp>50 then color=tocolor(o,hp*2,0,200) else color=tocolor(hp*2,0,0,200) end dxDrawText( getPlayerName( v ), x, y, x+200, y+50,color, 0.85 + ( 15 - dist ) * 0.02, "pricedown" ) end end end addEvent( "NameTags", true ) addEventHandler( "NameTags",getRootElement(), function() addEventHandler( "onClientRender", getRootElement(), NameTags ) end ) PS: cba to fix the spacing
-
how to make clientside scripts only exist in RAM don't go overkill with it tough.
-
read tru all the file, and save every ~60000 bytes as string, then split the string with separator "\n"(theres some func for it), put the values in table, and then get last 150 table values. https://wiki.multitheftauto.com/wiki/Ser ... _functions https://wiki.multitheftauto.com/wiki/Cli ... _functions