Napisano dnia: 2011-08-27 02:13:14
Siema.
Mam problem z kodem mojego moda. W planach miał się pokazać znacznik po wpisaniu build a, po kliknięciu lewego przycisku myszy twożyło m4 jako obiekt w miejscu gdzie był znacznik. Może ktoś poprawić ?
Mam problem z kodem mojego moda. W planach miał się pokazać znacznik po wpisaniu build a, po kliknięciu lewego przycisku myszy twożyło m4 jako obiekt w miejscu gdzie był znacznik. Może ktoś poprawić ?
Kod:
{$CLEO .cs}
thread "cheats"
const
TX = 1@
TY = 2@
TZ = 3@
end
while true
wait 0
if
0ADC: test_cheat "BUILD"
then
gosub @AimSelect
gosub @drewno
end
:AimSelect
0881: set_player $PLAYER_CHAR able_to_shoot_weapons 0
while true
wait 0
if
00E1: player 0 pressed_key 6 // Aim Weapon
then
for 4@ = 1.0 to 1000.0 step 1.0
00A0: store_actor $PLAYER_ACTOR position_to TX TY TZ
0A9F: 5@ = current_thread_pointer
000A: 5@ += 0x50
0A8E: 6@ = 5@ + 0xC // (int)
0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 6@ 5@ TZ TY TX 4@
if
86BD: not no_obstacles_between TX TY TZ and 8@ 9@ 10@ solid 1 car 1 actor 0 object 1 particle 0
then
break
end
end
04D5: create_corona_at 8@ 9@ 10@ radius 5.0 type 1 flare 0 RGB 0 0 255
if
00E1: player 0 pressed_key 17 // Fire
then
while 00E1: player 0 pressed_key 17 // Fire
wait 0
end
0881: set_player $PLAYER_CHAR able_to_shoot_weapons 1
return
end
end
end
:drewno
0247: load_model #M4
038B: load_requested_models
0107: 1@ = create_object #M4 at 8@ 9@ 10@
return
end
0A93: end_custom_thread
thread "cheats"
const
TX = 1@
TY = 2@
TZ = 3@
end
while true
wait 0
if
0ADC: test_cheat "BUILD"
then
gosub @AimSelect
gosub @drewno
end
:AimSelect
0881: set_player $PLAYER_CHAR able_to_shoot_weapons 0
while true
wait 0
if
00E1: player 0 pressed_key 6 // Aim Weapon
then
for 4@ = 1.0 to 1000.0 step 1.0
00A0: store_actor $PLAYER_ACTOR position_to TX TY TZ
0A9F: 5@ = current_thread_pointer
000A: 5@ += 0x50
0A8E: 6@ = 5@ + 0xC // (int)
0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 6@ 5@ TZ TY TX 4@
if
86BD: not no_obstacles_between TX TY TZ and 8@ 9@ 10@ solid 1 car 1 actor 0 object 1 particle 0
then
break
end
end
04D5: create_corona_at 8@ 9@ 10@ radius 5.0 type 1 flare 0 RGB 0 0 255
if
00E1: player 0 pressed_key 17 // Fire
then
while 00E1: player 0 pressed_key 17 // Fire
wait 0
end
0881: set_player $PLAYER_CHAR able_to_shoot_weapons 1
return
end
end
end
:drewno
0247: load_model #M4
038B: load_requested_models
0107: 1@ = create_object #M4 at 8@ 9@ 10@
return
end
0A93: end_custom_thread