Coding

 Reply to this postStart new topic

Set Actor as friend

Michael.Knight1
post Jun 12 2012, 01:05 PM
Post #1


Member

Posts: 130
From: Germany
Joined: 24-March 12



Hello , Just I wanna to ask how i can to create random actor and add it as friend ?? The code plzz

This post has been edited by Michael.Knight1: Jun 12 2012, 01:05 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
badboy
post Jun 12 2012, 01:34 PM
Post #2


Trained Member

Posts: 76
From: Nederland, NL
Joined: 1-May 12



CODE
077A: set_actor 1@ acquaintance 1 to_actors_pedtype 0

You can also put them in the same gang
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Jun 12 2012, 02:27 PM
Post #3


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (badboy @ Jun 12 2012, 01:34 PM) *
CODE
077A: set_actor 1@ acquaintance 1 to_actors_pedtype 0

You can also put them in the same gang

Thanks You biggrin.gif


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Jun 12 2012, 02:37 PM
Post #4


Member

Posts: 130
From: Germany
Joined: 24-March 12



EDIT : Sorry For Posting Two Comment

This post has been edited by Michael.Knight1: Jun 12 2012, 02:38 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Tweak1971
post Jun 25 2012, 08:25 AM
Post #5


The New Guy!

Posts: 1
Joined: 25-June 12



Here is a simple thread to do what you were looking for and then some.

CODE
:MeBuddyScript
// Hold SPRINT and CROUCH FOR A FEW SECONDS
Wait 1000
If AND
   Player.Defined($PLAYER_CHAR)
   $ONMISSION == 0
   NOT Actor.Driving($PLAYER_ACTOR)
   Actor.Stopped($PLAYER_ACTOR)
00E1:   player 0 pressed_key 16 // Sprint
00E1:   player 0 pressed_key 18 // Crouch
Else_Jump @MeBuddyScript
Wait 1000
If AND
   Player.Defined($PLAYER_CHAR)
   $ONMISSION == 0
   NOT Actor.Driving($PLAYER_ACTOR)
   Actor.Stopped($PLAYER_ACTOR)
00E1:   player 0 pressed_key 16 // Sprint
00E1:   player 0 pressed_key 18 // Crouch
Else_Jump @MeBuddyScript
00A0: store_actor $PLAYER_ACTOR position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 // XYZ OF PLAYER
0376: $MeBuddy = create_random_actor_at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 // CREATE PED AT THOSE COORDS
0470: $MeWeap = actor $PLAYER_ACTOR current_weapon // WHAT WEAPON IS PLAYER HOLDING
01B2: give_actor $MeBuddy weapon $MeWeap ammo 999999 // GIVE $MEBUDDY THAT WEAPON WITH PLENTY OF AMMO
01B9: set_actor $MeBuddy armed_weapon_to $MeWeap // SET THAT WEAPON AS ACTIVE
07CB: set_actor $MeBuddy supporting_fire 1 // SHOOT WHAT PLAYER SHOOTS
01C2: remove_references_to_actor $MeBuddy // TURN $MEBUDDY INTO REGULAR ACTOR
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group // CHECK YOUR GROUP
0631: put_actor $MeBuddy in_group $PLAYER_GROUP // ADD $MEBUDDY TO YOUR GROUP
07B3: set_group $PLAYER_GROUP give_command 1 // 1=FOLLOW / 2=HOLD
Wait 30000 // 30 SECOND COOLDOWN BEFORE YOU CAN MAKE ANOTHER
Jump @MeBuddyScript


And the nice part is its all in Sanny code and you don't need CLEO installed.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Jun 29 2012, 06:53 PM
Post #6


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Tweak1971 @ Jun 25 2012, 09:25 AM) *
Here is a simple thread to do what you were looking for and then some.

CODE
:MeBuddyScript
// Hold SPRINT and CROUCH FOR A FEW SECONDS
Wait 1000
If AND
   Player.Defined($PLAYER_CHAR)
   $ONMISSION == 0
   NOT Actor.Driving($PLAYER_ACTOR)
   Actor.Stopped($PLAYER_ACTOR)
00E1:   player 0 pressed_key 16 // Sprint
00E1:   player 0 pressed_key 18 // Crouch
Else_Jump @MeBuddyScript
Wait 1000
If AND
   Player.Defined($PLAYER_CHAR)
   $ONMISSION == 0
   NOT Actor.Driving($PLAYER_ACTOR)
   Actor.Stopped($PLAYER_ACTOR)
00E1:   player 0 pressed_key 16 // Sprint
00E1:   player 0 pressed_key 18 // Crouch
Else_Jump @MeBuddyScript
00A0: store_actor $PLAYER_ACTOR position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 // XYZ OF PLAYER
0376: $MeBuddy = create_random_actor_at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 // CREATE PED AT THOSE COORDS
0470: $MeWeap = actor $PLAYER_ACTOR current_weapon // WHAT WEAPON IS PLAYER HOLDING
01B2: give_actor $MeBuddy weapon $MeWeap ammo 999999 // GIVE $MEBUDDY THAT WEAPON WITH PLENTY OF AMMO
01B9: set_actor $MeBuddy armed_weapon_to $MeWeap // SET THAT WEAPON AS ACTIVE
07CB: set_actor $MeBuddy supporting_fire 1 // SHOOT WHAT PLAYER SHOOTS
01C2: remove_references_to_actor $MeBuddy // TURN $MEBUDDY INTO REGULAR ACTOR
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group // CHECK YOUR GROUP
0631: put_actor $MeBuddy in_group $PLAYER_GROUP // ADD $MEBUDDY TO YOUR GROUP
07B3: set_group $PLAYER_GROUP give_command 1 // 1=FOLLOW / 2=HOLD
Wait 30000 // 30 SECOND COOLDOWN BEFORE YOU CAN MAKE ANOTHER
Jump @MeBuddyScript


And the nice part is its all in Sanny code and you don't need CLEO installed.


@Tweak1971 Are You Alright ??



--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Silent
post Jun 29 2012, 11:07 PM
Post #7


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



QUOTE (Michael.Knight1 @ Jun 29 2012, 07:53 PM) *
@Tweak1971 Are You Alright ??


Przyganiał kocioł garnkowi laugh.gif

This post has been edited by Silent: Jun 29 2012, 11:08 PM
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Jul 1 2012, 12:09 AM
Post #8


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Silent @ Jun 30 2012, 12:07 AM) *
Przyganiał kocioł garnkowi laugh.gif


Nie rozumiałam mój głupi


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

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