Opcode 04D7 is what you need:Hello, I am looking for a cleo to freeze my character, just like moderators do in events, preventing the character from moving, thank you very much!
0000: freeze me
const
MYKEY = 81 // Q
end
while true
wait 0
if // and // enabler
0AB0: key_pressed MYKEY
// 8B21: not samp is_chat_opened // if you have no sampfuncs delete this line
then
04D7: _actor $PLAYER_ACTOR _freeze true
while 0AB0: key_pressed MYKEY
wait 0 // anti key spam
end
while 8AB0: not key_pressed MYKEY
wait 0 // disabler
end
04D7: _actor $PLAYER_ACTOR _freeze false
end
end
0000: freeze me
const
MYKEY = 81 // Q // the script can be toggled using this key
end
while true
wait 0
if and // enabler
0AB0: key_pressed MYKEY
8B21: not samp is_chat_opened
then
04D7: _actor $PLAYER_ACTOR _freeze true
0ACD: print_string_now "~b~FREEZE: ~g~ON" time 2000
while 0AB0: key_pressed MYKEY
wait 0 // anti key spam
end
while true
if and
0AB0: key_pressed MYKEY
8B21: not samp is_chat_opened
then break // disabler
else wait 0
end
end
04D7: _actor $PLAYER_ACTOR _freeze false
0ACD: print_string_now "~b~FREEZE: ~r~OFF" time 2000
end
end