[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
Страница 1 из 11
Форум » Игры серии GTA » GTA IV » Исходные коды скриптов к GTA 4
Исходные коды скриптов к GTA 4
wmysterio
Администраторы
Скриптер
27.09.13 16:01
Offline
В общем здесь можете публиковать коды различных скриптов. Я начну первый, скрипт самого необходимого:

Кнопки:
1 - все иммунитеты + транспорт
2 - дать оружие
3 - телепорт к маркеру на карте
4 - дать денег

Цифровая клавиатура(NUMLOCK)
1-9 - спавнить транспорт возле Нико

Код
using System;
using System.Windows.Forms;
using System.Drawing;
using GTA;

namespace TestScript {

     public class Thread : Script {

         public bool ImmunOn = true;

         public Thread() {
             this.KeyDown += new GTA.KeyEventHandler( Thread_KeyDown );
         }

         void Thread_KeyDown( object sender, GTA.KeyEventArgs e ) {
             Vector3 Pos = Player.Character.Position;
             Pos.X += 2.0F;

             switch ( e.Key ) {
                 case Keys.D1: {
                         Player.Character.MakeProofTo( ImmunOn, ImmunOn, ImmunOn, ImmunOn, ImmunOn );
                         Game.DisplayText( "Immun " + ImmunOn.ToString() );
                         ImmunOn = !ImmunOn;
                         try {
                             Player.Character.CurrentVehicle.MakeProofTo( ImmunOn, ImmunOn, ImmunOn, ImmunOn, ImmunOn );
                         } catch { return; }
                         break;
                     }

                 case Keys.D2: {
                         Player.Character.Weapons.MP5.Ammo += 400;
                         Player.Character.Weapons.AssaultRifle_AK47.Ammo += 400;
                         Player.Character.Weapons.SniperRifle_M40A1.Ammo += 400;
                         Player.Character.Weapons.RocketLauncher.Ammo += 400;
                         Game.DisplayText( "Ammo gived" );
                         break;
                     }

                 case Keys.D3: {
                         try {
                             Player.TeleportTo( Game.GetWaypoint().Position );
                             Game.DisplayText( "Teleport successful" );
                         } catch { return; }
                         break;
                     }

                 case Keys.D4: {
                         Player.Character.Money += 100000;
                         break;
                     }

                 case Keys.NumPad1: {
                     World.CreateVehicle( new Model( "TURISMO" ), Pos );  
                     break;
                     }

                 case Keys.NumPad2: {
                     World.CreateVehicle( new Model( "NRG900" ), Pos );
                         break;
                     }

                 case Keys.NumPad3: {
                     World.CreateVehicle( new Model( "SANCHEZ" ), Pos );
                         break;
                     }

                 case Keys.NumPad4: {
                     World.CreateVehicle( new Model( "SABREGT" ), Pos );
                         break;
                     }

                 case Keys.NumPad5: {
                     World.CreateVehicle( new Model( "ROMERO" ), Pos );
                         break;
                     }

                 case Keys.NumPad6: {
                     World.CreateVehicle( new Model( "LOKUS" ), Pos );
                         break;
                     }

                 case Keys.NumPad7: {
                     World.CreateVehicle( new Model( "COMET" ), Pos );
                         break;
                     }

                 case Keys.NumPad8: {
                     World.CreateVehicle( new Model( "BANSHEE" ), Pos );
                         break;
                     }

                 case Keys.NumPad9: {
                     World.CreateVehicle( new Model( "INFERNUS" ), Pos );
                         break;
                     }
             }
         }
     }  
}

Форум » Игры серии GTA » GTA IV » Исходные коды скриптов к GTA 4
Страница 1 из 11
Поиск: