IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Armour Mod but does not work

 
Saint Burak  
Posted: Tuesday, May 1 2012, 15:42
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Nov 4, 2010

XXXXX



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

This post has been edited by Saint Burak on Tuesday, May 1 2012, 15:52
PM
  Top
 

 
G-Modifications  
Posted: Tuesday, May 1 2012, 16:45
Quote Post


G
Group Icon
Group: Members
Joined: Oct 24, 2011

be.gif

XXXXX



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
PM
  Top
 

 
Saint Burak  
Posted: Tuesday, May 1 2012, 16:52
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Nov 4, 2010

XXXXX



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
PM
  Top
 

 
Bad.boy!  
Posted: Tuesday, May 1 2012, 18:00
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



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


This post has been edited by Bad.boy! on Tuesday, May 1 2012, 18:11
PM
  Top
 

 
Deji  
Posted: Tuesday, May 1 2012, 18:16
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



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

This post has been edited by Deji on Tuesday, May 1 2012, 18:19
Users WebsitePM
  Top
 

 
Saint Burak  
Posted: Wednesday, May 2 2012, 12:09
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Nov 4, 2010

XXXXX



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

 
Saint Burak  
Posted: Thursday, May 3 2012, 21:30
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Nov 4, 2010

XXXXX



please help me I really need that.
PM
  Top
 

 
Bad.boy!  
Posted: Thursday, May 3 2012, 22:11
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



Learn coding, or post it in the request topic
PM
  Top
 

 
Saint Burak  
Posted: Friday, May 4 2012, 18:03
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Nov 4, 2010

XXXXX



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

 
Link2012  
Posted: Friday, May 4 2012, 18:38
Quote Post


Wut?
Group Icon
Group: Members
Joined: Jan 30, 2011

ba.gif

XXXXX



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
PMMSN
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG