GTAGaming Forums

GTAGaming Forums (
-   Grand Theft Auto IV Mods (
-   -   Walking peds (

WNeZRoS 05-11-2009 03:34 AM

Walking peds
I am using C + + ScriptHook
I can not do that created chars walked with animation.
How can I do?

sjaak327 05-11-2009 06:38 AM

give them the task to walkl ?

WNeZRoS 05-11-2009 06:58 AM

I'm using
TaskFollowNavMeshToCoord(ped[id],px[id],py[id],pz[id], 0, 0,0);
but peds Teleports

rappo 05-11-2009 10:49 AM

you should try TaskGoToCoordAnyMeans()

im not sure what all the parameters are, but the first one should be a Ped and the three that follow are probably the coordinates. dont know what the others could be - sorry, dont have time to test it out right now!

edit: or TaskGoStraightToCoord() looks promising too, and aru has already documented that

WNeZRoS 05-11-2009 10:42 PM

Incidentally, you do not know the parameters

rappo 05-11-2009 11:46 PM

So I don't exactly know what all the parameters are, but I took a look at some of Rockstar's code. In bell2.sco you'll find that function being called. So I just replicated the parameters from there and got:


static void TaskCarDriveToCoordNotAgainstTraffic(b8 unknown01, Vehicle v, f32 x, f32 y, f32 z, u32 unknownInt1, b8 unknown02, f32 unknownF1, u32 unknownInt2, f32 unknownF2, u32 unknownInt3) { NativeInvoke::Invoke<ScriptVoid>("TASK_CAR_DRIVE_TO_COORD_NOT_AGAINST_TRAFFIC", unknown01, v, x, y, z, unknownInt1, unknown02, unknownF1, unknownInt2, unknownF2, unknownInt3); }
So to use it you'd do:


Vehicle v;
f32 x, y, z;
TaskCarDriveToCoordNotAgainstTraffic(0, v, x, y, z, 24, 0, 400514754, 2, -1f, 200);

Sorry I don't know what all those random numbers are for, I'm just replicating what I saw in the SCO file.
Also I think you live in Russia so... Если ты не понял, я знаю немного русский и могу объяснять по-русски :wink2:

WNeZRoS 05-12-2009 02:48 AM

Какие-то параметры ещё надо, так как ничего не куда не поехало
Some parameters have to, because nothing much does not go

rappo 05-12-2009 03:12 AM

Can you post all the code you're using?

WNeZRoS 05-12-2009 03:51 AM

Scripting::Vehicle GetPedVehicle(Ped ped_id)
Scripting::Vehicle veh;
GetCarCharIsUsing(ped_id, &veh);
return veh;
else if((GetAsyncKeyState(98) & 1) != 0)//num 2
GetCharCoordinates(GetPlayerPed(), &px[id],&py[id],&pz[id]);
PrintStringWithLiteralStringNow("STRING", "My pos saved", 1000, 0);
else if((GetAsyncKeyState(99) & 1) != 0 && DoesCharExist(ped[id]))//num 3
TaskGoStraightToCoord(ped[id], px[id], py[id], pz[id], 2, 45000);
TaskCarDriveToCoordNotAgainstTraffic(0,GetPedVehic le(ped[id]),px[id],py[id], pz[id],24, 0, 400514754, 2,-1, 200);
PrintStringWithLiteralStringNow("STRING", "Ped goto saved pos", 1000, 0);

rappo 05-12-2009 11:44 AM

Sorry I've been trying for a while but I can't get it to work either. If you just spawn a car without using the Task it will automatically move. Did you want it to go to a specific place?

WNeZRoS 05-13-2009 04:49 AM

I want to ped was driving the car in the job place

WNeZRoS 05-14-2009 07:08 AM

Where I'm can found SCO files ?

rappo 05-14-2009 12:24 PM

Use OpenIV to open up /common/data/cdimages/script.img and then you just double click on the SCO files to view them.

WNeZRoS 05-18-2009 05:09 AM

which parameters have TaskDriveBy ?

All times are GMT -6. The time now is 03:21 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2016, vBulletin Solutions, Inc.