Player Model
The player character is referred to in the script as
These models are all
To change the model of your player character into a poodle you can write the following function:
Game.Player.ChangeModel(PedHash.Poodle);
Add this line inside the
using System;
using System.Windows.Forms;
using System.Drawing;
using GTA;
using GTA.Math;
using GTA.Native;
namespace moddingTutorial
{
public class moddingTutorial : Script
{
public moddingTutorial()
{
this.Tick += onTick;
this.KeyUp += onKeyUp;
this.KeyDown += onKeyDown;
}
private void onTick(object sender, EventArgs e)
{
//what is inside here gets executed continuously
}
private void onKeyUp(object sender, KeyEventArgs e)/
{
//what is inside here is executed only when we release a key
}
private void onKeyDown(object sender, KeyEventArgs e)
{
//what is inside here is executed only when we press a key
if(e.KeyCode == Keys.H) //when pressing the 'H' key
{
//change the player character into a different model
Game.Player.ChangeModel(PedHash.Poodle);
}
}
}
}
Remember to press
Try to select different models and assign them to different keys to change the model of your character. Use keys that are not already implemented in the game controls to avoid clashes with built in operations.