Jump to content

Driving Ped (HELP)


Recommended Posts

stop.png

function setupForPed ( ) 
local APed = createPed ( 0, 2327, 1394.5, 43 ) 
local AVehicle = createVehicle ( 522, 2327.5, 1394.5, 43 ) 
warpPedIntoVehicle ( APed, AVehicle ) 
end 
addCommandHandler ( "getin", setupForPed ) 
  
function onEnterVehicle ( theVehicle, seat, jacked ) 
if getElementModel ( theVehicle ) == 522 then 
addPedClothes ( source, "shellsuit", "trackytop1", 0 ) 
addPedClothes ( source, "afro", "afro", 1 ) 
addPedClothes ( source, "shellsuittr", "tracktr", 2 ) 
addPedClothes ( source, "sneakerprored", "sneaker", 3 ) 
addPedClothes ( source, "neckgold", "neck2", 13 ) 
addPedClothes ( source, "watchyellow", "watch", 14 ) 
addPedClothes ( source, "hockey", "hockeymask", 16 ) 
giveWeapon( source, 29, 100 ) 
setPlayerStat ( source, 23, 999 ) 
[color=#FF8000]setPedControlState( APed, "accelerate", true )[/color] 
end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle ) 

Whot need to make ped drive "accelerate"

some Velocity

ore some one licke this

[color=#FF8000]if BOOL then[/color] 

Link to comment

Just look in https://forum.multitheftauto.com/viewtop ... 91&t=24188 Snippet resource

:arrowdown:

paths.xml

:arrowdown:

<paths> 
  <path posX="[color=#0040BF]positionX[/color]" posY="[color=#004080]positionY[/color]" turnVelocity="[color=#004080]value of turnVelocity 0=straight ahead but 0.01 turn inright[/color] " maxTargetDistance="[color=#004080]value of maxTargetDistance for exemple 10[/color]" maxTargetAngle="[color=#004080]value of maxTargetAngle[/color]" speedDivision="[color=#0040BF]value of speed for exemple write 1000 and you're spawned car drive slow but if you tupe 100 you're spawned car drive mega fast[/color]" /> 
</paths> 

and look in snippet.map

<map> 
  <info description="" type="map" gamemodes="snippet" author=""  name="" version="1.0" /> 
  <vehicle id="[color=#004080]spawnedcar[/color]" model="[color=#004080]oure spawnedcar ID[/color]" posX="[color=#004080]positionX[/color]" posY="[color=#004080]positionY[/color]" posZ="[color=#004080]positionZ[/color]" rotX="0" rotY="0" rotZ="0" /> 
</map> 

and in :arrowdown:

snippet.lua

Tupe coordinates near youre spawnedcar

............ 
function onPlayerJoin () 
  setCameraTarget ( source, source ); 
  fadeCamera ( source, true ); 
  spawnPlayer ( source, [color=#004080]posX[/color], [color=#004080]posY[/color], [color=#004080]poZ[/color] ); 
  bindKey ( source, "F1", "down", onKeyPressed ); 
end;............... 

run resource :arrow: reconnect :arrow: you while spawn! :arrow: if you whont you can seat in car an tupe bindKey "F1"

and take fun

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...