milanac13 Posted July 6, 2011 Share Posted July 6, 2011 Hello ! I have a mission or if a ped is killed with a weapon by the player the mission is win , but if the personis killed by a ped , the mission is lost ! :TUEUR thread 'TUEUR' gosub @TUEUR_77 if wasted_or_busted jf @TUEUR_38 gosub @TUEUR_861 :TUEUR_38 gosub @TUEUR_943 if [email protected] == 1 jf @TUEUR_75 wait 200 $11065 = 0 :TUEUR_75 end_thread :TUEUR_77 wait 0 fade 0 500 054C: use_GXT_table 'TUEUR' $ONMISSION = 1 [email protected] = 0 $11082 = 0 $11083 = 240000 wait 2000 fade 1 500 00BB: show_text_lowpriority GXT 'TUE05' time 2000 flag 1 // ~s~La mafia a besoin que tu žlimines certaines personnes genantes ou certaines membres de Gangs rivals. 00BB: show_text_lowpriority GXT 'TUE02' time 2000 flag 1 // ~s~Tu as 12h pour honorer autant de contrats que tu peut . 00BB: show_text_lowpriority GXT 'TUE03' time 2000 flag 1 // ~s~Tu recevra sur ton radar l'emplacements des hommes a abattre 00BB: show_text_lowpriority GXT 'TUE04' time 2000 flag 1 // Tu recevra 100$ par homme abattu wait 8000 03C3: set_timer_to $11083 type 1 GXT 'TUETI' // global_variable // Temps 04F7: status_text $11082 type 0 line 1 GXT 'TUEAA' // global_variable // Contrat honorž :TUEUR_240 0209: [email protected] = random_int_in_ranges 102 123 Model.Load([email protected]) Model.Load(#TEC9) 038B: load_requested_models :TUEUR_245 wait 0 if or Model.Available([email protected]) Model.Available(#TEC9) jf @TUEUR_245 if $11083 > 0 jf @TUEUR_650 if Player.WantedLevel($PLAYER_CHAR) > 2 jf @TUEUR_288 jump @TUEUR_902 :TUEUR_288 wait 0 Actor.StorePos($PLAYER_ACTOR, $TEMPVAR_X_COORD, $TEMPVAR_Y_COORD, $TEMPVAR_FLOAT_3) 0086: $TEMPVAR_FLOAT_1 = $TEMPVAR_X_COORD // (float) 0086: $TEMPVAR_FLOAT_2 = $TEMPVAR_Y_COORD // (float) $TEMPVAR_FLOAT_1 -= 500.0 $TEMPVAR_FLOAT_2 -= 500.0 0089: [email protected] = $TEMPVAR_X_COORD // (float) 0089: [email protected] = $TEMPVAR_Y_COORD // (float) [email protected] += 500.0 [email protected] += 500.0 0208: [email protected] = random_float_in_ranges $TEMPVAR_FLOAT_1 [email protected] 0208: [email protected] = random_float_in_ranges $TEMPVAR_FLOAT_2 [email protected] [email protected] = 10.0 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to [email protected] [email protected] [email protected] [email protected] = Actor.Create(CIVMALE , [email protected], [email protected], [email protected], [email protected]) 0208: [email protected] = random_float_in_ranges 0.0 359.9 Actor.Angle([email protected]) = [email protected] 01B2: give_actor [email protected] weapon 32 ammo 99999 // Load the weapon model before using this [email protected] = Marker.CreateAboveActor([email protected]) 0751: AS_actor [email protected] flee_from_actor $PLAYER_ACTOR run_distance 100000.0 time 999999 change_course 1 unknown 3000 5000 away_radius 3000.0 :TUEUR_540 wait 0 if $11083 > 0 jf @TUEUR_650 if Player.WantedLevel($PLAYER_CHAR) > 2 jf @TUEUR_588 jump @TUEUR_902 :TUEUR_588 if Actor.Dead([email protected]) jf @TUEUR_540 Marker.Disable([email protected]) $11082 += 1 0623: add 1 to_integer_stat 159 00BC: show_text_highpriority GXT 'TUE07' time 2500 flag 1 wait 2500 jump @TUEUR_240 :TUEUR_650 if $11082 > 0 jf @TUEUR_820 Player.ClearWantedLevel($PLAYER_CHAR) 0394: play_music 2 if $10999 == 0 jf @TUEUR_764 00BA: show_text_styled GXT 'TUEFM' time 5000 style 5 // Mission Tueur a Gage terminže $11082 *= 50 Player.Money($PLAYER_CHAR) += $11082 01E3: show_text_1number_styled GXT 'TUEGV' number $11082 time 5000 style 6 // Gain : ~w~~1~$ ~w~Respect + 0998: add_respect 1 030C: progress_made += 1 0595: mission_complete $10999 = 1 return :TUEUR_764 00BA: show_text_styled GXT 'TUEFM' time 5000 style 5 // Mission Tueur a Gage terminže $11082 *= 50 Player.Money($PLAYER_CHAR) += $11082 01E3: show_text_1number_styled GXT 'TUEGV' number $11082 time 5000 style 6 // Gain : ~w~~1~$ ~w~Respect + 0998: add_respect 1 return :TUEUR_820 00BA: show_text_styled GXT 'TUEFG' time 5000 style 5 // Fin mission Tueur a Gage 00BC: show_text_highpriority GXT 'TUEVD' time 5000 flag 1 // ~r~Tu n'a tuer aucun homme sur le contract [email protected] = 1 return :TUEUR_861 00BA: show_text_styled GXT 'TUEFG' time 5000 style 5 // Fin mission Tueur a Gage 00BC: show_text_highpriority GXT 'TUEAB' time 5000 flag 1 // ~r~Mission Theft Auto annulže [email protected] = 1 return :TUEUR_902 00BA: show_text_styled GXT 'TUEFG' time 5000 style 5 // Fin mission Tueur a Gage 00BC: show_text_highpriority GXT 'TUEPO' time 5000 flag 1 // ~r~Tu as trop attirže l'attention de la police [email protected] = 1 return :TUEUR_943 $ONMISSION = 0 Actor.RemoveReferences([email protected]) Marker.Disable([email protected]) 014F: stop_timer $11083 0151: remove_status_text $11082 mission_cleanup if [email protected] == 0 jf @TUEUR_992 $11065 = 0 :TUEUR_992 return Link to comment Share on other sites More sharing options...
fireguy109 Posted July 6, 2011 Share Posted July 6, 2011 So what's the problem? You need the code for checking if an actor is dead? 0118: actor [email protected] dead Link to comment Share on other sites More sharing options...
milanac13 Posted July 7, 2011 Author Share Posted July 7, 2011 the problem is if the player or a ped of game kill the actor [email protected] , the dead actor [email protected] is add ! I only want the player who kills the actor [email protected] and be added if a ped in the game kill the actor [email protected] , the mission stops! Link to comment Share on other sites More sharing options...
fireguy109 Posted July 7, 2011 Share Posted July 7, 2011 02A9: set_actor [email protected] immune_to_nonplayer 1 The only thing that will be able to kill [email protected] will be the player. Link to comment Share on other sites More sharing options...
ZAZ Posted July 7, 2011 Share Posted July 7, 2011 the problem is if the player or a ped of game kill the actor [email protected] , the dead actor [email protected] is add ! I only want the player who kills the actor [email protected] and be added if a ped in the game kill the actor [email protected] , the mission stops! check if actor [email protected] damaged_by_actor $PLAYER_ACTOR :TUEUR_588ifActor.Dead([email protected])jf @TUEUR_540if051A: actor [email protected] damaged_by_actor $PLAYER_ACTORjf @TUEUR_240Marker.Disable([email protected])$11082 += 10623: add 1 to_integer_stat 15900BC: show_text_highpriority GXT 'TUE07' time 2500 flag 1wait 2500jump @TUEUR_240 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
milanac13 Posted July 7, 2011 Author Share Posted July 7, 2011 Thank you fireguy109 and Zaz ! and actor [email protected] damaged_by_actor $PLAYER_ACTOR , it's very good! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now