IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (31) « First ... 17 18 [19] 20 21 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [GTA SA] ~ CLEO Script Tutorial ~

 
Joni2030  
Posted: Monday, Feb 20 2012, 09:41
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



QUOTE (kal-el5676 @ Sunday, May 16 2010, 03:48)
QUOTE (ZAZ @ May 17 2009, 19:07)
Ups, visitors. Thx friends.
QUOTE (noelgamo @ May 15 2009, 07:55)

uhm how to make savepoints? cause I dont think I seen one from the tut. but if there is can you tell me wich bit is it.sorry for being a noob. smile.gif  smile.gif

Right, I forgot it.
Here it is:
The classic savescript with savedisk_pickup needs to insert 3 coords points.
One for the savedisk_pickup
One for the spawnpoint beside the pickup
One for the radar marker(If the savedisk is in an interior the location of the radar marker can be very different to pickup)

The savepoint of the script below is in the Atrium of Los Santos/Commerce
CODE
{$CLEO .cs}
:SAVE_1
03A4: name_thread 'SAVE'
0A95: enable_thread_saving
0570: 1@ = create_asset_radar_marker_with_icon 35 at 1722.2682 -1647.6366 42.4687
018B: show_on_radar 1@ 2

:SAVE_2
0001: wait 0 ms
0213: 2@ = create_pickup 1277 type 3 at 1720.7397 -1645.6292 20.2267

:SAVE_5
0001: wait 0 ms
00D6: if 0
0256: player $PLAYER_CHAR defined
004D: jump_if_false @SAVE_5
00D6: if 0
0214: pickup 2@ picked_up
004D: jump_if_false @SAVE_5
0050: gosub @SAVE_14
0002: jump @SAVE_2

:SAVE_14
00D6: if  0
0038:   $ONMISSION ==  0  // integer values
004D: jump_if_false @SAVE_17
0004: $ONMISSION =  1  // integer values
01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)
0001: wait  350 ms
03D8: show_SAVE_screen

:SAVE_15
00D6: if  0
83D9:   NOT   save_done
004D: jump_if_false @SAVE_16
0001: wait  0 ms
0002: jump @SAVE_15

:SAVE_16
00A1: put_actor $PLAYER_ACTOR at 1724.3228 -1646.5193 20.2272
0173: set_actor $PLAYER_ACTOR z_angle_to 176.8
01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)
0004: $ONMISSION =  1  // integer values
0001: wait  350 ms
0004: $ONMISSION =  0  // integer values

:SAVE_17
0051: return


So much $ONMISSION = 0 and $ONMISSION = 1
Yes its nesssary. Otherwise the colored gangwar teritories will not be shown if a save was done while gangwar is activ.

And again the same script but in the kind of "decompilation without opcodes ":
CODE
{$CLEO .cs}
:SAVE_1
thread 'SAVE'
0A95: enable_thread_saving
0570: 1@ = create_asset_radar_marker_with_icon 35 at 1722.268 -1647.637 42.4687
018B: set_marker 1@ radar_mode 2

:SAVE_42
wait 0
2@ = Pickup.Create(1277, 3, 1720.74, -1645.629, 20.2267)

:SAVE_71
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @SAVE_71
if
  Pickup.Picked_up(2@)
else_jump @SAVE_71
gosub @SAVE_121
jump @SAVE_42

:SAVE_121
if
 $ONMISSION == 0
else_jump @SAVE_240
$ONMISSION = 1
Player.CanMove($PLAYER_CHAR) = False
wait 350
03D8: show_save_screen

:SAVE_160
if
83D9:   not save_done
else_jump @SAVE_184
wait 0
jump @SAVE_160

:SAVE_184
Actor.PutAt($PLAYER_ACTOR, 1724.323, -1646.519, 20.2272)
Actor.Angle($PLAYER_ACTOR) = 176.8
Player.CanMove($PLAYER_CHAR) = True
$ONMISSION = 1
wait 350
$ONMISSION = 0

:SAVE_240
return

This doesn't seem to work for me. i try to compile and it says not enough parameters, expected 5.

Are you sure? Because when I copy that code and compile it, I don't have any errors. Are you sure you copied it right?
Users WebsitePM
  Top
 

 
Joni2030  
Posted: Tuesday, Feb 21 2012, 07:22
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



Will be able to do so now that if I want the gun somewhere. But I would like that I need enough money that I can take the gun. Is it possible?
Users WebsitePM
  Top
 

 
RRUBY0  
Posted: Wednesday, Feb 29 2012, 01:36
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Feb 22, 2012

XXXXX



ZAZ u have no idea how many people u helped with this inlove.gif inlove.gif
PM
  Top
 

 
ZAZ  
Posted: Wednesday, Feb 29 2012, 17:06
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (RRUBY0 @ Wednesday, Feb 29 2012, 01:36)
ZAZ u have no idea how many people u helped with this inlove.gif  inlove.gif

No, not really. Thanks for nice reply.
Users WebsitePM
  Top
 

 
Joni2030  
Posted: Monday, Mar 5 2012, 17:57
Quote Post


Prankster
Group Icon
Group: Members
Joined: Jul 6, 2011

sf.gif

XXXXX



Thanks ZAZ Now Ii start read again and AGAIN every day and think it all and start some day mod project and again THANKS ZAZ you safe my life biggrin.gif
Users WebsitePM
  Top
 

 
kal-el5676  
Posted: Friday, Mar 9 2012, 20:47
Quote Post


Zombie Killa
Group Icon
Group: Members
Joined: Nov 2, 2008

us.gif

XXXXX



QUOTE (ZAZ @ Sunday, Sep 5 2010, 15:24)


Try the sript below, I assume that you have the required paths and traffic.
Shure the actor isn't a dino but the example with the actor which kills the player shows the effect of the spawning
and the command to kill player give it more dynamic alien.gif
Set the marker mode to 2 because with marker above actor you will see him in any case if you drive fast
CODE
{$CLEO .cs}
:Spawn_by_random_actor_or_car
thread 'SPAWNAC'

:Spawn_1
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_1
077E: get_active_interior_to 29@
if  and//-----check several situations when the spawning don't makes sense
0039:   29@ ==  0  // integer values
8965:  not actor $PLAYER_ACTOR swimming
84A7:   not actor $PLAYER_ACTOR driving_boat
89AE:   not actor $PLAYER_ACTOR driving_train
004D: jump_if_false @Spawn_1  
0819: 30@ = actor $PLAYER_ACTOR distance_from_ground
if
0023:   20.0 > 30@
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
if
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false @Spawn_3
0050: gosub @Spawn_searchCarsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1

:Spawn_3
0050: gosub @Spawn_searchPedsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
01C2: remove_references_to_actor 1@
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1



:Spawn_Actor1
0247: request_model #WMOICE
0247: request_model #AK47

:Spawn_Actor3
0001: wait  0 ms
00D6: if  and
0248:   model #WMOICE available
0248:   model #AK47 available
004D: jump_if_false @Spawn_Actor3

009A: 2@ = create_actor  24 #WMOICE at  25@ 26@ 27@
0173: set_actor 2@ z_angle_to  0.0
01B2: give_actor 2@ weapon  30 ammo  99999  // Load the weapon model before using this
02E2: set_actor 2@ weapon_accuracy_to  100//decrease this value if you don't want to be killed
0223: set_actor 2@ health_to  1000
0946: set_actor 2@ actions_uninterupted_by_weapon_fire 1
060B: set_actor 2@ decision_maker_to 32
0187: 5@ = create_marker_above_actor 2@
018B: set_marker 5@ radar_mode 3//set marker to mode 2 to show it only on radar
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
0249: release_model #WMOICE


:Spawn_action_Loop
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_Cleanup
if and
8118:   NOT   actor 2@ dead
0104:   actor $PLAYER_ACTOR near_actor 2@ radius  80.0  80.0  10.0 sphere  0
004D: jump_if_false @Spawn_Cleanup
0002: jump @Spawn_action_Loop

:Spawn_Cleanup
0164: disable_marker 5@
01C2: remove_references_to_actor 2@

:Spawn_Restart// an extra loop to give a delay after Player respawn
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_Restart
wait 2000
0002: jump @Spawn_1





:Spawn_searchCarsub_1//subscript must end with 0051: return
04C4: create_coordinate 14@ 15@ 16@ from_actor $PLAYER_ACTOR offset -100.0  70.0  0.0// increase the y-offset
04C4: create_coordinate 18@ 19@ 30@ from_actor $PLAYER_ACTOR offset  100.0  150.0  0.0
053E: 0@ = get_random_car_with_model -1 in_rectangle_cornerA 14@ 15@ cornerB 18@ 19@
0001: wait  50 ms
if
8039:   NOT   0@ ==  -1  // integer values
004D: jump_if_false @Spawn_searchCarsub_3
0001: wait  50 ms
0407: create_coordinate 25@ 26@ 27@ from_car 0@ with_offset 0.0 0.0 1.0
0001: wait  50 ms
00A6: destroy_car 0@
0001: wait  250 ms
0006: 1@ =  1  // integer values

:Spawn_searchCarsub_3
0051: return





:Spawn_searchPedsub_1//subscript must end with 0051: return
if
80E1:   not player 0 pressed_key 19
004D: jump_if_false @Spawn_searchPedsub_5
04C4: create_coordinate 14@ 15@ 16@ from_actor $PLAYER_ACTOR offset  0.0  0.0 0.0
068D: get_camera_position_to 18@ 19@ 30@
0087: 21@ = 18@  // floating-point values only
0087: 22@ = 19@  // floating-point values only
0087: 30@ = 18@  // floating-point values only
0087: 31@ = 19@  // floating-point values only
0063: 30@ -= 14@  // floating-point values
0063: 31@ -= 15@  // floating-point values
0013: 30@ *=  -2.0  // floating-point values
0013: 31@ *=  -2.0  // floating-point values
005B: 18@ += 30@  // floating-point values
005B: 19@ += 31@  // floating-point values
0063: 18@ -= 14@  // floating-point values
0063: 19@ -= 15@  // floating-point values
0013: 18@ *=  -15.0  // floating-point values
0013: 19@ *=  -15.0  // floating-point values
005B: 21@ += 18@  // floating-point values
005B: 22@ += 19@  // floating-point values
08E5: get_actor_in_sphere 21@ 22@ 16@ radius 31.5 handle_as 1@
0001: wait  50 ms
if
8039:   NOT   1@ ==  -1  // integer values
004D: jump_if_false @Spawn_searchPedsub_5
if
00DF: actor 1@ driving
004D: jump_if_false @Spawn_searchPedsub_3
04C4: store_coords_to 25@ 26@ 27@ from_actor 1@ with_offset -2.5 0.0 0.5
0002: jump @Spawn_searchPedsub_5

:Spawn_searchPedsub_3
04C4: store_coords_to 25@ 26@ 27@ from_actor 1@ with_offset -0.5 0.0 0.0

:Spawn_searchPedsub_5
0051: return

Zaz, sorry if this seems odd or late but i was wondering if this code could be activated with a mission marker along with a play audio file opcode? Once activated i would prefer to keep it enabled. Sort of a step into mission marker, hear the audio file, then the ped spawns constantly and attacks.
PMMSNXbox Live
  Top
 

 
ZAZ  
Posted: Saturday, Mar 10 2012, 20:45
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (kal-el5676 @ Friday, Mar 9 2012, 20:47)

Zaz, sorry if this seems odd or late but i was wondering if this code could be activated with a mission marker along with a play audio file opcode? Once activated i would prefer to keep it enabled. Sort of a step into mission marker, hear the audio file, then the ped spawns constantly and attacks.

add a check for "if player is near point in sphere 1"
CODE
:Spawn_1
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_1
if
00FE:   actor $PLAYER_ACTOR near_point 1 in_sphere 2491.5  -1667.5  13.35 radius 3.0 3.0 3.0
004D: jump_if_false @Spawn_1


and a sound code when all checks are passed
CODE
if
0023:   20.0 > 30@
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
097A: play_audio_at 0.0 0.0 0.0 event 1057
Users WebsitePM
  Top
 

 
kal-el5676  
Posted: Thursday, Mar 15 2012, 20:40
Quote Post


Zombie Killa
Group Icon
Group: Members
Joined: Nov 2, 2008

us.gif

XXXXX



Thanks Zaz, but it would seem it only creates a marker and when the player steps out it simply reappears and nothing else happens. Also i was hoping to play an audio file from a specified folder.

CODE
{$CLEO .cs}
:Spawn_by_random_actor_or_car
thread 'SPAWNAC'

:Spawn_1
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_1
if
00FE:   actor $PLAYER_ACTOR near_point 1 in_sphere -761.4051 -2040.5336 9.8266 radius 1.0 1.0 1.0
004D: jump_if_false @Spawn_1
077E: get_active_interior_to 29@
if  and//-----check several situations when the spawning don't makes sense
0039:   29@ ==  0  // integer values
8965:  not actor $PLAYER_ACTOR swimming
84A7:   not actor $PLAYER_ACTOR driving_boat
89AE:   not actor $PLAYER_ACTOR driving_train
004D: jump_if_false @Spawn_1  
0819: 30@ = actor $PLAYER_ACTOR distance_from_ground
if
0023:   20.0 > 30@
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
if
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false @Spawn_3
0050: gosub @Spawn_searchCarsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1

:Spawn_3
0050: gosub @Spawn_searchPedsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
01C2: remove_references_to_actor 1@
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1



:Spawn_Actor1
0247: request_model #WMOICE
0247: request_model #AK47

:Spawn_Actor3
0001: wait  0 ms
00D6: if  and
0248:   model #WMOICE available
0248:   model #AK47 available
004D: jump_if_false @Spawn_Actor3

009A: 2@ = create_actor  24 #WMOICE at  25@ 26@ 27@
0173: set_actor 2@ z_angle_to  0.0
01B2: give_actor 2@ weapon  30 ammo  99999  // Load the weapon model before using this
02E2: set_actor 2@ weapon_accuracy_to  100//decrease this value if you don't want to be killed
0223: set_actor 2@ health_to  1000
0946: set_actor 2@ actions_uninterupted_by_weapon_fire 1
060B: set_actor 2@ decision_maker_to 32
0187: 5@ = create_marker_above_actor 2@
018B: set_marker 5@ radar_mode 3//set marker to mode 2 to show it only on radar
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
0249: release_model #WMOICE


:Spawn_action_Loop
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_Cleanup
if and
8118:   NOT   actor 2@ dead
0104:   actor $PLAYER_ACTOR near_actor 2@ radius  80.0  80.0  10.0 sphere  0
004D: jump_if_false @Spawn_Cleanup
0002: jump @Spawn_action_Loop

:Spawn_Cleanup
0164: disable_marker 5@
01C2: remove_references_to_actor 2@

:Spawn_Restart// an extra loop to give a delay after Player respawn
0001: wait 0 ms
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @Spawn_Restart
wait 2000
0002: jump @Spawn_1





:Spawn_searchCarsub_1//subscript must end with 0051: return
04C4: create_coordinate 14@ 15@ 16@ from_actor $PLAYER_ACTOR offset -100.0  70.0  0.0// increase the y-offset
04C4: create_coordinate 18@ 19@ 30@ from_actor $PLAYER_ACTOR offset  100.0  150.0  0.0
053E: 0@ = get_random_car_with_model -1 in_rectangle_cornerA 14@ 15@ cornerB 18@ 19@
0001: wait  50 ms
if
8039:   NOT   0@ ==  -1  // integer values
004D: jump_if_false @Spawn_searchCarsub_3
0001: wait  50 ms
0407: create_coordinate 25@ 26@ 27@ from_car 0@ with_offset 0.0 0.0 1.0
0001: wait  50 ms
00A6: destroy_car 0@
0001: wait  250 ms
0006: 1@ =  1  // integer values

:Spawn_searchCarsub_3
0051: return





:Spawn_searchPedsub_1//subscript must end with 0051: return
if
80E1:   not player 0 pressed_key 19
004D: jump_if_false @Spawn_searchPedsub_5
04C4: create_coordinate 14@ 15@ 16@ from_actor $PLAYER_ACTOR offset  0.0  0.0 0.0
068D: get_camera_position_to 18@ 19@ 30@
0087: 21@ = 18@  // floating-point values only
0087: 22@ = 19@  // floating-point values only
0087: 30@ = 18@  // floating-point values only
0087: 31@ = 19@  // floating-point values only
0063: 30@ -= 14@  // floating-point values
0063: 31@ -= 15@  // floating-point values
0013: 30@ *=  -2.0  // floating-point values
0013: 31@ *=  -2.0  // floating-point values
005B: 18@ += 30@  // floating-point values
005B: 19@ += 31@  // floating-point values
0063: 18@ -= 14@  // floating-point values
0063: 19@ -= 15@  // floating-point values
0013: 18@ *=  -15.0  // floating-point values
0013: 19@ *=  -15.0  // floating-point values
005B: 21@ += 18@  // floating-point values
005B: 22@ += 19@  // floating-point values
08E5: get_actor_in_sphere 21@ 22@ 16@ radius 31.5 handle_as 1@
0001: wait  50 ms
if
8039:   NOT   1@ ==  -1  // integer values
004D: jump_if_false @Spawn_searchPedsub_5
if
00DF: actor 1@ driving
004D: jump_if_false @Spawn_searchPedsub_3
04C4: store_coords_to 25@ 26@ 27@ from_actor 1@ with_offset -2.5 0.0 0.5
0002: jump @Spawn_searchPedsub_5

:Spawn_searchPedsub_3
04C4: store_coords_to 25@ 26@ 27@ from_actor 1@ with_offset -0.5 0.0 0.0

:Spawn_searchPedsub_5
0051: return
PMMSNXbox Live
  Top
 

 
ZAZ  
Posted: Saturday, Mar 17 2012, 05:45
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (kal-el5676 @ Thursday, Mar 15 2012, 20:40)
Thanks Zaz, but it would seem it only creates a marker and when the player steps out it simply reappears and nothing else happens. Also i was hoping to play an audio file from a specified folder.

Because the game don't find random actors or cars in "Back o Beyond" to get spawn coords.
You have to use another method

change this parts:
CODE
if
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false @Spawn_3
0050: gosub @Spawn_searchCarsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1

:Spawn_3
0050: gosub @Spawn_searchPedsub_1//leads the readingprocess to a subscript
//the readingprocess continues here with reading as soon as the return of the subscript is readed
if
8039:   NOT   1@ ==  -1  // checks if a radondom actor was found to get his coords
004D: jump_if_false @Spawn_1
01C2: remove_references_to_actor 1@
0006: 1@ =  -1  // integer values
0002: jump @Spawn_Actor1



:Spawn_Actor1
0247: request_model #WMOICE
0247: request_model #AK47

:Spawn_Actor3
0001: wait  0 ms
00D6: if  and
0248:   model #WMOICE available
0248:   model #AK47 available
004D: jump_if_false @Spawn_Actor3

009A: 2@ = create_actor  24 #WMOICE at  25@ 26@ 27@
0173: set_actor 2@ z_angle_to  0.0
01B2: give_actor 2@ weapon  30 ammo  99999  // Load the weapon model before using this
02E2: set_actor 2@ weapon_accuracy_to  100//decrease this value if you don't want to be killed
0223: set_actor 2@ health_to  1000
0946: set_actor 2@ actions_uninterupted_by_weapon_fire 1
060B: set_actor 2@ decision_maker_to 32
0187: 5@ = create_marker_above_actor 2@
018B: set_marker 5@ radar_mode 2//set marker to mode 2 to show it only on radar
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR
0249: release_model #WMOICE


into this:

_PostMark
CODE
097A: play_audio_at 0.0 0.0 0.0 event 1057
04C4: create_coordinate 25@ 26@ 27@ from_actor $PLAYER_ACTOR offset 10.0  4.0  0.2

:Spawn_Actor1
0247: request_model #WMOICE
0247: request_model #AK47

:Spawn_Actor3
0001: wait  0 ms
00D6: if  and
0248:   model #WMOICE available
0248:   model #AK47 available
004D: jump_if_false @Spawn_Actor3

009A: 2@ = create_actor  24 #WMOICE at  25@ 26@ 27@
0173: set_actor 2@ z_angle_to  0.0
01B2: give_actor 2@ weapon  30 ammo  99999  // Load the weapon model before using this
02E2: set_actor 2@ weapon_accuracy_to  100//decrease this value if you don't want to be killed
0223: set_actor 2@ health_to  1000
0946: set_actor 2@ actions_uninterupted_by_weapon_fire 1
060B: set_actor 2@ decision_maker_to 32
0187: 5@ = create_marker_above_actor 2@
018B: set_marker 5@ radar_mode 2//set marker to mode 2 to show it only on radar

0249: release_model #WMOICE
0337: set_actor 2@ visibility 0
04C4: create_coordinate 24@ 25@ 26@ from_actor $PLAYER_ACTOR offset  0.3  0.7 0.0
068D: 16@ 17@ 18@//get_camera_position
0087: 18@ = 16@  // floating-point values only
0087: 19@ = 17@  // floating-point values only
0063: 18@ -= 24@  // floating-point values
0063: 19@ -= 25@  // floating-point values
0013: 18@ *=  -0.5  // floating-point values
0013: 19@ *=  -0.5  // floating-point values
005B: 16@ += 18@  // floating-point values
005B: 17@ += 19@  // floating-point values
05D3: AS_actor 2@ goto_point 16@ 17@ 26@ mode 7 500 ms // versionA
wait 1000
0337: set_actor 2@ visibility 1
05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR




with this link
http://www.gtaforums.com/index.php?showtop...54542#_PostMark
and with this
http://www.gtaforums.com/index.php?act=ST&...54542#_PostMark
and this
http://www.gtaforums.com/index.php?act=ST&...154542#PostMark


This post has been edited by ZAZ on Tuesday, May 1 2012, 22:50
Users WebsitePM
  Top
 

 
Michael.Knight1  
Posted: Sunday, Mar 18 2012, 15:13
Quote Post


Knight Rider
Group Icon
Group: BUSTED!
Joined: Dec 15, 2011

us.gif

XXXXX



hello people , I Thinks if You will help me wink.gif
I'am finished in my new Mod Hitman Blood Money for gta san andreas is a full version and the next is Hitman Contracts and Was left to me just hitman Weapons Spawn !!
I make it but in i select a weapons I will not find the weapons at player
that's some of my script , pleasse what is the Error here ??
allways peace
CODE

03E5: show_text_box 'AMMU_H'
Player.CanMove($PLAYER_CHAR) = False
08D4: $WP = create_panel_with_title 'WSPAWN' position 40.0 150.0 width 186.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $WP column 0 header 'SP' data 'SP1' 'SP2' 'SP3' 'SP4' 'SP5' 'SP6' 'SP7' 'SP8' 'SP9' 'DUMMY' 'DUMMY' 'DUMMY'
-i put the camera on actor
===================================
:HITMANWEAPONS_10
0001: wait 0 ms
00D6: if
8449:   not actor $PLAYER_ACTOR in_a_car
004D: jump_if_false @HITMANWEAPONS_700
00D6: if
$ONMISSION == 0
004D: jump_if_false @HITMANWEAPONS_500
0871: init_jump_table $WEAPONS total_jumps 7 default_jump 0 @HITMANWEAPONS_400 jumps 0 @HITMANWEAPONS_100 1 @HITMANWEAPONS_111 2 @HITMANWEAPONS_122 3 @HITMANWEAPONS_133 4 @HITMANWEAPONS_144 5 @HITMANWEAPONS_155 6 @HITMANWEAPONS_166

:HITMANWEAPONS_400
0871: init_jump_table $WEAPONS total_jumps 2 default_jump 0 @HITMANWEAPONS_100  jumps 8 @HITMANWEAPONS_177 9 @HITMANWEAPONS_188 10 @HITMANWEAPONS_100 -1 @HITMANWEAPONS_100 -1 @HITMANWEAPONS_100 -1 @HITMANWEAPONS_100 -1 @HITMANWEAPONS_100
===================================
then i jump all to hitmanweapons_500
===================================

:HITMANWEAPONS_600
I GIVE ACTOR WEAPONS [ $WEAPONS]

:HITMANWEAPONS_700
I Removethe panel and restor Camera  then i Put the player can move
0A92: create_custom_thread "Weapon-Spawn.cs"
0A93: end_custom_thread
Users WebsitePMMSNAOLYahooXbox LivePlayStation Network
  Top
 

 
SilentPL  
Posted: Sunday, Mar 18 2012, 15:41
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




QUOTE (Michael.Knight1 @ Sunday, Mar 18 2012, 16:13)
pleasse what is the Error here ??

You.
Users WebsitePMMSNXbox Live
  Top
 

 
Michael.Knight1  
Posted: Sunday, Mar 18 2012, 16:04
Quote Post


Knight Rider
Group Icon
Group: BUSTED!
Joined: Dec 15, 2011

us.gif

XXXXX



QUOTE (SilentPL @ Sunday, Mar 18 2012, 15:41)
QUOTE (Michael.Knight1 @ Sunday, Mar 18 2012, 16:13)
pleasse what is the Error here ??

You.

You Start The War @SilentPL . . .
You are dumb , stupid and also ugly . . .
Does not take knowledge from the capital of the Stupid .
you must not kidding .
that really pissed me off man, you need to have more respect for people man, seriously, stop being such as dick about it and deal with it, learn to accept the word no, because im tired of asking you to please not use my stuff, i dont mind you using my stuff ok , you need to accept this, when someone says no it means no, dont try and argue about it ok, its just a video game, theres no reason to go all bitchy and asshole about it, sure im an ass about it too, but just because they are annoying assholes who wont listen like you are, so please try and be more respectful and maybe i might not have to be a asshole about everything, anyways im done talking about it, i still dont like you and that will not change ever, so please just credit us and drop it already, goodbye
Users WebsitePMMSNAOLYahooXbox LivePlayStation Network
  Top
 

 
Dumbass-Productions  
Posted: Sunday, Mar 18 2012, 18:32
Quote Post


Crazy Freak
Group Icon
Group: Members
Joined: Oct 17, 2010

at.gif

XXXXX



QUOTE (Michael.Knight1 @ Sunday, Mar 18 2012, 16:04)
QUOTE (SilentPL @ Sunday, Mar 18 2012, 15:41)
QUOTE (Michael.Knight1 @ Sunday, Mar 18 2012, 16:13)
pleasse what is the Error here ??

You.

You Start The War @SilentPL . . .
You are dumb , stupid and also ugly . . .
Does not take knowledge from the capital of the Stupid .
you must not kidding .
that really pissed me off man, you need to have more respect for people man, seriously, stop being such as dick about it and deal with it, learn to accept the word no, because im tired of asking you to please not use my stuff, i dont mind you using my stuff ok , you need to accept this, when someone says no it means no, dont try and argue about it ok, its just a video game, theres no reason to go all bitchy and asshole about it, sure im an ass about it too, but just because they are annoying assholes who wont listen like you are, so please try and be more respectful and maybe i might not have to be a asshole about everything, anyways im done talking about it, i still dont like you and that will not change ever, so please just credit us and drop it already, goodbye

@SilentPL Hahaha nice one icon14.gif

@Michael.Retard1 Why did he start the war? But even if he did, there's absolutely no need to offend him and write that he is dumb, stupid and ugly. First take a look at yourself, tough guy. You just come here, write your gibberish crap. From what I have seen, you are the troublemaker here. You write that SilentPL has no respect but again look at yourself. You are bitching around every time somebody does not understand your gibberish crap because of your crappy english skill. Instead of wasting your time with III Era Coding that you will never understand anyway, go and learn english. It's more important in life. icon14.gif
Users WebsitePMMSN
  Top
 

 
MichaelKnight1  
Posted: Monday, Apr 2 2012, 12:28
Quote Post


Snitch
Group Icon
Group: BUSTED!
Joined: Mar 24, 2012

us.gif

XXXXX



Zaz I Follow Your Tutorial for Memory Address , but i find problem in this address
CODE

0x969130 - Weapon Set 1
0x969131 - Weapon Set 2
0x969132 - Weapon Set 3

is not work ??
CODE

{$CLEO .cs}
thread 'MAIN'
wait 3000
:MAIN_1
0A8D: 1@ = read_memory 0x969130   size 4 virtual_protect 1
wait 100
03F0: text_draw_toggle  1
0001: wait  50 ms
03F0: text_draw_toggle  0
0001: wait  50 ms
045A: text_draw_1number  250.0  40.0 'NUMBER' 1@
0A8C: write_memory 0x969130   size 4 value 2 virtual_protect 1
0A93: end_custom_thread


also i use call scm function
CODE

0AA5: call 0x438370 _cheatEnableLegimate num_params 1 pop 1 cheat_ID 0

http://www.gtaforums.com/index.php?showtop...entry1060963546
everyone not work ??
When the player load a weapons Then after three seconds Leave them ! Why ??
PM
  Top
 

 
fastman92  
Posted: Monday, Apr 2 2012, 20:58
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



QUOTE (ZAZ @ Friday, Jun 5 2009, 21:34)
read_memory

the cleo opcodes 0A8D: and 0A8C: to read the content of memory adresses
at first we must know which adress have a function
you can find a list at: gtamodding.com
for exemple:
0x863984 - [Int32] Gravity

a simple GRAVITY script with text_draw opcodes to show the content of the adress:
CODE
{$CLEO .cs}
thread 'GRAVITY'
wait 3000
:GRAVITY_1
0A8D: 1@ = read_memory 0x863984   size 4 virtual_protect 1
wait 100
03F0: text_draw_toggle  1
0001: wait  50 ms
03F0: text_draw_toggle  0
0001: wait  50 ms
045A: text_draw_1number  250.0  40.0 'NUMBER' 1@
0A8C: write_memory 0x863984   size 4 value 2 virtual_protect 1 //clear the buffer
0A93: end_custom_thread


at the end we pushes the value 2 into the memory adress
test the script and look for result
2 seems to have the best effect but this adress is really crazy and if we push a float value the effect is different
try
CODE
0A8C: write_memory 0x863984   size 4 value 10.0 virtual_protect 1 //clear the buffer

and you will see the trees deforming

It's actually float value, not Int32.
By default GTA SA gravity is equal to 1/125 = 0.008
Why do you draw float value as it was integer then? It will look oddly.

There are few ways to draw floats, i'll show you my functions:

CODE
:DrawFloatOnScreen
{
Description:
   Draws float on screen using TCFLT or TCFLTN GXT entry.

Parameters:
  Passed:
    0@ - number (float)
    1@ - accuracy  
    2@ - screen pos X
    3@ - screen pos Y
   
  Result:
    none

Example:
 0AB1: call_scm_func @DrawFloatOnScreen 4 number 5@ accuracy 1 position 320.0 240.0
}
0AB1: call_scm_func @FloatPartsToIntegerValuesLengthSpecified 2 num 0@ after_comma_accuraccy 1 before_point_to 4@ after_point 5@

   if
   0@ < 0.0
   then
   045B: draw_text_2numbers 2@ 3@ GXT 'TCFLTN' numbers 4@ 5@
   else
   045B: draw_text_2numbers 2@ 3@ GXT 'TCFLT' numbers 4@ 5@
   end
0AB2: ret 0

:FloatPartsToIntegerValuesLengthSpecified
{
Description:
   Converts a float part before and after point to integer values

Parameters:
  Passed:
    0@ - number (float)
    1@ - precision
   
  Result:
    0@ - before point
    1@ - after point

Example:
 0AB1: call_scm_func @FloatPartsToIntegerValuesLengthSpecified 2 num 1.0 after_comma_accuraccy 4 before_point_to 1@ after_point 2@
}
0097: make 0@ absolute_float
0092: 2@ = float 0@ to_integer

0093: 3@ = integer 2@ to_float
0063: 0@ -= 3@  // (float)

   if
   1@ > 0
   then
   4@ = 10.0
       while 1@ > 1
       4@ *= 10.0    
       1@ -= 1
       end
   006B: 0@ *= 4@  // (float)    
   end

0092: 3@ = float 0@ to_integer
0093: 3@ = integer 3@ to_float
0087: 4@ = 0@ // (float)
0063: 4@ -= 3@  // (float)  

0092: 0@ = float 0@ to_integer
   if
   4@ > 0.0
   then
   0@ += 1
   end

0AB2: ret 2 2@ 0@

,
FloatPartsToIntegerValuesLengthSpecified gives you two parts of number as integer: before comma and after comma.
You must specify the accuracy.
DrawFloatOnScreen draws it on screen using GXT entries:
CODE
TCFLT ~r~~1~.~1~
TCFLTN ~r~-~1~.~1~
Users WebsitePMMSN
  Top
 

 
justys12  
Posted: Monday, Apr 9 2012, 13:44
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 7, 2009

lh.gif

XXXXX



can someone tell my how to spawn added cars not replaced ?? because when i try spawn car whit id 18631 it just wont show up. confused.gif
PM
  Top
 

 
ZAZ  
Posted: Monday, Apr 9 2012, 15:50
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (justys12 @ Monday, Apr 9 2012, 13:44)
can someone tell my how to spawn added cars not replaced ?? because when i try spawn car whit id 18631 it just wont show up. confused.gif

Try it first with origin car id. Change then the id when you saw that it worked fine.
CODE
{$CLEO .cs}
thread 'CARSPWI'

0@ = 411 // < --- model ID


while true
wait 0
   if
      Player.Defined($PLAYER_CHAR)
   then
       if
           0AB0:   key_pressed 8// ----- press BACKSPACE
       then
           04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.2
           Model.Load(0@)
               while not Model.Available(0@)
               wait 0
               end
           1@ = Car.Create(0@, 11@, 12@, 13@)
           Model.Destroy(0@)
           Car.RemoveReferences(1@)
           wait 1000
       end
   end
end


Use Cleo carspawner for added cars:
Car Spawner By Fastman92 (cleo4)
AddCar spawner by ZAZ (cleo3/4)

Please don't post again here unless you have a question about the tutorial lessons



This post has been edited by ZAZ on Monday, Apr 9 2012, 15:54
Users WebsitePM
  Top
 

 
justys12  
Posted: Monday, Apr 9 2012, 15:58
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 7, 2009

lh.gif

XXXXX



QUOTE (ZAZ @ Monday, Apr 9 2012, 15:50)
QUOTE (justys12 @ Monday, Apr 9 2012, 13:44)
can someone tell my how to spawn added cars not replaced ?? because when i try spawn car whit id 18631 it just wont show up. confused.gif

Try it first with origin car id. Change then the id when you saw that it worked fine.
CODE
{$CLEO .cs}
thread 'CARSPWI'

0@ = 411 // < --- model ID


while true
wait 0
   if
      Player.Defined($PLAYER_CHAR)
   then
       if
           0AB0:   key_pressed 8// ----- press BACKSPACE
       then
           04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.2
           Model.Load(0@)
               while not Model.Available(0@)
               wait 0
               end
           1@ = Car.Create(0@, 11@, 12@, 13@)
           Model.Destroy(0@)
           Car.RemoveReferences(1@)
           wait 1000
       end
   end
end


Use Cleo carspawner for added cars:
Car Spawner By Fastman92 (cleo4)
AddCar spawner by ZAZ (cleo3/4)

Please don't post again here unless you have a question about the tutorial lessons

but can i make that car spawn in some location like in grove street? not whit key pressing. i using this code
CODE

014B: $PARKED_1 = init_parked_car_generator #AUDITT color 1 1 1 alarm 0 door_lock 0 0 10000 at 2552.3 -1692.5 9.2797 angle 0.0
014C: set_parked_car_generator $PARKED_1 cars_to_generate_to 101

but only cars whit id 612 and 613 spawning
PM
  Top
 

 
ZAZ  
Posted: Monday, Apr 9 2012, 18:13
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




No


This post has been edited by ZAZ on Tuesday, May 1 2012, 22:50
Users WebsitePM
  Top
 

 
justys12  
Posted: Monday, Apr 9 2012, 19:12
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 7, 2009

lh.gif

XXXXX



QUOTE (ZAZ @ Monday, Apr 9 2012, 18:13)
No

ok thx for help
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (31) « First ... 17 18 [19] 20 21 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG