Old 05-11-2009   #1
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Post Walking peds

I am using C + + ScriptHook
I can not do that created chars walked with animation.
How can I do?
WNeZRoS is offline   Reply With Quote
Old 05-11-2009   #2
sjaak327
Registered User
 
Join Date: Jan 2009
Posts: 26
sjaak327 is on a distinguished roadsjaak327 is on a distinguished roadsjaak327 is on a distinguished road
give them the task to walkl ?
sjaak327 is offline   Reply With Quote
Old 05-11-2009   #3
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
I'm using
TaskFollowNavMeshToCoord(ped[id],px[id],py[id],pz[id], 0, 0,0);
but peds Teleports

Last edited by WNeZRoS; 05-11-2009 at 07:40 AM..
WNeZRoS is offline   Reply With Quote
Old 05-11-2009   #4
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
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
__________________
rappo is online now   Reply With Quote
Old 05-11-2009   #5
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Incidentally, you do not know the parameters
TaskCarDriveToCoordNotAgainstTraffic
WNeZRoS is offline   Reply With Quote
Old 05-11-2009   #6
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
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:

Code:
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("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:

Code:
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... Если ты не понял, я знаю немного русский и могу объяснять по-русски
__________________
rappo is online now   Reply With Quote
Old 05-12-2009   #7
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Какие-то параметры ещё надо, так как ничего не куда не поехало
Some parameters have to, because nothing much does not go
WNeZRoS is offline   Reply With Quote
Old 05-12-2009   #8
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
Can you post all the code you're using?
__________________
rappo is online now   Reply With Quote
Old 05-12-2009   #9
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Scripting:ehicle GetPedVehicle(Ped ped_id)
{
Scripting:ehicle 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
{
if(!IsCharInAnyCar(ped[id]))
TaskGoStraightToCoord(ped[id], px[id], py[id], pz[id], 2, 45000);
else
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);
}
....
WNeZRoS is offline   Reply With Quote
Old 05-12-2009   #10
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
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?
__________________
rappo is online now   Reply With Quote
Old 05-13-2009   #11
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
I want to ped was driving the car in the job place
WNeZRoS is offline   Reply With Quote
Old 05-14-2009   #12
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Where I'm can found SCO files ?
WNeZRoS is offline   Reply With Quote
Old 05-14-2009   #13
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,986
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
Use OpenIV to open up /common/data/cdimages/script.img and then you just double click on the SCO files to view them.
__________________
rappo is online now   Reply With Quote
Old 05-18-2009   #14
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
which parameters have TaskDriveBy ?

Last edited by WNeZRoS; 05-18-2009 at 05:24 AM..
WNeZRoS is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:31 PM.