Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

help me in call function to create car --> in cleo


Sanmodder
 Share

Recommended Posts

see i struggling with this function to create a vehicle
you can help me 
everytime crash game
, no matter what changes I make

what this is about
I want to create a swatvan vehicle on the street
see 

{$CLEO .cs}

0000: 
thread '9999999999'
repeat 
wait 0
until if player.Defined(0)

04C4: store_coords_to 19@ 29@ 30@ from_actor $PLAYER_ACTOR with_offset 0.0 -999.0 8.0
0AA5: call_function_return 0x420B10 num_params 3 pop 3 19@ 29@ 30@ store_to 0@ 
0AA7: call_function 0x431F80 num_params 3 pop 3 modelid #swatvan [email protected] MissionCleanUpFlag 1 
end_thread

//source by plugin-sdk-master
{
CVector::CVector(float X, float Y, float Z)
 ((void(__thiscall *)(CVector *, float, float, float))0x420B10)(this, X, Y, Z);
}

{
 CVehicle* CCarCtrl::CreateCarForScript(int modelid, CVector posn, unsigned char MissionCleanUpFlag) {
 return plugin::CallAndReturn<CVehicle*, 0x431F80, int, CVector, unsigned char>(modelid, posn, MissionCleanUpFlag);
}
see scr.log results

********************************************
 script 9999999
 Local variables dump:
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 538979811 538979811
********************************************

00000025&0: [00D6] IF 0
00000029&0: [0256] IS_PLAYER_PLAYING 0    // TRUE
00000033&1: [004D] GOTO_IF_FALSE -21
00000040&1: [04C4] COMMAND_04C4 1 0.0 -999.0 8.0 -> 1153132826 -994116973 1101988207
00000069&1: [0AA7] CALL_FUNCTION_RETURN 0x420B10 3 3 1153132826 -994116973 1101988207 -> 1153132826
00000093&1: [0AA5] CALL_FUNCTION

//---------------------------------------------------------------------------------
and look at it I managed to do the first time
what is this
this function creates 1 peds in the car
very unique function
because how a police car creates a policeman
and how an ordinary car is a normal 1 peds
Advantages note I do not load a model full of automaton you do not have to check the actor

c++
{
CPed* CPopulation::AddPedInCar(CVehicle* vehicle, bool driver, int gangPedType, int seatNumber, bool male, bool criminal) {
    return ((CPed* (__cdecl *)(CVehicle*, bool, int, int, bool, bool))0x613A00)(vehicle, driver, gangPedType, seatNumber, male, criminal);
}          

cleo

0A97: 7@ = car veh struct // player car or scaned other 
if not 7@ == 0x0 //error block --> 0x0 crash
then
    0AA5: call {add ped} 0x613A00 {or add cop} {0x41C070} num_params 6 pop 6 driver false gangPedType 6 seatNumber 1 male false criminal false CVehicle 7@
end

and here, see how to control such peds because there is no handle

                0AA5: call {add ped} 0x613A00 {or add cop} {0x41C070} num_params 6 pop 6 driver false gangPedType 6 seatNumber 0 male false criminal false CVehicle 7@
                
                0432: _handler_3 = get_actor_handle_from_car veh passenger_seat 0
                if _handler_3 >= 1000 //error block -100 crash
                jf @continue_11                                                                       
                if 056D:   actor _handler_3 defined                                                                                                     
                then                                                                                                                            
                    if not Actor.HasWeapon(_handler_3, 29)                                                                                              
                    then Actor.GiveWeaponAndAmmo(_handler_3, 29, 999999)                                                                                   
                    end                                                                                                                         
                end
                :continue_11 
            end
            if _handler_3 >= 1000 //error block -100 crash
            jf @continue_12    
            if 056D:   actor _handler_3 defined                                                                                                             
            then 
                if 0449:   actor _handler_3 in_a_car
                then 0713: actor _handler_3 driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100
                end
            end
            :continue_12

 

Link to comment
Share on other sites

maybe if you do not want to help me or you do not know

it may help me with this
I need information where I can find the name of the texture to make a military swatvan
you know the name txd because in the original location nothing has this vehicle has only one color
I need to change it to a military one🐸

48385326_356349581858089_712046669623354

Well, now I'll tell you what I'm doing

I do such a path
improving the wanted level

you know, e.g.
policemen get new occupants in vehicles only ordinary cops
Possibility of setting whether to shoot from cars or not
the possibility of setting the weapon
for example,
bike cops
city cops
fbi
army
swat

np. I did that with 4 stars
set off in a chase behind the player armored swatvan armored cars with minigun on the roof of the vehicle + two swat in the middle of the vehicle with mp5
so to the climate of the game
the cars are on indexes, no, for example, you set one swatwan car
max 13
but it is worth mentioning that carl at 2 swatvan has no chance

or with 6 stars, the different pilots are approached to the player's position and release 4 commandos on the ropes
you know, like swat, with 4 stars
but this is random
for example,
rd 1 helicopter is on the commando lines
rd 2 commandos are firing from a helicopter

I still plan to do it with 5 stars
fbi agents will fly in black helicopters as snipers

 

Link to comment
Share on other sites

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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.