Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: 1 [2]
16  Scripting / Script Help / Re: godmode for admin.. on: July 03, 2015, 11:17:05 pm
Make a client script.
In it:
Code: [Select]
local godmode = false;

function onClientRender() {
local plr = FindLocalPlayer();
if (godmode)
{
plr.Health = 100;
plr.Armour = 100;
}
}

function onClientCommand ( szCommand, szParams )
{
if (szCommand == "godmode")
{
if (godmode) {
godmode = false;
Message("Godmode turned off");
}
else {
godmode = true;
Message("Godmode turned on");
}
}
return 1;
}
Note: this will glitch it when your car explodes while you're inside it. It will register the death twice, instead of not dying. This is only good for water accidents, pvp matches, etc

If you want to make it admin only, then here's the script for that:
Code: [Select]
local godmode = false;
local isadmin = false;

function onClientRender() {
local plr = FindLocalPlayer();
if (godmode)
{
plr.Health = 100;
plr.Armour = 100;
}
}

function onClientSpawn( pClass )
{
local player = FindLocalPlayer();
if (player.Name == "yournamehere")
{
IsAdmin = true;
}
}

function onClientCommand ( szCommand, szParams )
{
if (szCommand == "godmode")
{
if (IsAdmin)
{
if (godmode) {
godmode = false;
Message("Godmode turned off");
}
else {
godmode = true;
Message("Godmode turned on");
}
}
}
return 1;
}
17  Scripting / Script Help / Turismo race on: June 22, 2015, 08:24:40 pm
Could someone give me a script for Turismo race?
Thanks
Pages: 1 [2]
© Liberty Unleashed Team.