Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Had a Crack at GTA4 Coding

Featured Replies

Hey guys!

Was a little bored, so I put my C# to the test with a ridiculously simple script.

This script makes the player have their character regenerate full health and armour every 20 seconds, so therefore making them invincible.

It also checks for the key M to be pressed to spawn a faggio. When the faggio is spawned, the player will receive a text box saying the vehicle has spawned. This should work.

/*Sgt.Hoffers; HoffersDesigns(2013-2014) (c)Code Created in NotePad++ Free to use - with fair credit*/using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using GTA;namespace tutorialScript{public class tutScript : Script{	public tutScript()	{		//Sets interval		Interval = 20000;				//bind tick event		this.Tick += new EventHandler(testTick);				//bind keydown event		this.KeyDown += new GTA.KeyEventHandler(testKeyDown);				//Draw Text Handler		this.PerFrameDrawing += new GraphicsEventHandler(gfxDraw);	}			//tick method, ran every 20 seconds		public void testTick(object sender, EventArgs e)		{			Player.Character.Health = 1000;			Player.Character.Armour = 1000;				if (Player.Character.isInVehicle())			{				//Repair				Player.Character.CurrentVehicle.Repair();						//Wash				Player.Character.CurrentVehicle.Wash();			}			}			//key down handler		public void testKey(object sender, GTA.KeyEventArgs e)		{			World.CreateVehicle(Model Model, Vector3 Position);						if(Keys.M == e.Key)			{				//get position to create vehicle				Vector3 vehPos = Player.Character.Position.Around(10.0f);								//create vehicle				World.CreateVehicle(new Model("Faggio"), vehPos);			}			//Draw Text			public void gfxDraw(object sender, GraphicsEventArgs e)			{				//Custom Font				Font f = new Font();				f.Color = Color.CherryRed;				f.Height = 0.25f;								e.graphics.DrawText(0.3f, 0.7f, "Vehicle Spawned", f)			}					}	}}

monkey_funny_face.gif

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.