Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO .cs}
- 0000: NOP
- repeat
- wait 50
- until 0AFA: is_samp_structures_available
- 0AF8: samp add_message_to_chat "shootingIndicator is {00CC00}Enabled {F7F694}[Switch: /sitog]" color 0xF7F694
- 0B34: samp register_client_command "sitog" to_label @sitog
- 0AC8: 10@ = allocate_memory_size 260
- 0AC8: 9@ = allocate_memory_size 260
- 0AC8: 8@ = allocate_memory_size 260
- 0AC8: 7@ = allocate_memory_size 260
- 0AC8: 6@ = allocate_memory_size 260
- 0AC8: 5@ = allocate_memory_size 260
- 0AC8: 4@ = allocate_memory_size 260
- 0AC8: 3@ = allocate_memory_size 260
- 0390: load_txd_dictionary 'wpn'
- 038F: load_texture "upr" as 1 //ak
- 038F: load_texture "upl" as 2
- 038F: load_texture "up" as 3
- 038F: load_texture "triang" as 4
- 038F: load_texture "square" as 5
- 038F: load_texture "right" as 6
- 038F: load_texture "left" as 7
- 038F: load_texture "downr" as 8
- 038F: load_texture "downl" as 9
- 038F: load_texture "down" as 10
- 038F: load_texture "cross" as 11
- 038F: load_texture "cring" as 12
- 038F: load_texture "circle" as 13
- 038F: load_texture "chit" as 14
- 13@ = 0
- 27@ = 1
- 33@ = 0
- :First
- wait 0
- //variables for colors: 11@ 12@ 21@ 22@ 23@ 24@ 25@ 26@
- //switcher 27@
- //free 31@
- // 28@ = spam indicator
- if 27@ == 1
- jf @First
- if 0029: 13@ >= 1
- then
- 0B5A: get_screen_resolution 14@ 15@ //int
- 14@ /= 10
- 14@ *= 8
- 15@ /= 10
- 15@ *= 7
- if 28@ == 1
- then
- 28@ = 0
- 0AB1: call_scm_func @DrawText 7 shooterName 3@ victimName 4@ posX 14@ posY 15@ weaponImage 17@ shooterColor 0xF21C00 victimColor 0xF21C00
- else
- 0AB1: call_scm_func @DrawText 7 shooterName 3@ victimName 4@ posX 14@ posY 15@ weaponImage 17@ shooterColor 11@ victimColor 12@
- end
- 15@ += 27
- end
- if 0029: 13@ >= 2
- then
- if 28@ == 2
- then
- 28@ = 0
- 0AB1: call_scm_func @DrawText 7 shooterName 5@ victimName 6@ posX 14@ posY 15@ weaponImage 18@ shooterColor 0xF21C00 victimColor 0xF21C00
- else
- 0AB1: call_scm_func @DrawText 7 shooterName 5@ victimName 6@ posX 14@ posY 15@ weaponImage 18@ shooterColor 21@ victimColor 22@
- end
- 15@ += 27
- end
- if 0029: 13@ >= 3
- then
- if 28@ == 3
- then
- 28@ = 0
- 0AB1: call_scm_func @DrawText 7 shooterName 7@ victimName 8@ posX 14@ posY 15@ weaponImage 19@ shooterColor 0xF21C00 victimColor 0xF21C00
- else
- 0AB1: call_scm_func @DrawText 7 shooterName 7@ victimName 8@ posX 14@ posY 15@ weaponImage 19@ shooterColor 23@ victimColor 24@
- end
- 15@ += 27
- end
- if 0029: 13@ >= 4
- then
- if 28@ == 4
- then
- 28@ = 0
- 0AB1: call_scm_func @DrawText 7 shooterName 9@ victimName 10@ posX 14@ posY 15@ weaponImage 20@ shooterColor 0xF21C00 victimColor 0xF21C00
- else
- 0AB1: call_scm_func @DrawText 7 shooterName 9@ victimName 10@ posX 14@ posY 15@ weaponImage 20@ shooterColor 25@ victimColor 26@
- end
- 15@ += 27
- end
- for 30@ = 0 to 1001
- if 30@ == 1001
- then
- 0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR _var 1@
- 2@ = 0
- 0AB1: call_scm_func @WasPlayerHit 1 Actor handle 1@ _returned 2@ _weaponName 16@ // 1@ = 1 means that hit, 1@ == 0 means not hit
- if 2@ == 1
- then
- for 29@ = 0 to 1000
- if
- SAMP.IsPlayerConnected(29@)
- then
- if
- 0@ = SAMP.GetActorHandleByPlayerID(29@)
- then
- if
- 051A: actor 1@ damaged_by_actor 0@
- then
- jump @Second
- end
- end
- end
- end
- end
- else
- if
- SAMP.IsPlayerConnected(30@)
- then
- if
- 1@ = SAMP.GetActorHandleByPlayerID(30@)
- then
- 2@ = 0
- 0AB1: call_scm_func @WasPlayerHit 1 Actor handle 1@ _returned 2@ _weaponName 16@ // 1@ = 1 means that hit, 1@ == 0 means not hit
- if 2@ == 1
- then
- for 29@ = 0 to 1001
- if 29@ == 1001
- then
- 0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR _var 0@
- if
- 051A: actor 1@ damaged_by_actor 0@
- then
- jump @Second
- end
- else
- if
- SAMP.IsPlayerConnected(29@)
- then
- if
- 0@ = SAMP.GetActorHandleByPlayerID(29@)
- then
- if
- 051A: actor 1@ damaged_by_actor 0@
- then
- jump @Second
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- jump @First
- :Second // 0@ = shooter 1@ = victim
- //variables for colors: 11@ 12@ 21@ 22@ 23@ 24@ 25@ 26@
- //switcher 27@
- //free 28@ 31@
- wait 0
- 054E: clear_actor 1@ damage
- 0467: clear_actor 0@ last_weapon_damage
- if and
- 056D: actor 0@ defined
- 056D: actor 1@ defined
- then
- if 001B: 15000 > 33@
- then
- 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
- if
- 0C14: strcmp string1 3@ string2 2@
- then
- 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
- if
- 0C14: strcmp string1 4@ string2 2@
- then
- 28@ = 1
- jump @First
- end
- end
- 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
- if
- 0C14: strcmp string1 5@ string2 2@
- then
- 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
- if
- 0C14: strcmp string1 6@ string2 2@
- then
- 28@ = 2
- jump @First
- end
- end
- 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
- if
- 0C14: strcmp string1 7@ string2 2@
- then
- 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
- if
- 0C14: strcmp string1 8@ string2 2@
- then
- 28@ = 3
- jump @First
- end
- end
- 0AB1: call_scm_func @GetActorName 1 Actor handle 0@ _returnedString 2@
- if
- 0C14: strcmp string1 9@ string2 2@
- then
- 0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
- if
- 0C14: strcmp string1 10@ string2 2@
- then
- 28@ = 4
- jump @First
- end
- end
- end
- if 0029: 13@ >= 3
- then
- 0085: 25@ = 23@
- 0085: 26@ = 24@
- 0085: 20@ = 19@
- 0C13: strcpy destination 9@ source 7@
- 0C13: strcpy destination 10@ source 8@
- end
- if 0029: 13@ >= 2
- then
- 0085: 23@ = 21@
- 0085: 24@ = 22@
- 0085: 19@ = 18@
- 0C13: strcpy destination 7@ source 5@
- 0C13: strcpy destination 8@ source 6@
- end
- if 0029: 13@ >= 1
- then
- 0085: 21@ = 11@
- 0085: 22@ = 12@
- 0085: 18@ = 17@
- 0C13: strcpy destination 5@ source 3@
- 0C13: strcpy destination 6@ source 4@
- end
- 0085: 17@ = 16@
- 0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 0@ _returnedString 3@ _returnedColor 11@
- 0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 1@ _returnedString 4@ _returnedColor 12@
- 13@ += 1
- 33@ = 0
- end
- jump @First
- :sitog
- 0B12: 27@ = 27@ XOR 1
- if 27@ == 1
- then
- 0AD1: show_formatted_text_highpriority "shootingIndicator is ~G~enabled" time 800
- else
- 0AD1: show_formatted_text_highpriority "shootingIndicator is ~R~disabled" time 800
- end
- samp.CmdRet
- // FUNCTIONS
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //0AB1: call_scm_func @GetActorNameAndColor 1 Actor handle 0@ _returnedString 3@ _returnedColor 11@
- :GetActorNameAndColor
- 0AC8: 4@ = allocate_memory_size 260
- 0AC8: 3@ = allocate_memory_size 260
- 0B2B: samp 1@ = get_player_id_by_actor_handle 0@
- 0B36: samp 2@ = get_player_nickname 1@
- 0C13: strcpy destination 3@ source 2@ // to prevent bug
- 0AD3: 4@ = format "(%d)" 1@
- 0C15: strcat destination 3@ source 4@
- 0B37: samp 5@ = get_player_color 1@
- 0AC9: free_allocated_memory 4@
- 0AB2: ret 2 3@ 5@
- //0AB1: call_scm_func @GetActorName 1 Actor handle 1@ _returnedString 2@
- :GetActorName
- 0AC8: 4@ = allocate_memory_size 260
- 0AC8: 3@ = allocate_memory_size 260
- 0B2B: samp 1@ = get_player_id_by_actor_handle 0@
- 0B36: samp 2@ = get_player_nickname 1@
- 0C13: strcpy destination 3@ source 2@ // to prevent bug
- 0AD3: 4@ = format "(%d)" 1@
- 0C15: strcat destination 3@ source 4@
- 0AC9: free_allocated_memory 4@
- 0AB2: ret 1 3@
- //0AB1: call_scm_func @DrawText 7 shooterName 0@ victimName 1@ posX 2@ posY 3@ weaponImage 4@ shooterColor 5@ victimColor 6@
- :DrawText
- 03F0: enable_text_draw 1
- 0C17: 31@ = strlen 0@
- 31@ *= 10
- 0062: 2@ -= 31@ // (int)
- 0D94: draw_text 0@ pos_xy 2@ 3@ align_xy 0.0 0.0 color 5@ shadow 1
- 2@ += 76
- 005A: 2@ += 31@ // (int)
- 0D94: draw_text 1@ pos_xy 2@ 3@ align_xy 0.0 0.0 color 6@ shadow 1
- 2@ -= 38
- 3@ += 9
- 0B5F: convert_window_screen_coords 2@ 3@ to_game_screen_coords 2@ 3@
- 03E3: set_texture_to_be_drawn_antialiased 4@
- if and
- 6@ == 0xF21C00
- 5@ == 0xF21C00
- then
- 038D: draw_texture 4@ position 2@ 3@ size 12.0 12.0 RGBA 200 0 0 255
- else
- 038D: draw_texture 4@ position 2@ 3@ size 12.0 12.0 RGBA 255 255 255 255
- end
- 0AB2: ret 0
- //0AB1: call_scm_func @WasPlayerHit 1 Actor handle $PLAYER_ACTOR _returned 1@ _weaponDrawNumber 3@ // 1@ = 1 means that hit, 1@ == 0 means not hit
- :WasPlayerHit
- 2@ = 0
- if
- 031D: actor 0@ hit_by_weapon 22 //Colt
- then
- 2@ = 1
- 3@ = 2
- else
- if
- 031D: actor 0@ hit_by_weapon 23 //Silenced
- then
- 2@ = 1
- 3@ = 11
- else
- if
- 031D: actor 0@ hit_by_weapon 24 //Deagle
- then
- 2@ = 1
- 3@ = 4
- else
- if
- 031D: actor 0@ hit_by_weapon 25 //Shotgun
- then
- 2@ = 1
- 3@ = 10
- else
- if
- 031D: actor 0@ hit_by_weapon 26 //Sawn
- then
- 2@ = 1
- 3@ = 9
- else
- if
- 031D: actor 0@ hit_by_weapon 27 //Combat shotgun
- then
- 2@ = 1
- 3@ = 3
- else
- if
- 031D: actor 0@ hit_by_weapon 28 //Uzi
- then
- 2@ = 1
- 3@ = 14
- else
- if
- 031D: actor 0@ hit_by_weapon 29 //Mp5
- then
- 2@ = 1
- 3@ = 7
- else
- if
- 031D: actor 0@ hit_by_weapon 30 //AK47
- then
- 2@ = 1
- 3@ = 1
- else
- if
- 031D: actor 0@ hit_by_weapon 31 //M4
- then
- 2@ = 1
- 3@ = 5
- else
- if
- 031D: actor 0@ hit_by_weapon 32 //Tec9
- then
- 2@ = 1
- 3@ = 13
- else
- if
- 031D: actor 0@ hit_by_weapon 33 //Rifle
- then
- 2@ = 1
- 3@ = 8
- else
- if
- 031D: actor 0@ hit_by_weapon 34 //Sniper
- then
- 2@ = 1
- 3@ = 12
- else
- if
- 031D: actor 0@ hit_by_weapon 38 //Minigun
- then
- 2@ = 1
- 3@ = 6
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- 0AB2: ret 2 2@ 3@
- //0AB1: call_scm_func @PlayerActor_to_var 1 Actor handle $PLAYER_ACTOR Var 1@
- :PlayerActor_to_var
- 00A0: store_actor 0@ position_to 1@ 2@ 3@
- 0AB2: ret 1 0@
Add Comment
Please, Sign In to add comment