davedavy Posted March 9, 2011 Posted March 9, 2011 Is there a way to use samp npc records in mta? Because i need to make a automatic driving bus. Sorry for bad english.
DiSaMe Posted March 9, 2011 Posted March 9, 2011 If you make a script which reads rec files, then yes, but it looks like there's no rec file format description. But why to use it rather than making your own recording/playing script with your own format? And you can also make the NPC perform real actions with setPedControlState. When bot is playing the recording in SA-MP, it cannot be physically affected (for example, hitting the car won't change its speed). In MTA, bots can be physically affected, so it's more realistic. -
InDev Posted March 9, 2011 Posted March 9, 2011 Not at the moment because there is no script to do this and no informations about the samp .rec files structure =) Welcome to the beginning...
Wojak Posted March 9, 2011 Posted March 9, 2011 https://community.multitheftauto.com/index.php?p= ... ils&id=461 create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
Wojak Posted March 9, 2011 Posted March 9, 2011 unfortunately nothing better can be found at the moment create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
davedavy Posted March 10, 2011 Author Posted March 10, 2011 One last question: If a ped ride to some coordinates, does automatically follow the way? And what script should I use? ( I mean; like setElementVelocity ) Greetz
Moderators Citizen Posted March 10, 2011 Moderators Posted March 10, 2011 No he never follows the way himself, YOU have to tell him other coordinates before if you want that your ped stay on the road. And what script should I use? ( I mean; like setElementVelocity ) You want to make this script in server-side or client-side ? In server-side, all players can see this ped if you want or only one In client-side, only 1 player can see this ped The rEvolution is coming ...
davedavy Posted March 10, 2011 Author Posted March 10, 2011 I want a server side script. But if i need to script all coordinates, that takes hours? Right?
Wojak Posted March 10, 2011 Posted March 10, 2011 for the coordinates you can create a EDF and add them using map editor, yours script will read it from the map file. to made it full server side you need to attach vehicle to an obiect and move the obiect, it will be synced but it will ignore the world physics. example: using controlle states on element syncer client is a better way(moving element on syncer client wil synchronize it for all clients). example: Both methods require the creation of simple AI, obstacle detection is a different story... create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
davedavy Posted March 10, 2011 Author Posted March 10, 2011 for the coordinates you can create a EDF and add them using map editor, yours script will read it from the map file.to made it full server side you need to attach vehicle to an obiect and move the obiect, it will be synced but it will ignore the world physics. example: using controlle states on element syncer client is a better way(moving element on syncer client wil synchronize it for all clients). example: Both methods require the creation of simple AI, obstacle detection is a different story... Woow thanks, is there any tutorial how to create carbots or edf files? Or is there any edf file downloadable? Sorry for bad english
Moderators Citizen Posted March 10, 2011 Moderators Posted March 10, 2011 Yeah that takes a very long time and 428 ( It's the real number of marker positions that I have ) doesn't cover entire LS You need: createPed setElementID createMarker setPedAnimation(pedwalk, "ped", "WALK_civi", -1, 1, 1, 0) -- Anim Walk onMarkerHit setElementRotation or setPedRotation a lot of positions ^^ and this useful function ( it set the rotation of the specified ped ): function pedIARot(thePed, x, y, z) x = tonumber(x) y = tonumber(y) local px, py, pz = getElementPosition( thePed ) X = math.abs( x - px ) Y = math.abs( y - py ) faceM = math.deg( math.atan2( Y , X ) ) if ( x >= px ) and ( y > py ) then -- north-east faceM = 90 - faceM elseif ( x <= px ) and ( y > py ) then -- north-west faceM = 270 + faceM elseif ( x >= px ) and ( y <= py ) then -- south-east faceM = 90 + faceM elseif ( x < px ) and ( y <= py ) then -- south-west faceM = 270 - faceM end setPedRotation(thePed,(360-faceM)) end I can help you for your own system The rEvolution is coming ...
Moderators Citizen Posted March 10, 2011 Moderators Posted March 10, 2011 you can create a EDF and add them using map editor Very good Idea The rEvolution is coming ...
davedavy Posted March 10, 2011 Author Posted March 10, 2011 I can help you for your own system So the ped drives into markers? ( If i understand it right )
Moderators Citizen Posted March 10, 2011 Moderators Posted March 10, 2011 Drives ? lol not walk ? Yes you can make this system for drivers too so yes you have understand The rEvolution is coming ...
davedavy Posted March 10, 2011 Author Posted March 10, 2011 Can you to create a code for a vehicle ( so not a walking ped ) createPed setElementID createMarker setPedAnimation(pedwalk, "ped", "WALK_civi", -1, 1, 1, 0) -- Anim Walk onMarkerHit setElementRotation or setPedRotation
Moderators Citizen Posted March 10, 2011 Moderators Posted March 10, 2011 Personaly I don't need a code for a vehicle Try to make it yourself then I can help you. I help for free but I don't work for free The rEvolution is coming ...
davedavy Posted March 12, 2011 Author Posted March 12, 2011 Is there a tutorial for automatic cars? Ow and is record aslo not possible with AMX?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now