Jump to content

Problems with script


philz

Recommended Posts

Hi, 
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.