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

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

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: (2) 1 [2]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Miscellaneous SCO Scripts

 For Alexander Blade's SCOCL
 
Skorpro  
Posted: Tuesday, May 14 2013, 21:24
Quote Post


GTAholiker
Group Icon
Group: Members
Joined: Jul 19, 2009

eu.gif

XXXXX



Hi,
this time I post a small demonstration how to enter cutscene rooms like Tony's apartment (TBOGT only!) without any trainer(s).
Visit the red X on map and then press "T" to enter.



CODE

// Cutscene Room: Tony's apartment by SKORPRO
// Thanx to Alexander Blade, sjaak327 and Billsy93

#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>


void main(void)
{
if (GET_CURRENT_EPISODE() == 2) // 2=TBOGT
{
 Blip CSBlip;
 Object CSObject;
 REQUEST_MODEL(0xCFC254FA);
 while(!HAS_MODEL_LOADED(0xCFC254FA)) { WAIT(0); }

 // Obj
 CREATE_OBJECT_NO_OFFSET(0xCFC254FA, -74.3f, -223.7f, 13.6f, &CSObject, 1); // z-1
 SET_OBJECT_VISIBLE(CSObject, 0);
 SET_OBJECT_COLLISION(CSObject, 0);

 // Blip
 ADD_BLIP_FOR_OBJECT(CSObject, &CSBlip);
 CHANGE_BLIP_SPRITE(CSBlip, BLIP_PLAYBOY_X_RED);
 CHANGE_BLIP_SCALE(CSBlip, 0.5f);
 CHANGE_BLIP_DISPLAY(CSBlip, 4);
 SET_BLIP_AS_SHORT_RANGE(CSBlip, 1);
 CHANGE_BLIP_NAME_FROM_ASCII(CSBlip, "Tony's apartment");

 while(TRUE)  // The real script LOOP !
 {
  if (LOCATE_CHAR_ON_FOOT_3D(GetPlayerPed(), -74.3f, -223.7f, 14.6f, 2.0f, 2.0f, 2.0f, 0))
  {
   PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "Press  'T'  to enter Tony's apartment!", 500, 1);
   if (IS_GAME_KEYBOARD_KEY_PRESSED(20)) // Press "T"
   {
    DO_SCREEN_FADE_OUT(1000);
    WAIT(1000);
    CLEAR_NAMED_CUTSCENE("tony");
    SET_PLAYER_CONTROL(GetPlayerIndex(), 1);
    SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), -74.933f, -204.725f, 32.81f);
    SET_CHAR_HEADING(GetPlayerPed(), 180.0f);
    LOAD_ALL_OBJECTS_NOW();
    INIT_CUTSCENE("tony");
    WAIT(1200);
    SET_CAM_BEHIND_PED(GetPlayerPed());
    DO_SCREEN_FADE_IN(1000);
   }
  }
  if (LOCATE_CHAR_ON_FOOT_3D(GetPlayerPed(), -74.549f, -199.814f, 32.809f, 2.0f, 2.0f, 2.0f, 0))
  {
   FREEZE_CHAR_POSITION(GetPlayerPed(), 1);
   DO_SCREEN_FADE_OUT(1000);
   WAIT(1000);
   CLEAR_NAMED_CUTSCENE("tony");
   SET_PLAYER_CONTROL(GetPlayerIndex(), 1);
   SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), -74.213f, -226.05f, 14.652f);
   SET_CHAR_HEADING(GetPlayerPed(), 180.0f);
   SET_CAM_BEHIND_PED(GetPlayerPed());
   WAIT(1200);
   FREEZE_CHAR_POSITION(GetPlayerPed(), 0);
   DO_SCREEN_FADE_IN(1000);
  }
  // Wait!
  WAIT(0);
 }
}
WAIT(0);
}


Special thanx to Alexander Blade, sjaak327 and Billsy93 cookie.gif cookie.gif cookie.gif

@ALL:
NOTE: All my scripts are for free use! Be fair: Please make a small credit like "Thanx to Skorpro" (in your Readme.txt and/or Topic)! Thanx
smile.gif

This post has been edited by Skorpro on Tuesday, May 14 2013, 21:48
Users WebsitePM
  Top
 

 

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

0 Members:

Pages: (2) 1 [2] 

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



 
IMG IMG