davedavy Posted March 9, 2011 Share 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. Link to comment
DiSaMe Posted March 9, 2011 Share 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. Link to comment
davedavy Posted March 9, 2011 Author Share Posted March 9, 2011 Ok , so its not possible? Link to comment
InDev Posted March 9, 2011 Share 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 =) Link to comment
Wojak Posted March 9, 2011 Share Posted March 9, 2011 https://community.multitheftauto.com/index.php?p= ... ils&id=461 Link to comment
davedavy Posted March 9, 2011 Author Share Posted March 9, 2011 Already used, lagg... Link to comment
Wojak Posted March 9, 2011 Share Posted March 9, 2011 unfortunately nothing better can be found at the moment Link to comment
davedavy Posted March 10, 2011 Author Share 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 Link to comment
Moderators Citizen Posted March 10, 2011 Moderators Share 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 Link to comment
davedavy Posted March 10, 2011 Author Share Posted March 10, 2011 I want a server side script. But if i need to script all coordinates, that takes hours? Right? Link to comment
Wojak Posted March 10, 2011 Share 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... Link to comment
davedavy Posted March 10, 2011 Author Share 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 Link to comment
Moderators Citizen Posted March 10, 2011 Moderators Share 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 Link to comment
Moderators Citizen Posted March 10, 2011 Moderators Share Posted March 10, 2011 you can create a EDF and add them using map editor Very good Idea Link to comment
davedavy Posted March 10, 2011 Author Share Posted March 10, 2011 I can help you for your own system So the ped drives into markers? ( If i understand it right ) Link to comment
Moderators Citizen Posted March 10, 2011 Moderators Share Posted March 10, 2011 Drives ? lol not walk ? Yes you can make this system for drivers too so yes you have understand Link to comment
davedavy Posted March 10, 2011 Author Share Posted March 10, 2011 Jep im trying to make a bus system Link to comment
davedavy Posted March 10, 2011 Author Share 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 Link to comment
Moderators Citizen Posted March 10, 2011 Moderators Share 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 Link to comment
davedavy Posted March 12, 2011 Author Share Posted March 12, 2011 Is there a tutorial for automatic cars? Ow and is record aslo not possible with AMX? Link to comment
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