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)


Pages: (44) « First ... 42 43 [44]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 GTA:SA Opcodes

 Discussion thread
 
fastman92  
Posted: Saturday, Jan 14 2012, 18:25
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



QUOTE (ZAZ @ Saturday, Jan 14 2012, 18:55)
QUOTE (Midnightz @ Saturday, Jan 14 2012, 16:24)
The behavior of opcode:

CODE
83D9:   not save_done


...is such that it checks if the player has exited the save menu (after saving or cancelling regardless).

Is there a method/opcode/hack to check if the game was actually saved or just canceled - to determine which?

Thanks,
-Midnightz

i assume it checks only for one time, like this meaning: "if user ever made a save"
i don't know any way to check if a save was done again but the save script of origin main.scm make the player first frozen which can be checked

It returns true always when user came back from Menu >> Save game, because it`s really set up by 03D8 opcode.
03D8 - set menu.isSaveDone, pause game, go to "save game" menu
03D9 - should happen when the game is resumed, user came back from "save game" menu. It doesn`t determine whether user made a save, but whether 03D8: show_save_screen was executed currently.
The game automatically resets menu.isSaveDone to 0 after the first processing SCM scripts.

CODE
   case 0x3D8:
     if ( getPlayerPed(-1) )
     {
       v132 = getPlayerPed(-1)->PedFlags.Flags1;
       if ( !(BYTE1(v132) & 1) )
       {
         menu.isSaveDone = 1;
         v133 = (CPhysical *)getPlayerPed(-1);
         CPhysical__setSpeed(v133, 0.0, 0.0, 0.0);
         v134 = getPlayerPed(-1);
         sub_45AFB0(v134, 0, 0, 0);
       }
     }
     return 0;
   case 0x3D9:
     if ( menu.bIsActive || (v151 = 1, menu.isSaveDone) )
       v151 = 0;
     CScriptThread__setCondResult(a2, v151);
     return 0;
Users WebsitePMMSN
  Top
 

 
Waltzing Mouse  
Posted: Saturday, Jan 14 2012, 18:30
Quote Post


Punk-ass Bitch
Group Icon
Group: Members
Joined: May 27, 2008

jolly-roger.gif

XXXXX



Technically converting degrees to radians is (x*pi)/180 but 180/pi is ~57.29 so you can use that to some extent, though in pure mathematics the result is incorrect after a certain number of decimal places.
PMMSN
  Top
 

 
Midnightz  
Posted: Saturday, Jan 14 2012, 18:48
Quote Post


Populus vult decipi.
Group Icon
Group: Members
Joined: Feb 5, 2007

us.gif

XXXXX



Thanks for the replies and help guys. smile.gif

fastman92, if I'm reading that code right, it's just checking if the game reset 03D8 to 0, correct?

I'm not trying to intercept the original script to determine if the save menu was opened. I need some way of checking if an actual save was made or if the player canceled from the save menu.

Why: I've written a code similar to the original for a new savepoint. My code advances time 6 hours, the same as any other save works. The problem is that I have no way of determining if a save was made or saving was canceled and my code, without that type of check, advances time for both scenarios.


EDIT: I guess a better way to put it is this... How can I determine what the player selected in the save menu? A Save Slot OR Cancel.

This post has been edited by Midnightz on Saturday, Jan 14 2012, 18:52
Users WebsitePM
  Top
 

 
fastman92  
Posted: Saturday, Jan 14 2012, 18:57
Quote Post


фастман92 | ف
Group Icon
Group: Members
Joined: Jul 28, 2009

pl.gif

XXXXX



I have no time for this. It is possible when you patch some menu routine.
Users WebsitePMMSN
  Top
 

 
DK22Pac  
Posted: Friday, Mar 9 2012, 09:30
Quote Post


Assembly. / Acceмбли.
Group Icon
Group: Members
Joined: Apr 12, 2009

un.gif

XXXXX



CODE
03ED: set_car 0@ enable_taxi_light true

Isn't it?

This post has been edited by DK22Pac on Friday, Mar 9 2012, 09:42
Users WebsitePM
  Top
 

 
Deji  
Posted: Friday, Mar 9 2012, 11:29
Quote Post


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

ja.gif

XXXXX



If yeh wanna check if the game has been saved, you could compare the save path: 0xC15F60
Or the save file handle: 0xC16EF0
Users WebsitePM
  Top
 

 
stanesicmario  
Posted: Tuesday, Jun 19 2012, 22:39
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 15, 2012

XXXXX



Hi I need help I am new in the gta sa multiplayer and I had buy the server but i need the scripter-peoples to work for me but it need to wright on the croatian languages??? Is anyone here the scripter who can help me please ???? And yess of course I will pay you with paypal ...thx to all for scripting mods smile.gif wink.gif
PM
  Top
 

 
Adler  
Posted: Wednesday, Jun 20 2012, 18:15
Quote Post


Easily Amused
Group Icon
Group: Leone Family Mafia
Joined: Jul 25, 2009

us.gif

XXXXX



QUOTE (stanesicmario @ Tuesday, Jun 19 2012, 14:39)
Hi I need help I am new in the gta sa multiplayer and I had buy the server but i need the scripter-peoples to work for me but it need to wright on the croatian languages??? Is anyone here the scripter who can help me please ???? And yess of course I will pay you with paypal ...thx to all for scripting mods smile.gif wink.gif

You're in the wrong topic, and it'd be best not to ask for help without first showing proof of progress so people would be inclined to help you.

And payment, I'm sure, isn't enough to entice people to help you out as most modders are intrinsically motivated to create mods, and adding money as a factor in this only complicates matters.
PM
  Top
 

 
Link2012  
Posted: Monday, Aug 27 2012, 19:55
Quote Post


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

ba.gif

XXXXX



Opcode 0876 created birds, but it is written a bit wrong internally, oh R* programmers...

user posted image
Ignore the bird color in red tounge.gif

CODE
0876: create_birds_at 0 0 0 destination 0 0 0 birds_count 3 bird_type 0


CODE
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 3.0 2.0
008C: 0@ = float_to_integer 0@
008C: 1@ = float_to_integer 1@
008C: 2@ = float_to_integer 2@
0876: create_birds_at 0@ 1@ 2@ destination -2630 1411 28 birds_count 3 bird_type 0


The opcode expects integers instead of floats in the coordinates params, If you see in main.scm the opcode send floats as coordinates and then the bird will be spawned in some crazy place (and then removed since it's too far from the camera).

Destination only serves to describe the bird angle...


EDIT: I was wrong about topic title ok, Topic title shouldn't change whatsthat.gif

This post has been edited by Link2012 on Tuesday, Aug 28 2012, 02:15
PMMSN
  Top
 

 
Deji  
Posted: Monday, Aug 27 2012, 20:53
Quote Post


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

ja.gif

XXXXX



Haha. Fun find (I'm sure this was supposed to be in the SA opcode topic, though tounge2.gif). I actually thought it was to block birds in a specified area, but had doubts due to the integer params and thought it might block more than one thing. Never bothered to actually test it, though. Just theorized a lot tounge.gif
Users WebsitePM
  Top
 

 
SilentPL  
Posted: Monday, Aug 27 2012, 20:54
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




QUOTE (Link2012 @ Monday, Aug 27 2012, 21:55)
EDIT: Topic title should change  whatsthat.gif

This is not SA opcodes topic though whatsthat.gif

---

It is now. wink.gif

This post has been edited by Adler on Tuesday, Aug 28 2012, 05:04
Users WebsitePMMSNXbox Live
  Top
 

 
Link2012  
Posted: Monday, Aug 27 2012, 20:59
Quote Post


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

ba.gif

XXXXX



I never thought there was a topic for SA, since I never saw it bumped...
I will contact moderation to move my post then.
PMMSN
  Top
 

 
Deji  
Posted: Monday, Aug 27 2012, 21:04
Quote Post


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

ja.gif

XXXXX



QUOTE (Link2012 @ Monday, Aug 27 2012, 20:59)
I never thought there was a topic for SA, since I never saw it bumped...
I will contact moderation to move my post then.

Hey, if you do that, our subsequent posts won't make any sense!

Oh yeah, better stop posting, just giving the moderator more to do moto_whistle.gif
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Wednesday, Jan 16 2013, 21:28
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




0835: returns the in-game day of the month and month of the year
but the joke is: the day changes by each savegame
the days are counting to 31 and change then the month value
I don't know if it consider months with 30 or 28 days
CODE
{$CLEO .cs}
thread 'DYMONTH'

while true
wait 0
0835: get_month_day_to 1@ get_month_to 2@
03F0: enable_text_draw 1
045A: text_draw_1number  50.0  100.0 'NUMBER' 1@    // value
045A: text_draw_1number  50.0  130.0 'NUMBER' 2@    // value
045A: text_draw_1number  50.0  200.0 'NUMBER' $CURRENT_MONTH_DAY    // value
045A: text_draw_1number  50.0  230.0 'NUMBER' $CURRENT_MONTH    // value
end
Users WebsitePM
  Top
 

 
SilentPL  
Posted: Thursday, Jan 17 2013, 16:51
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




Not new, ZAZ tounge.gif

Calendar is fully working in SA, days and months are counted from Jan 1 on the new savegame and saved. Months even have rtheir respective amount of days (February having 29 days, as in real leap year).
Users WebsitePMMSNXbox Live
  Top
 

 

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

0 Members:

Pages: (44) « First ... 42 43 [44] 

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



 
IMG IMG