Hi, new member here.
I'm working on a CLEO script that change player's health to 0 (means make them die) by writing command "/rgame + id" When i finished my code:
{$CLEO .cs}
{$USE CLEO+}
0000: NOP
0B34: samp register_client_command "rgame" to_label @Start
31@ = 0
:main
wait 0
if
31@ == 1
jf @main
31@ = 0
SAMP.CmdRet
jump @main
0B2F: samp get_streamed_out_player_pos 4@ to 7@ 8@ 9@
:start
wait 0
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
if
SAMP.IsPlayerConnected(2@)
4@ = SAMP.GetActorHandleByPlayerID(2@)
if
056D: actor 4@ defined
Actor.Health(4@) = -100
SAMP.CmdRet
I go to test my script and here are the results:
As you can see, when I try to change their health bars to 0 (make them die), what I get are the sounds of deaths and their health bar doesn't change anything.
What's happening? and is there anything wrong? (Using SAMP 0.3DL-R1 with this SAMPFUNCS: https://www.blast.hk/threads/138813/)
Thanks in advanced!
Sorry for bad English :v
I'm working on a CLEO script that change player's health to 0 (means make them die) by writing command "/rgame + id" When i finished my code:
{$CLEO .cs}
{$USE CLEO+}
0000: NOP
0B34: samp register_client_command "rgame" to_label @Start
31@ = 0
:main
wait 0
if
31@ == 1
jf @main
31@ = 0
SAMP.CmdRet
jump @main
0B2F: samp get_streamed_out_player_pos 4@ to 7@ 8@ 9@
:start
wait 0
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
if
SAMP.IsPlayerConnected(2@)
4@ = SAMP.GetActorHandleByPlayerID(2@)
if
056D: actor 4@ defined
Actor.Health(4@) = -100
SAMP.CmdRet
I go to test my script and here are the results:
As you can see, when I try to change their health bars to 0 (make them die), what I get are the sounds of deaths and their health bar doesn't change anything.
What's happening? and is there anything wrong? (Using SAMP 0.3DL-R1 with this SAMPFUNCS: https://www.blast.hk/threads/138813/)
Thanks in advanced!
Sorry for bad English :v