DAZZLE'S UPGRADE PACK
If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD .
Modding questions, answers, help.....
Moderators: Warfare , Moderator , Admin
DJ Wings
Need Major Repair
Posts: 895 Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.
Post
by DJ Wings » Sat Apr 26, 2008 9:45 am
Add a command to put a player's tank on cruise control via an AI while they're AFK, and another to disable it when they return.
Here's the code, for anyone who wants to use it:
Code: Select all
function afk(%sender)
{
%sender.player.setAI(GoldLightAI);
}
function back(%sender)
{
%sender.player.setAI(none);
}
Last edited by
DJ Wings on Sun Apr 27, 2008 4:28 am, edited 1 time in total.
Never really gone, never really part of the game.
fresh_305
New Brainjar
Posts: 11 Joined: Wed Feb 20, 2008 10:04 pm
Post
by fresh_305 » Sat Apr 26, 2008 12:28 pm
Ahh, Cool. Thnx
MusickTMG
Veteran Light
Posts: 1903 Joined: Mon Jun 25, 2007 8:59 pm
Location: San Diego, California
Post
by MusickTMG » Sat Apr 26, 2008 1:17 pm
isnt this the same as the possess code, its puts your tank on a ai, and it drives and shoots its self.
Musick-TMG-
"I got a idea"
DJ Wings
Need Major Repair
Posts: 895 Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.
Post
by DJ Wings » Sat Apr 26, 2008 4:14 pm
Musick: Sort of. The possession code can't be controlled, whereas for this one, it's intended as a tool rather than a gameplay element.
Fresh_305: Don't get your hopes up. You can't just add the code and run it, you have to edit NormalCodes.cs to call it.
Never really gone, never really part of the game.
MusickTMG
Veteran Light
Posts: 1903 Joined: Mon Jun 25, 2007 8:59 pm
Location: San Diego, California
Post
by MusickTMG » Sat Apr 26, 2008 5:42 pm
I see what you mean, i will have to give it a try when i have some free time
Musick-TMG-
"I got a idea"
DJ Wings
Need Major Repair
Posts: 895 Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.
Post
by DJ Wings » Sun Apr 27, 2008 4:27 am
Edited; the old approach wouldn't work.
Never really gone, never really part of the game.
ArtCrazy
Veteran Member
Posts: 290 Joined: Fri Dec 29, 2006 10:14 am
Post
by ArtCrazy » Sun Apr 27, 2008 7:35 am
In case you didn't notice, the possess code does exactly what you wrote:
$ACAS::CodesFolder::Function[10] = "possess";
$ACAS::CodesFolder::Shortcut[10] = "/possess";
$ACAS::CodesFolder::Description[10] = "Possess Player";
$ACAS::CodesFolder::GuiArgs[10] = "SelectedPlayer";
$ACAS::CodesFolder::Function[11] = "unpossess";
$ACAS::CodesFolder::Shortcut[11] = "/unpossess";
$ACAS::CodesFolder::Description[11] = "Unpossess Player";
$ACAS::CodesFolder::GuiArgs[11] = "SelectedPlayer";
function possess(%sender,%msg)
{
%match = matchClientName(%msg);
%client = firstword(%match);
%status_msg = restWords(%match);
if(%client == -1)
{
commandToClient(%sender,'CenterPrint', %status_msg,4,4);
return;
}
%client.player.setai(GoldLightAI);
centerprintall(%client.namebase SPC "has been possessed!",4,4);
}
function unpossess(%sender,%msg)
{
%match = matchClientName(%msg);
%client = firstword(%match);
%status_msg = restWords(%match);
if(%client == -1)
{
commandToClient(%sender,'CenterPrint', %status_msg,4,4);
return;
}
%client.player.setai("");
%client.setControlObject(%client.player);
centerprintall(%client.namebase SPC "has been unpossessed!",4,4);
}
And it's reverseable using /unpossess
DJ Wings
Need Major Repair
Posts: 895 Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.
Post
by DJ Wings » Sun Apr 27, 2008 7:59 am
*coughcoughadminonlycoughcough*
Never really gone, never really part of the game.
ArtCrazy
Veteran Member
Posts: 290 Joined: Fri Dec 29, 2006 10:14 am
Post
by ArtCrazy » Tue Apr 29, 2008 11:11 am
You can configure it to be non-admins too... You can even let non-admins ban people if you feel like it.
Users browsing this forum: ClaudeBot [Bot] and 20 guests