Вопросы по CLEO-скриптингу

Dark_Knight

Me, me and me.
Друг
4,056
2,074
Легенда, вот пример тебе.
Код:
{$CLEO}
{$include includes\vk_keys.txt}

//if 
//not 29@ = SAMP.Base()
//else_jump @load_sampfuncs 
//0A93: end_custom_thread 

//:load_sampfuncs 
//wait 400 
// SAMP.Available
//else_jump @load_sampfuncs

if not 29@ = samp.base()
then
0A93: end_custom_thread 
end

repeat
wait 400
until samp.Available()

const
ITEMS = 2@
PLACES = 3@
GANGS = 4@
MAFIAS = 5@
GM = 6@
SERVICE = 10@
HOUSE = 11@
FRACTIONS = 12@
MARKER = 3
DIALOG_STYLE_MSGBOX = 0
DIALOG_STYLE_INPUT = 1
DIALOG_STYLE_LIST = 2
DIALOG_STYLE_PASSWORD = 3
//----Color----
COLOR_BLUE = 0x2ED8F1
COLOR_RED = 0xFF0000
COLOR_GREEN = 0x00FF0C
COLOR_MARKER = 0xF5DEB3
COLOR_ORANGE = 0xFFBA00
end

0AC8: ITEMS = allocate_memory_size 128
0AC8: SERVICE = allocate_memory_size 128
0AC8: HOUSE = allocate_memory_size 128
0AC8: PLACES = allocate_memory_size 128
0AC8: GM = allocate_memory_size 128
0AC8: GANGS = allocate_memory_size 128
0AC8: MAFIAS = allocate_memory_size 128
0AC8: FRACTIONS = allocate_memory_size 256

0AD3: string ITEMS format "Phone%cGPS%cRadio%cWanted(Только для закона)%cUpgrade%cService%cHome%cPlaces%cУбрать метку%cСправка" 10 10 10 10 10 10 10 10 10
0AD3: string SERVICE format "Taxi%cMedic%cMechanic" 10 10
0AD3: string HOUSE format "Open%cFix Car%cHeal%cCar upgrade" 10 10 10
0AD3: string PLACES format "Respawn%cBusinesses" 10
0AD3: string GM format "Gangs%cMafia%cFractions" 10 10
0AD3: string GANGS format "LS Vagos%cBallas Gang%cGrove Street%cEl Coronos%cStreetRacers%cRifa Gang%cHell Angels%cBlack Kings" 10 10 10 10 10 10 10
0AD3: string MAFIAS format "Yakuza%cLa Cosa Nostra%cRussian Mafia%cThe Triads Mafia" 10 10 10
0AD3: string FRACTIONS format "Police LS%cFBI%cArmy%cTaxi%cEMT%cHitman's%cSan News%cPolice LV%cCollegium Lawyer's" 10 10 10 10 10 10 10 10

//0AD3: string HELP format "Данный скрипт собирает множество вводиммых команд в одно меню.%сТак же в скрипте присутствует меню, которое показывает где находяться мафии, банды и т.д"

model.Load(1317)
if
model.Available(1317)
then
goto @1
else
0A93: end_custom_thread
end 

:1
//Сopyright 
0AF8: samp add_message_to_chat "Advance KPK V1.0 by MindFreak загружен" COLOR_ORANGE
0AF8: samp add_message_to_chat "Специально для GalaxY-RPG.ru" COLOR_ORANGE

:begin
while true
wait 0
if key_down 0x7A
then
:menu
0B3B: samp show_dialog id 2 caption "Advance KPK V1.0 by MindFreak" text ITEMS button_1 "Ок" button_2 "Отмена" style DIALOG_STYLE_LIST
repeat
wait 0
until 0B3C: samp dialog_respond 2 button 0@ list_item 1@ input_text 0
if 0@ == 1
then
end
if 1@ == 0
then say "/phone"
end
if 1@ == 1
then say "/kpk"
end
if 1@ == 2
then say "/player"
end
if 1@ == 3
then say "/wanted"
end
if 1@ == 4
then say "/upgrade"
end
//Начало сервисов
if 1@ == 5
then
0B3B: samp show_dialog id 3 caption "Service" text SERVICE button_1 "Ок" button_2 "Отмена" style DIALOG_STYLE_LIST
repeat
wait 0
until samp.DialogRespond(3, 0@, 1@, 0)
if 0@ == 2
then goto @menu
end
if 0@ == 1
then
if 1@ == 0
then say "/service taxi"
end
if 1@ == 1
then say "/service medic"
end
if 1@ == 2
then say "/service mechanic"
end
end 
end
//Конец сервисов
//Начало дома
if 1@ == 6
then
0B3B: samp show_dialog id 4 caption "Home" text HOUSE button_1 "Ок" button_2 "Отмена" style DIALOG_STYLE_LIST
repeat
wait 0
until samp.DialogRespond(4, 0@, 1@, 0)
if 0@ == 2
then goto @menu
end
if 0@ == 1
then
if 1@ == 0
then say "/open"
end
if 1@ == 1
then say "/fixcar"
end
if 1@ == 2
then say "/househeal"
end
if 1@ == 3
then say "/carupgrade"
end
end 
end
//Конец дома
//Начало мест
if 1@ == 7
then
:new_places
0B3B: samp show_dialog id 5 caption "New Place" text PLACES button_1 "Ок" button_2 "Назад" style DIALOG_STYLE_LIST
repeat
wait 0
until samp.DialogRespond(5, 0@, 1@, 0)
if 0@ == 2
then goto @menu
end
if 0@ == 1
then
// Начало респавны
if 1@ == 0
then
:respawns
0B3B: samp show_dialog id 6 caption "Respawn's" text GM button_1 "Ок" button_2 "Назад" style DIALOG_STYLE_LIST
repeat
wait 0
until samp.DialogRespond(6, 0@, 1@ , 0)
if 0@ == 2
then goto @new_places
end
if 0@ == 1
then
//Начало банд
if 1@ == 0
then
0B3B: samp show_dialog id 7 caption "Gang's" text GANGS button_1 "Ок" button_2 "Назад" style DIALOG_STYLE_LIST
repeat 
wait 0
until samp.DialogRespond(7, 0@, 1@, 0)
if 0@ == 2
then goto @respawns
end
if 0@ == 1
then 
//Vagos
if 1@ == 0
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2807.98 -1190.09 25.35
0107: 8@ = create_object 1317 at 2807.98 -1190.09 25.35
9@ = 1
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2807.98 -1190.09 25.35
0107: 8@ = create_object 1317 at 2807.98 -1190.09 25.35
9@ = 1
end
end
//Ballas
if
1@ == 1
then
if not 9@ == 1
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2000.34 -1118.54 26.78
0107: 8@ = create_object 1317 at 2000.34 -1118.54 26.7
9@ = 2
goto @begin
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2000.34 -1118.54 26.78
0107: 8@ = create_object 1317 at 2000.34 -1118.54 26.78
9@ = 2
goto @begin
end
end
//Groove
if
1@ == 2
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@) 
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2495.36 -1687.35 13.52
0107: 8@ = create_object 1317 at 2495.36 -1687.35 13.52
9@ = 3
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2495.36 -1687.35 13.52
0107: 8@ = create_object 1317 at 2495.36 -1687.35 13.52
9@ = 3
end
end
//Coronos
if
1@ == 3
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1754.97 -1920.92 13.57
0107: 8@ = create_object 1317 at 1754.97 -1920.92 13.57
9@ = 4
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1754.97 -1920.92 13.57
0107: 8@ = create_object 1317 at 1754.97 -1920.92 13.57
9@ = 4
end
end
//Street Racers
if
1@ == 4
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1000.54 2133.28 10.82
0107: 8@ = create_object 1317 at 1000.54 2133.28 10.82
9@ = 5
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1000.54 2133.28 10.82
0107: 8@ = create_object 1317 at 1000.54 2133.28 10.82
9@ = 5
end
end
//San Fierro Rifa
if
1@ == 5
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2457.44 -135.86 26.02
0107: 8@ = create_object 1317 at -2457.44 -135.86 26.02 
9@ = 6
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2457.44 -135.86 26.02
0107: 8@ = create_object 1317 at -2457.44 -135.86 26.02 
9@ = 6
end
end
//Hell Angels
if
1@ == 6
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2581.24 1065.72 10.82
0107: 8@ = create_object 1317 at 2581.24 1065.72 10.82
9@ = 7
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 2581.24 1065.72 10.82
0107: 8@ = create_object 1317 at 2581.24 1065.72 10.82
9@ = 7
end
end
//Black Kings
if
1@ == 7
then
if not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1460.30 2773.63 10.82
0107: 8@ = create_object 1317 at 1460.30 2773.63 10.82
9@ = 8
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1460.30 2773.63 10.82
0107: 8@ = create_object 1317 at 1460.30 2773.63 10.82
9@ = 8
end
end 
end
end
//Конец банд
//Начало мафий
if 1@ == 1
then
0B3B: samp show_dialog id 8 caption "Mafia's" text MAFIAS "Ок" button_2 "Назад" style DIALOG_STYLE_LIST
repeat 
wait 0
until samp.DialogRespond(8, 0@, 1@, 0)
if 0@ == 2
then goto @respawns
end
if 0@ == 1
then
//Yakuza
if 1@ == 0
then
if
not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2245.22 647.63 49.45
0107: 8@ = create_object 1317 at -2245.22 647.63 49.45
9@ = 9
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2245.22 647.63 49.45
0107: 8@ = create_object 1317 at -2245.22 647.63 49.45
9@ = 9
end
end
//La Cosa Nostra
if 1@ == 1
then
if
not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1125.53 -2036.74 69.88
0107: 8@ = create_object 1317 at -2245.22 647.63 49.45
9@ = 10
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 1125.53 -2036.74 69.88
0107: 8@ = create_object 1317 at -2245.22 647.63 49.45
9@ = 10
end
end
//Russian maffia
if 1@ == 2
then
if 
not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2489.10 2363.34 10.27
0107: 8@ = create_object 1317 at -2489.10 2363.34 10.27
9@ = 11
goto @begin
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at -2489.10 2363.34 10.27
0107: 8@ = create_object 1317 at -2489.10 2363.34 10.27
9@ = 11
goto @begin
end
end
//Triads Maffia
if 1@ == 3
then
if 
not 9@ == 0
then
9@ = 0
0164: disable_marker 7@ 
object.Destroy(8@)
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 672.70 -1312.92 13.63
0107: 8@ = create_object 1317 at 672.70 -1312.92 13.63
9@ = 12
else
0AF8: samp add_message_to_chat "Отправляйся на красный маркер! Он отмечен у тебя на GPS радаре." color COLOR_MARKER
02A7: 7@ = create_icon_marker_and_sphere MARKER at 672.70 -1312.92 13.63
0107: 8@ = create_object 1317 at 672.70 -1312.92 13.63
9@ = 12
end
end
end 
end
//Конец мафий
//Начало Фракций
if 1@ == 2
then
0B3B: samp show_dialog id 9 caption "Fraction's" text FRACTIONS "Ок" button_2 "Назад" style DIALOG_STYLE_LIST
repeat 
wait 0
until samp.DialogRespond(9, 0@, 1@, 0)
if 0@ == 2
then goto @respawns
end
if 0@ == 1
then
end 
end
//Конец фракций
end 
end
//Конец респавнов.
//Начало бизнесов
if 1@ == 1
then
end
//Конец бизнесов
end 
end
//Конец мест
if 1@ == 8
then
if 
not 9@ == 0
then
9@ = 0
0AF8: samp add_message_to_chat "Маркер удален." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
else
0AF8: samp add_message_to_chat "Маркер не создан." color COLOR_MARKER
end
end
if 1@ == 9
then 
0AF8: samp add_message_to_chat "Данный скрипт собирает множество вводиммых команд в одно меню." COLOR_ORANGE
0AF8: samp add_message_to_chat "Так же в скрипте присутствует меню, которое показывает, где находяться мафии, банды и т.д" COLOR_ORANGE
end
end
//Удаление маркеров
//Вагос
if and 
9@ == 1
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2810.45 -1185.55 25.30 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Ballas
if and 
9@ == 2
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2000.34 -1118.54 26.78 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Groove
if and 
9@ == 3
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2495.36 -1687.35 13.52 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Coronos
if and 
9@ == 4
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 1125.53 -2036.74 69.88 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Street Racers
if and 
9@ == 5
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 1000.54 2133.28 10.82 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//San Fierro Rifa
if and 
9@ == 6
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2457.44 -135.86 26.02 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Hell Angels
if and 
9@ == 7
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2581.24 1065.72 10.82 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Black Kings
if and 
9@ == 8
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 1460.30 2773.63 10.82 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Yakuza
if and
9@ == 9
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2245.22 647.63 49.45 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//La Cosa Nostra
if and 
9@ == 10
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2245.22 647.63 49.45 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Russian Mafia
if and 
9@ == 11
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -2489.10 2363.34 10.27 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
//Triad's Mafia
if and 
9@ == 12
00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 672.70 -1312.92 13.635 radius 1.0 1.0 1.0 
then
9@ = 0
0AF8: samp add_message_to_chat "Ты добралься до маркера." color COLOR_MARKER
0164: disable_marker 7@ 
object.Destroy(8@)
end
end
 
  • Нравится
Реакции: itsLegend

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,446
А разукрасить текст в диалоге можно?
 

FYP

Известный
Администратор
1,757
5,684
нужны вычесления:
создания объекта за другим игроком, при этом не зависит от другово игрока как он стоит, а зависит от твоего место нахождения т.е. как не посмотрешь на игрока, объект должен как бы прятатся за другим игроком, на которого смотришь
[2]
получаешь угол по оси z между тобой и игроком, получаешь косинус и синус этого угла, инвертируешь, умножаешь на расстояние, которое должно быть от игрока до объекта, значение, полученное в результате вычислений с косинусом, прибавляешь к координате x, значение, полученное в результате вычислений с синусом - к координате y.
Код:
0AC8: 0@ = allocate_memory_size 128
0AD3: string 0@ format  "%cFF0000%cColored dialog" 123 125
0B3B: samp show_dialog id 3 caption "Test" text 0@ button_1 "OK" button_2 "" style DIALOG_STYLE_MSGBOX
покажет диалог с текстом красного цвета. цвет должен указываться в шеснадцатиричной с/с без альфа-канала.
 
  • Нравится
Реакции: itsLegend

Dark_Knight

Me, me and me.
Друг
4,056
2,074
При любой значении 20@v в чат пишется "Введитие секцию для редактирования ".
Код:
:setting
0B35: samp 0@ = get_last_command_params
0AD4: 3@ = scan_string 0@ format "%s" 20@v
if or
20@v == "Active"
20@v == "Health"
20@v == "Icon_Health"
20@v == "Armor"
20@v == "Icon_Armor"
20@v == "Money"
20@v == "Icon_Money"
20@v == "Gun_Name"
20@v == "Gun_Ammo"
then
30@ = 1
jump @check
else
30@ = 0
end
if or
20@v == "Icon_Gun"
20@v == "Health_Numbers"
20@v == "Health_Word"
20@v == "Speed_Numbers"
20@v == "Speed_Word"
20@v == "Name_Car"
20@v == "Time_Local"
20@v == "Zone_Text"
20@v == "Nickname"
then
30@ = 1
jump @check
else
30@ = 0
end
if or 
20@v == "Ping"
20@v == "Down_Bar"
20@v == "Car_Bar" 
20@v == "Time_Bar"
20@v == "Up_Bar"
20@v == "GNickname"
20@v == "Texture1"
20@v == "Texture2"
20@v == "Texture3"
then
30@ = 1
jump @check
else
30@ = 0
end
:check
if 30@ == 1
then
message "Заебись" COLOR_GREY
else 
message "Введитие секцию для редактирования" COLOR_GREY
end
samp.CmdRet()
 

fonarik

Известный
206
3
Ребят,в чем тут ошибка?
Код:
{$CLEO .cs}
0000: NOP
thread "warp"
if not 0@ = SAMP.Base()
then 0a93:
end
 
repeat
wait 200
until SAMP.Available()
0B34: samp register_client_command "warp" to_label @warp
 
while true
wait 0
end
 
:warp
wait 0
if 0B35: samp is_command_typed 0@ params 1@
then
    0AD4: 3@ = scan_string 1@ format "%d" 2@
    if not 3@ < 0
    then
        if SAMP.IsPlayerConnected(2@)
        then
            0B20: samp 3@ = actor_handle_from_samp_playerid 2@
            if actor.Defined(3@)
            then
                Actor.StorePos(3@, 5@ 6@ 7@)
                wait 0
                Actor.PutAt($player_actor, 5@ 6@ 7@)
                0B36: samp 4@ = get_player_nickname 2@
                0AD1: show_formatted_text_highpriority "Player tp k %s" time 4000 2@
                wait 1000
            end
        end
    end
end             
0B43: samp cmd_ret
 

DubStep_

Известный
292
52
1. Как сделать чтобы cleo рапускалось путем коммандой в чат, пример: /hp -> прибавилось 100 хп.
2. Каким опкодом телепортироватся к игроку? Если таковой имеется.
 

fonarik

Известный
206
3
1. Как сделать чтобы cleo рапускалось путем коммандой в чат, пример: /hp -> прибавилось 100 хп.
0B34: samp register_client_command "hp" to_label @hp_1

while true
wait 0
end
:hp_1
15@ = SAMP.RegisterClientCommand()
0AD4: 29@ 15@ format "%d" 15@
if
15@ > -1

jf @hp_3
:hp_2
wait 0
Actor.Health($player_actor) = 15@
:hp_3
SAMP.CmdRet
как-то так
2. Каким опкодом телепортироватся к игроку? Если таковой имеется.
Тут целый код нужен,смотри мой пост,исправь ошибку в моем клео) и будет тебе тп
 

gwplayer

Известный
Друг
188
35
Код:
{$CLEO .cs}
0000:
thread "killstats"
0662: "by includelow"
 
const
self = $PLAYER_ACTOR
VK_RCONTROL = 0xA3
VK_KEY_3 = 0x33
VK_KEY_4 = 0x34
SAMP_BASE = 29@
 
end
 
if
  8AF7: get_samp_base_to SAMP_BASE
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
// ================================== MAIN ================================== //
0B34: samp register_client_command "killstats" to_label @killstats
0B34: samp register_client_command "nullstats" to_label @nullstats
while true
 
 
:fragshow
wait 0
if Actor.Defined($PLAYER_ACTOR)
    then   
    if 0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
        then
        if and
        051A:  actor 0@ damaged_by_actor $PLAYER_ACTOR
        Actor.Dead(0@)
            then
            $frags += 1
            end
    end
end
 
:killstats
wait 0
if 0B35: samp is_command_typed 0@ params 1@
    then
    0AF8: samp add_message_to_chat "You have %d frags" $frags
end
SAMP.CmdRet
 
:nullstats
wait 0
if 0B35: samp 0@ = get_last_command_params
    then
    $frags = 0
end
SAMP.CmdRet
end
Просто не регирует на команды. В чем ошибка?
 

Dark_Knight

Me, me and me.
Друг
4,056
2,074
Чуть не так надо. И не используй такие "$frags" глобальные переменные
Код:
{$CLEO}

const
COLOR_RED = 0xFF0000
COLOR_GREEN = 0x00FF0C
COLOR_BLUE = 0x0095FE
COLOR_GREY = 0xB4B5B7
DELAY = 500
YEAR = 0@
MONTH = 1@
DAY_OF_WEEK = 3@
DAY = 4@
HOUR = 5@
MINUTE = 6@
SECOND = 7@
MILISECOND = 8@
MENU = 13@
DIALOG_STYLE_MSGBOX = 0
DIALOG_STYLE_INPUT = 1
DIALOG_STYLE_LIST = 2
DIALOG_STYLE_PASSWORD = 3
end

0000:

if not 29@ = samp.base()
then
0A93: end_custom_thread 
end

repeat
wait 400
until samp.Available()

0B34: samp register_client_command "coord" to_label @coord

while true
wait 0
end

:coord
if
8AAB: file_exists "Cleo\logs"
then
0AE5: create_directory "Cleo\logs" //IF and SET
end
0B35: samp 0@ = get_last_command_params
0AD4: 28@ = scan_string 0@ format "%s" 10@v

if
8AAB: file_exists "Cleo\logs\coords.log"
then
0A9A: 9@ = openfile "Cleo\logs\coords.log" mode "at"
0D2D: get_local_time_year_to YEAR month_to MONTH day_of_week_to DAY_OF_WEEK day_to DAY hour_to HOUR minute_to MINUTE second_to SECOND milliseconds_to MILISECOND
0A9B: closefile 9@
end
actor.StorePos($player_actor, 11@,12@,13@)
0A9A: 9@ = openfile "Cleo\logs\coords.log" mode "at"
0D2D: get_local_time_year_to YEAR month_to MONTH day_of_week_to DAY_OF_WEEK day_to DAY hour_to HOUR minute_to MINUTE second_to SECOND milliseconds_to MILISECOND
0AD9: write_formatted_text "[%02d:%02d:%02d] %0.2f %0.2f %0.2f название локации %s%c" in_file 9@ HOUR MINUTE SECOND 11@ 12@ 13@ 10@v 10
0A9B: closefile 9@
samp.CmdRet()
 

Dark_Knight

Me, me and me.
Друг
4,056
2,074
Можно ли как-то использовать шрифты винды при рисовки текста, а не САшные?
 

DubStep_

Известный
292
52
какой опкод заставляет бибикать авто?
какие коды клавиш: mouse4, mouse5?
возможно ли сделать чтобы как в quick binder в чат сообщение писалось, но не отправлялось?