-
Posts
4,144 -
Joined
-
Last visited
-
Days Won
1
Everything posted by dzek (varez)
-
Noob-friendly custom models replacement script, simple to us
dzek (varez) replied to Puma's topic in Scripting
Also check out my multi theft auto tools site - including wizard for replacing vehicles textures and models, mass elements mover.. and it's all for know. If you have any ideas what else can I do -tell me. -
"your" script was done by somebody else on the forums, now you are coming back asking for more features you want from us? your code is so random.. and makes no sense.. you have to edit admin resource (which handles pms afair) - because you want to play sound on RECEIVE not on send message.. edit: i see solid already made something for you.. whatever.. just credit all pll that made the script for you.. edit2: both parts are done by solid if you wondering..
-
less lines, but SO MUCH CPU. It's better to use my 16 lines, than yours 4. http://en.wikipedia.org/wiki/Program_optimization
-
yea, we already know that you are from Poland. and as most Poles you are expecting us to do your job. and you can't even explain what you want - i don't get this idea - still don't know wtf are you talking about. Learn English, Learn lua. Links to lua tutorials: https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI More useful info: https://wiki.multitheftauto.com/ Remember - we are not fullfilling requests and we can't transfer our knowledge into your brain - you need to sit and learn until you get it. No magic can happen.
-
We are not supporting SAMP here! MTA Map Editor was made to be use with MTA. Using it for SAMP is at least.. unfair. Good bye. Topic locked.
-
yes, but first it sets camera behind - then set camera target - so this should cause the camera to be behind player and targetted to player
-
idk, its just looking ugly with capitals
-
tested, working.. hydra is a bit noisy vehicle so its hard to hear that sound, but script is working ;p local pl = getLocalPlayer() local mycar = nil local t = nil addEventHandler("onClientPlayerVehicleEnter",pl, function(veh) if getElementModel(veh) == 520 then mycar = veh if (not isTimer(t)) then t = setTimer(check, 100, 0) end end end) addEventHandler("onClientPlayerVehicleExit",pl, function() mycar = nil if (isTimer(t)) then killTimer(t) end end) local above = false function check() local speed = getVehicleSpeed(mycar) if (not above and speed>225) then --outputChatBox("b") above = true playSound ("file/knall.mp3") elseif (above and speed<225) then above = false end end function getVehicleSpeed ( vehicle ) local vx, vy, vz = getElementVelocity ( vehicle ) return math.sqrt ( vx^2 + vy^2 + vz^2 ) * 161 end
-
remove kaspersky, install another antivirus and try again.. also did you tried to reinstall both GTA SA and MTA to new, clean folders? What version of GTA SA do you have?
-
server side, not tested but should work function getPositionRelatedToPed(thePed, val) local xx, yy, zz = getElementPosition(thePed) local rot = getPedRotation(thePed) local lx = xx + math.sin (math.rad(-rot)) * val local ly = yy + math.cos (math.rad(-rot)) * val return lx,ly end function setCameraBehindPlayer(pl) local xx,yy,zz = getElementPosition(pl) local lx, ly = getPositionRelatedToPed(pl, -2) setCameraMatrix(pl, lx, ly, zz+1, xx, yy, zz) setCameraTarget(pl, pl) end
-
forgot about that, just copied part of script w/out thinking ;p ps. ahh, and dont write me as "Varez", dont use capitals
-
you need to get distance 2d between player and robot, "virtually create" point C placed your distance length to north ( so X of player, Y + distance), count the angle PLAYER, C, ROBOT (trigonometry, search wikipedia), now if robot X < player X - add 180 to result. you will get direction (azimuth). now if its: 0-45 or 315-360 == north 45-135 == east 135-225 = south 225 - 315 = west edit: function to count angle between 3 points: function getAngleBetweenPoints2D(ax,ay,bx,by,cx,cy) local AB = { ax-bx, ay-by } local BC = { cx-bx, cy-by } local AB_ = getDistanceBetweenPoints2D(ax,ay,bx,by) local BC_ = getDistanceBetweenPoints2D(bx,by,cx,cy) local iloczynSkalarny = AB[1]*BC[1] + AB[2]*BC[2] local tmp = iloczynSkalarny/(AB_*BC_) local kat = math.acos(tmp) local degrees = kat*180/(22/7) --outputChatBox("deg "..degrees) return degrees end -- note: in my script there was angle invertion on return (180-degrees) - not sure if you should use it or not, as i dont remember it exactly
-
i asked you if you need only N/S or all directions?... you didnt answer
-
https://wiki.multitheftauto.com/wiki/Set ... tagShowing
-
you need all directions (W E N S) or just N S ? if Y of "robot" > Y of player - north, else - south.
-
getResourceName(getThisResource())
-
if this is only for screenshot use my simple code i was using on own server to create brainless peds: peds = { } function cpp(src, cmd, id) local xx, yy, zz = getElementPosition(src) local rot = getPedRotation(src) count = count+1 peds[count] = createPed (tonumber(id), xx, yy, zz+3) setPedRotation(peds[count], rot) end addCommandHandler("cpp", cpp)
-
locked under request
-
sendspace.com mediafire.com zip it and send
-
stopSound( knallSound ) you cant do that if you created local on line 10
-
and what is this? getLocalPlayer() have no arguments getLocalPlayer(thePlayer)
-
i never seen such thing. my cousing had something like that when his Windows was infected with virus (antivirus failed to remove that) and the only thing he could do was to reinstall Windows. try to test your system with SEVERAL antiviruses (dont stick to one - there isnt a perfect antivirus detecting all viruses), also try spybot - search and destroy.
-
you can script that very easly, ill add example later
-
if you are patient and you really want to learn - its not a problem. https://wiki.multitheftauto.com/ - the is Scripting box there. Check Introduction to scripting.
