Помогите. Как заменить сочетание клавиш на команды в чат?

Sirccet

Участник
Автор темы
129
19
Версия SA-MP
  1. 0.3.7 (R1)
Код:
// This file was decompiled using SASCM.ini published on 2022-03-20
{$CLEO .cs}
{$USE CLEO+}

0000: NOP

:NONAME_2
wait 0
if and
  Actor.Driving($PLAYER_ACTOR)
  is_key_pressed 17
jf @NONAME_661
if          
  is_key_pressed 49
jf @NONAME_69
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ -1
wait 200

:NONAME_69
if
  is_key_pressed 50
jf @NONAME_143
cleo_call @NONAME_668 0 1@
if
  1@ >= 1
jf @NONAME_143
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 0
wait 200

:NONAME_143
if
  is_key_pressed 51
jf @NONAME_217
cleo_call @NONAME_668 0 1@
if
  1@ >= 2
jf @NONAME_217
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 1
wait 200

:NONAME_217
if
  is_key_pressed 52
jf @NONAME_291
cleo_call @NONAME_668 0 1@
if
  1@ >= 3
jf @NONAME_291
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 2
wait 200

:NONAME_291
if
  is_key_pressed 53
jf @NONAME_365
cleo_call @NONAME_668 0 1@
if
  1@ >= 4
jf @NONAME_365
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 3
wait 200

:NONAME_365
if
  is_key_pressed 54
jf @NONAME_439
cleo_call @NONAME_668 0 1@
if
  1@ >= 5
jf @NONAME_439
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 4
wait 200

:NONAME_439
if
  is_key_pressed 55
jf @NONAME_513
cleo_call @NONAME_668 0 1@
if
  1@ >= 6
jf @NONAME_513
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 5
wait 200

:NONAME_513
if
  is_key_pressed 56
jf @NONAME_587
cleo_call @NONAME_668 0 1@
if
  1@ >= 7
jf @NONAME_587
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 6
wait 200

:NONAME_587
if
  is_key_pressed 57
jf @NONAME_661
cleo_call @NONAME_668 0 1@
if
  1@ >= 8
jf @NONAME_661
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 7
wait 200

:NONAME_661
jump @NONAME_2

:NONAME_668
if
  Actor.Driving($PLAYER_ACTOR)
jf @NONAME_727
0@ = Actor.CurrentCar($PLAYER_ACTOR)
get_vehicle_pointer 1@ = vehicle 0@
1@ += 1160
read_memory 2@ = read_memory 1@ size 1 virtual_protect 0
jump @NONAME_734

:NONAME_727
2@ = -1

:NONAME_734
cleo_return 1 2@

:NONAME_742
if
056E:   car 0@ defined
jf @NONAME_1113
Car.StorePos(0@, 6@, 7@, 8@)
8@ -= 5.2
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 6@ 7@ 8@
wait 10
Actor.PutAt($PLAYER_ACTOR, 6@, 7@, 8@)
wait 30
0B2C:
Camera.Shake()
0C03:
hex
 00 3D 0B 03 0E 00 40 0B
end
perlin_noise
0C03:
hex
 00 04 02 04 02 40 0B
end
perlin_noise
hex
 04 01 04 00 04 01 40 0B
end
perlin_noise
hex
 04 01 04 00 04 01 40 0B
end
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0BF6:
hex
 04 18
end
perlin_noise
0B3E:
perlin_noise
0B3D:
perlin_noise
0B40:
perlin_noise
0C03:
hex
 00 04 02 04 02 40 0B
end
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0BF6:
hex
 05 A1 00 03 0E 00 3E 0B
end
perlin_noise
Car.StorePos(0@, 6@, 7@, 8@)
Actor.PutAt($PLAYER_ACTOR, 6@, 7@, 8@)
0B30:
0C03:
0400: store_coords_to
Camera.Shake()
hex
 04 FF
end
13@ = 0

:NONAME_1041
0B30:
0C03:
0400: store_coords_to
13@ += 1
  13@ > 100
jf @NONAME_1041
if
  1@ == -1
jf @NONAME_1102
036A: put_actor $PLAYER_ACTOR in_car 0@
jump @NONAME_1113

:NONAME_1102
0430: put_actor $PLAYER_ACTOR into_car 0@ passenger_seat 1@

:NONAME_1113
cleo_return 0
Суть скрипта: Когда нажимаешь сочетание клавиш (CTRL+1; CTRL+2; CTRL+3; CTRL+4) персонаж пересаживается в машине на то место какую цифру ты выбрал.
В чём заключается проблема: Как заменить данные сочетания клавиш на команды в чат. К примеру /sc 1; /sc 2; /sc 3; /sc 4
 
Решение
Код:
// This file was decompiled using SASCM.ini published on 2022-03-20
{$CLEO .cs}
{$USE CLEO+}

0000: NOP

:NONAME_2
wait 0
if and
  Actor.Driving($PLAYER_ACTOR)
  is_key_pressed 17
jf @NONAME_661
if         
  is_key_pressed 49
jf @NONAME_69
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ -1
wait 200

:NONAME_69
if
  is_key_pressed 50
jf @NONAME_143
cleo_call @NONAME_668 0 1@
if
  1@ >= 1
jf @NONAME_143
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 0
wait 200

:NONAME_143
if
  is_key_pressed 51
jf @NONAME_217
cleo_call @NONAME_668 0 1@
if
  1@ >= 2
jf @NONAME_217
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 1
wait 200

:NONAME_217
if
  is_key_pressed 52
jf @NONAME_291
cleo_call...

Митя Евгеньевич

Известный
301
124
Код:
// This file was decompiled using SASCM.ini published on 2022-03-20
{$CLEO .cs}
{$USE CLEO+}

0000: NOP

:NONAME_2
wait 0
if and
  Actor.Driving($PLAYER_ACTOR)
  is_key_pressed 17
jf @NONAME_661
if         
  is_key_pressed 49
jf @NONAME_69
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ -1
wait 200

:NONAME_69
if
  is_key_pressed 50
jf @NONAME_143
cleo_call @NONAME_668 0 1@
if
  1@ >= 1
jf @NONAME_143
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 0
wait 200

:NONAME_143
if
  is_key_pressed 51
jf @NONAME_217
cleo_call @NONAME_668 0 1@
if
  1@ >= 2
jf @NONAME_217
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 1
wait 200

:NONAME_217
if
  is_key_pressed 52
jf @NONAME_291
cleo_call @NONAME_668 0 1@
if
  1@ >= 3
jf @NONAME_291
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 2
wait 200

:NONAME_291
if
  is_key_pressed 53
jf @NONAME_365
cleo_call @NONAME_668 0 1@
if
  1@ >= 4
jf @NONAME_365
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 3
wait 200

:NONAME_365
if
  is_key_pressed 54
jf @NONAME_439
cleo_call @NONAME_668 0 1@
if
  1@ >= 5
jf @NONAME_439
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 4
wait 200

:NONAME_439
if
  is_key_pressed 55
jf @NONAME_513
cleo_call @NONAME_668 0 1@
if
  1@ >= 6
jf @NONAME_513
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 5
wait 200

:NONAME_513
if
  is_key_pressed 56
jf @NONAME_587
cleo_call @NONAME_668 0 1@
if
  1@ >= 7
jf @NONAME_587
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 6
wait 200

:NONAME_587
if
  is_key_pressed 57
jf @NONAME_661
cleo_call @NONAME_668 0 1@
if
  1@ >= 8
jf @NONAME_661
0@ = Actor.CurrentCar($PLAYER_ACTOR)
cleo_call @NONAME_742 2 0@ 7
wait 200

:NONAME_661
jump @NONAME_2

:NONAME_668
if
  Actor.Driving($PLAYER_ACTOR)
jf @NONAME_727
0@ = Actor.CurrentCar($PLAYER_ACTOR)
get_vehicle_pointer 1@ = vehicle 0@
1@ += 1160
read_memory 2@ = read_memory 1@ size 1 virtual_protect 0
jump @NONAME_734

:NONAME_727
2@ = -1

:NONAME_734
cleo_return 1 2@

:NONAME_742
if
056E:   car 0@ defined
jf @NONAME_1113
Car.StorePos(0@, 6@, 7@, 8@)
8@ -= 5.2
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 6@ 7@ 8@
wait 10
Actor.PutAt($PLAYER_ACTOR, 6@, 7@, 8@)
wait 30
0B2C:
Camera.Shake()
0C03:
hex
 00 3D 0B 03 0E 00 40 0B
end
perlin_noise
0C03:
hex
 00 04 02 04 02 40 0B
end
perlin_noise
hex
 04 01 04 00 04 01 40 0B
end
perlin_noise
hex
 04 01 04 00 04 01 40 0B
end
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0BF6:
hex
 04 18
end
perlin_noise
0B3E:
perlin_noise
0B3D:
perlin_noise
0B40:
perlin_noise
0C03:
hex
 00 04 02 04 02 40 0B
end
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0B40:
perlin_noise
0004: 0 = 1  // Note: the incorrect math opcode was used here
0BF6:
hex
 05 A1 00 03 0E 00 3E 0B
end
perlin_noise
Car.StorePos(0@, 6@, 7@, 8@)
Actor.PutAt($PLAYER_ACTOR, 6@, 7@, 8@)
0B30:
0C03:
0400: store_coords_to
Camera.Shake()
hex
 04 FF
end
13@ = 0

:NONAME_1041
0B30:
0C03:
0400: store_coords_to
13@ += 1
  13@ > 100
jf @NONAME_1041
if
  1@ == -1
jf @NONAME_1102
036A: put_actor $PLAYER_ACTOR in_car 0@
jump @NONAME_1113

:NONAME_1102
0430: put_actor $PLAYER_ACTOR into_car 0@ passenger_seat 1@

:NONAME_1113
cleo_return 0
Суть скрипта: Когда нажимаешь сочетание клавиш (CTRL+1; CTRL+2; CTRL+3; CTRL+4) персонаж пересаживается в машине на то место какую цифру ты выбрал.
В чём заключается проблема: Как заменить данные сочетания клавиш на команды в чат. К примеру /sc 1; /sc 2; /sc 3; /sc 4
/seat №места
 

Вложения

  • InCarSeatsChanger.cs
    18.2 KB · Просмотры: 3
  • InCarSeatsChanger.txt
    4.2 KB · Просмотры: 4
  • Нравится
Реакции: YarikVL