Quantcast

Jump to content

» «
Photo

Armour Mod but does not work

9 replies to this topic
Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#1

Posted 01 May 2012 - 03:42 PM Edited by Saint Burak, 01 May 2012 - 03:52 PM.

CODE
:jscdr
wait 0
04DD: $jjjk = actor $PLAYER_ACTOR armour
wait 0
if
not actor.armour($Player_Actor) = $jjjk
jf @JSCDR
wait 0
04DD: $jjk = actor $PLAYER_ACTOR armour
wait 0
if
actor.Armour($Player_Actor) = $jjk
wait 5000
if
actor.Armour($Player_Actor) = $jjk
jf @JSCDR1

:jscdr1
wait 0
035F: actor $Player_Actor armour += 5
wait 0
jump @jscdr


I want to do that "if actor's armour is not 100 and now actor not got hurt, add +5 to armour" but it fulls armour.what is problem? like in crysis

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#2

Posted 01 May 2012 - 04:45 PM

CODE
:ARMOUR
wait 0
04DD: $ARMOUR = actor $PLAYER_ACTOR armour
if
 not actor.armour($Player_Actor) == 100
jf @ARMOUR
035F: actor $Player_Actor armour += 5
wait 5000
jump @ARMOUR


This maybe?

G-Modifications

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#3

Posted 01 May 2012 - 04:52 PM

QUOTE (G-Modifications @ Tuesday, May 1 2012, 16:45)
CODE
:ARMOUR
wait 0
04DD: $ARMOUR = actor $PLAYER_ACTOR armour
if
 not actor.armour($Player_Actor) == 100
jf @ARMOUR
035F: actor $Player_Actor armour += 5
wait 5000
jump @ARMOUR


This maybe?

G-Modifications

does not works.gives error.I am trying on gta san andreas

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#4

Posted 01 May 2012 - 06:00 PM Edited by Bad.boy!, 01 May 2012 - 06:11 PM.

Try to avoid globals as much as possible in your scripts.

Try this (prevents adding extra armour):
CODE
:ARMOUR
wait 0
04DD: 0@ = actor $3 armour
if
0@ < 100
jf @ARMOUR
0@ += 5
if
   0@ > 100
then
   Actor.Armour($3) = 100
else
   Actor.Armour($3) = 0@
end        
wait 5000
jump @ARMOUR

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci Racing
  • Joined: 24 Dec 2007
  • None

#5

Posted 01 May 2012 - 06:16 PM Edited by Deji, 01 May 2012 - 06:19 PM.

Actually it'd be better to use 04DD and check the result is actually less than 100. As if the armour level was 97 and you added 5, it'd be 102 (not 100). So it'll be adding 5 forever... Unless the game limits the value to 100 (but the max armour can be 150). I dont have access to the IDB to know for sure, but it's always best to assume the game is taking every thing you tell it to do literally.

EDIT: Ah, you already noticed wink.gif

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#6

Posted 02 May 2012 - 12:09 PM

I want if actor's armour is not 100 and if actor does not hurt for 4 seconds, set actours armour 100

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#7

Posted 03 May 2012 - 09:30 PM

please help me I really need that.

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#8

Posted 03 May 2012 - 10:11 PM

Learn coding, or post it in the request topic

Saint Burak
  • Saint Burak

    Square Civilian

  • Members
  • Joined: 04 Nov 2010

#9

Posted 04 May 2012 - 06:03 PM

I already know codding.if I dont know, why did I posted here?

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci Racing
  • Joined: 30 Jan 2011
  • Brazil

#10

Posted 04 May 2012 - 06:38 PM

32@ and 33@ are timers, sure that you learned coding?

Here's what you want, look how simple it is.
CODE
{$CLEO}
var
   0@ : Int    // New armour
   1@ : Int    // Old armour
end
32@ = 0 // Timer

while true
   wait 0
   if 0256:   player $PLAYER_CHAR defined
   then
       04DD: 0@ = actor $3 armour        
       if 0@ <> 1@        
       then
           1@ = 0@
           32@ = 0
           continue
       end
       
       if 32@ >= 4000 // 4 seconds
       then
           gosub @IncreaseArmourBy5
           32@ = 0
       end        
       
   end
end

:IncreaseArmourBy5
0@ += 5
if
  0@ > 100
then
  Actor.Armour($3) = 100
else
  Actor.Armour($3) = 0@
end
return




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users