-
Posts
563 -
Joined
-
Last visited
Everything posted by Perfect
-
Can You Please Do It Now ?
-
Original One :- https://wiki.multitheftauto.com/wiki/Sh ... Skid_marks Copied One :- https://community.multitheftauto.com/ind ... ls&id=9088 DONE
-
Oh, Sorry. I was bit busy that so i didn't check your script. This Should Work (Tested):- addEventHandler ("onPlayerWasted",getRootElement(), function(totalammo,killer,killwerweapon,bodypart,stealth) local x,y,z = getElementPosition (source) local sf = getDistanceBetweenPoints3D (x,y,z,-2655.1,639.46,14.454) local lv = getDistanceBetweenPoints3D (x,y,z,1607.2,1816.2,10) -- local ls = getDistanceBetweenPoints3D (x,y,z,2035.99,-1403.7,17.2) if (sf < ls and sf < lv) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.1,639.46,14.454,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (ls < sf and ls < lv) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.99,-1403.7,17.2,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (lv < ls and lv < sf) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.2,1816.2,10.8,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) end end)
-
addEventHandler ("onPlayerWasted",getRootElement(), function(totalammo,killer,killwerweapon,bodypart,stealth) local x,y,z = getElementPosition (source) local sf = getDistanceBetweenPoints3D (x,y,z,-2655.1,639.46,14.454) local lv = getDistanceBetweenPoints3D (x,y,z,1607.2,1816.2,10) -- local ls = getDistanceBetweenPoints3D (x,y,z,2035.99,-1403.7,17.2) if (sf < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.1,639.46,14.454,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.99,-1403.7,17.2,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (lv < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.2,1816.2,10.8,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.99,-1403.7,17.2,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (sf < lv) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.1,639.46,14.454,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.2,1816.2,10.8,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) end end
-
Try this. (Untested):- addEventHandler ("onPlayerWasted",getRootElement(), function(totalammo,killer,killwerweapon,bodypart,stealth) local x,y,z = getElementPosition (source) local sf = getDistanceBetweenPoints3D (x,y,z,-2655.1,639.46,14.454) local lv = getDistanceBetweenPoints3D (x,y,z,1607.2,1816.2,10.-- s8) --> local ls = getDistanceBetweenPoints3D (x,y,z,2035.99,-1403.7,17.2) if (sf < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.1,639.46,14.454,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.99,-1403.7,17.2,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (lv < ls) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.2,1816.2,10.8,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,2035.99,-1403.7,17.2,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) elseif (sf < lv) then setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,-2655.1,639.46,14.454,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) else setTimer (fadeCamera,1000,1,source,false,2.5) setTimer (spawnPlayer,3500,1,source,1607.2,1816.2,10.8,0,getElementModel (source),0,0,nil) setTimer (fadeCamera,4000,1,source,true,1.0) end end
-
Well, First of All, don't Panic. Scripting is a thing, which can gain by time and petiance. It is a thing of knowledge. It is not like reading whole wiki in few minutes and telling your self "I am a Programmer now!!". You also have to practice, make a simple script as N0ki paste, then Improve it by adding something like setElementPosition, etc.... I can see that you didn't straightly practice script those 2 years. I think you practice 1 or 2 days then left it and then now you again want to learn. well, You also need to increase your basic vocabulary. You can start it from here :- https://wiki.multitheftauto.com/wiki/Sc ... troduction If you have any doubts as little as which function to use for something, you can come here and ask it freely. We are always eager to help new programmers. I myself started it in 2011 and left it for some reason and now again i am trying ragain my Scrpting Knowledge.
-
Well, i change 'ped' to 'myPed' then i use debugscript 3 in-game. it tells me that there is a bad argument at setPedCameraRotation, So i changed '-rz' to 'rz - (rz * 2' (which is same). Thanks for Trying to help But still script is not working, Ped is just moving forward but not rotating. (for info, it is client side as setPedControlState is)
-
Well, Sorry for not Explaining clear. (Iam really bad at explaining somethings sometimes) I am trying to create a ped at a Place, Which will walk 2 meters then rotate then walk 2 meter then rotate .... in circular motion. unfortunately, The Script which you provide is not working, The ped is just moving forward but not rotating.
-
Thanks for trying to help but Its not working. Ped is Rotating but in zip zap pattern. I want it to rotate in circular motion in same place. Can You Please Solve This ? Here is full script:- myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) local k = 0 function pedRotate() if k+15 <= 360 then k = k + 15 else k = 0 end local rx,ry,rz = getElementRotation(myPed) setElementRotation(myPed,rx,ry,k) setPedControlState(myPed,"forwards",true) end addEventHandler( "onClientResourceStart", getRootElement(), function() setTimer(pedRotate,500,0) end)
-
Well, Its clearly there, You have to Install some Stream files. You can try reinstalling gta sa or you can search on google for those files.
-
Hello, I am trying to, Rotate Ped at a specified region in circles. I have been trying this from last 1 hour, continuously. Well, here is Script :- myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) k = 15 function pedRotate() if k <= 360 then local rx,ry,rz = getElementRotation(myPed) setElementRotation(myPed,rx,ry,rz+k) setElementVelocity(myPed,1,1,1) k = k + 15 else k = 15 end end addEventHandler( "onClientResourceStart", getRootElement(), function() setTimer(pedRotate,500,0) end) Can Someone Please Solve This ?
-
You should really check out Wiki Page :- https://wiki.multitheftauto.com And for your script, you need following functions addCommandHandler createPed Try it and see if you can do or not. Come back here with your TRIED Script.
-
Well, Resource is Folder(usually ZIP Folder), Which Contains Scripts, Meta. We can make Scripts using MTA functions(Scripting Functions) like getPlayerFromName(), SetElementPosition(), etc.... A Resource must contain a Meta.xml to work. Example. 1) We use some functions and make a script which can spawn peds by using command /peds. and save that file as ScriptName.lua. 2) then make meta.xml, Which usually contain Author name, Version name, Description and Script Name. for this example meta will look like something like this. "YourName" type="Script" name="My Script" description="My first MTA Scriptr" /> So basically Resource is a folder, which contains Scripts.They are dependent as they both can't work without Each Other. (How Cute). Well, I Think you should provide more information. You can Find Default MTA Resources(Which contains scripts) in MTA San Andreas\server\mods\deathmatch\resources\[gameplay]. You should really check out :- https://wiki.multitheftauto.com/wiki/Sc ... troduction And you can find some Help-full resources at :- https://community.multitheftauto.com/
-
Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well, *Short Time Memory Loss* Well,.......
-
"..(getPlayerName(localPlayer)).."
-
Thanks Solidsnake, got it working! And Tosfera and Niko, I also really appreciate you both guys Help!!
-
I can't get an idea on how to do that! Well, I changed my script to client (in meta) but when i did that there is no explosion at all.
-
Hi all, I am back to MTA after long time. I am trying to refresh my scripting skills. I make a simple script which will create an explosion at player, which will not damage him/her. But Somehow Players are getting damage. Here is my script, function des ( player ) local pX, pY, pZ = getElementPosition ( player ) createExplosion ( pX, pY, pZ, 6, true, -1.0, false ) end addCommandHandler ( "Boom", des )
-
Well, Well, Well. There is nothing wrong, when we type the word 'Well' x times, Am I Right ?
-
Needs? No, MTA doesn't need it. MTA needs bug fixes, then super new radical features. Oh sorry, I was referring to Person and to the script. I was saying Mta really needs more developers and creative minds. But really there is 'as i think' which means its my opinion and by 'mta' i want to say my public server.
-
Its Awesome. something which Mta really needs (as i think). i have so many plans for using it. Great job @jusonex!! @Woovie, When i first read jusonex's post i thought of making inside mta browser but after that i see you already did(oh yeah). Gonna Test Soon! (So excited!!) Well, I have a Question, Can we somehow remove browser address and allow only video to be visible ?
-
can you please solve this one ? function fire() setPedOnFire(source,true) setElementHealth(source,true) end function fireme() local stimer = setTimer(fire,1000,0) end function unfire() if isTimer ( stimer ) then killTimer ( stimer ) end end addCommandHandler("fireme",fireme) addCommandHandler("unfireme",unfire) errors at setPedOnFire and setPedHealth
-
Ah, Thank you!!
-
Sorry as i didn't describe correctly what i want to do. Ok, I want to disable/enable knife kills by command /knife. By knife kills i mean player killing each other with knife. When knife kill is disable player can't kill with knife (cancelEvent onplayerdamage), When knife kill is enable player can kill with knife.(get event back onplayerdamage). Sorry, can you please define stealth kill ? And as i can't see knife id there, i think it will not disable players killing with knife with 1 click(backside-neck)
