m0d_sa Help mod_sa ScriptCommand Help

byalfonsoo

New member
Joined
Sep 3, 2020
Messages
3
Reaction score
0
Location
Turkey
First of all, hello everyone, I have been dealing with something with scriptcommand in mod_sa for a few days, but I still haven't figured out how to do it. If there is anyone knowledgeable about this subject, can you please help me?

Now, in such a situation, my game crashes. If I write 1 instead of info after walkto in scriptcommand, only the GTA screen freezes and I appear as afk in other players.
void cmd_walkto(char* params)
{
const SCRIPT_COMMAND actor_walk_to = { 0x07CD, "ifffff" };
struct actor_info* info;
info = (struct actor_info*)(UINT_PTR) * (uint32_t*)ACTOR_POINTER_SELF;
if (isBadPtr_GTA_pPed(info))
return;
float pos[3], pos2[3];
if (sscanf(params, "fff", pos[0], pos[1], pos[2])) return addMessageToChatWindow("[!] {c9c9c9}USAGE: /.walkpos [X] [Y] [Z]");
vect3_copy(&info->base.matrix[4 * 3], pos2);
float fDistanceFromEnemy = (pos[1] + pos[2] + pos[3]) - (pos2[1] + pos2[2] + pos2[3]);

addMessageToChatWindow("%f", fDistanceFromEnemy);
while (fDistanceFromEnemy > 1.0f)
{
ScriptCommand(&actor_walk_to, info, pos[0], pos[1], pos[2], 270.0, 4.0);
Sleep(500);
}
}
 

Expl01T3R

Active member
Joined
Nov 20, 2022
Messages
55
Reaction score
5
Location
Czech Republic
First of all, hello everyone, I have been dealing with something with scriptcommand in mod_sa for a few days, but I still haven't figured out how to do it. If there is anyone knowledgeable about this subject, can you please help me?

Now, in such a situation, my game crashes. If I write 1 instead of info after walkto in scriptcommand, only the GTA screen freezes and I appear as afk in other players.
This is not pawn bro but c++.
 

byalfonsoo

New member
Joined
Sep 3, 2020
Messages
3
Reaction score
0
Location
Turkey
This is not pawn bro but c++.


Dude, I'm already making my own mod_sa. I'm working on a project. This is all I need right now. If I can move the character to the desired position with C++ script command, I will be finished.


07CD: AS_actor 80@ walk_to 362.2674 -2035.844 6.836 stop_with_angle 270.0 within_radius 4.0

This is the CLEO opcode line. I want to use this line in C++. I don't know how to code CLEO.
 
Top