karlis
Members-
Posts
1,314 -
Joined
-
Last visited
Everything posted by karlis
-
chat_range=100 function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,msg) local px,py,pz=getElementPosition(player) local nick=getPlayerName(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("[local]"..nick..": #ffffff"..msg,v,30,30,200,true) end end end addCommandHandler("l",onChat)
-
whats the point if you even fail to edit a wiki example
-
that is not easy, but doable upside down as well this is bit more pro(not me tho):
-
he shouldn't be both on here and wiki, if he doesn't want to use brain...
-
umm, position? simplest thing i could think of is to mirror object 2pos against obj1 local x1,y1,z1=getElementPosition(theObj1) local x2,y2,z2=getElementPosition(theObj2) setElementPosition(theObj2,x1-(x2-x1),y1-(y2-y1),z1-(z2-z1))
-
these are functions you will need: getPedWeaponMuzzlePosition() getPedTargetCollision() getPedBonePosition() good luck
-
its hard to answer you about the maths, if we don't know what you exactly want, theres 1000different uses for maths.
-
Selling 15 maps [All maps are tested, working properly
karlis replied to vipulcoolrule's topic in Showroom
don't see anyone who would like to buy stuff like this, its so simple to make yourself. -
you need to do string.gsub(text,"#%x%x%x%x%x%x","") for the shadow/border as well.
-
http://mta.dzek.eu/vehicle/
-
is maxbi even defined before?
-
be more specific, whats current corruption?
-
tonumber(maxbi)
-
root should be defined by default, unless wiki is corrupted
-
you could do that by few dxDrawImageSection function dxDrawImageColorSection(x,y,l,h,path,rot,rotX,rotY,colorTBL,posgui) local rotX,rotY=l/2-rotX,h/2-rotY local xs,ys=x,y for k,v in ipairs(colorTBl) do for k2,v2 in ipairs(v) do dxDrawImageSection(x,y,l/#v,h/#colorTBL,x,y,l/#v,h/#colorTBL,path,rot,rotX-xs+x,rotY-ys+y,v2,posgui) x=x+l/#v y=y+h/#colorTBL end end end untested yet.
-
you don't need to define anything, just write name=var you should check these http://www.lua.org/pil/index.html http://lua-users.org/wiki/TutorialDirectory https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/manual/5.1/#index https://wiki.multitheftauto.com/
-
strange, it should return table containing tables of all info about particular child...
-
that's not... mouse x and y, basic function, and modulo is all you need...
-
function getNodes(mapfile,name) local xml=xmlLoadFile(mapfile) local tbl={} if xml then local child=xmlNodeGetChildren(xml) for k,v in ipairs(child) do if xmlNodeGetName(v)==name then tbl[#tbl+1]=xmlNodeGetAttributes(v) end end return tbl end end
-
I prefer the dxVideo function than fix that superminor bug. i can see how this superminor bug can break gamemode...
-
be more specific, screens won't hurt too.
-
i think we have to post actually working script, so OP doesn't fail function pest (sourceP, command, who) local targetPlayer = getPlayerFromName ( who ) if getPlayerName(sourceP) == "thomas479" then if ( targetPlayer ) then local x,y,z = getElementPosition (targetPlayer) local xp,yp = getElementRotation ( targetPlayer ) createObject ( 970, x, y, z, xp, yp, 0 ) else --source will always be there createProjectile ( sourceP, 20, 16, 16, 30, 1, sourceP, 0, 0, 0, 0, 0, 0, 20 ) --proectile created by source aims for soruce? wtf? end end end addCommandHandler ( "pest", pest )
-
both "onClientVehicleEnter" if source is localplayer and "onClientPlayerRadioSwitch" just set radio to id0. although i'd advise to just set it to 0 when entering, so if someone wants it, he still can turn it on.
-
you did it right, it is necessary in case you want change color. and timer is also correct solution. do something like setTimer(function() randFrame=math.random(#frame) end,5000,0) --i set it change each 5sec and then just call this arg in the draw.
