Author Topic: Need help with my scripting for addon  (Read 821 times)

im trying to make frogme command and i use the ffc's dog mod and changed it so it would work with my frog i need help.

Code: [Select]
if($AddOn__Vehicle_Horse){exec("Add-Ons/Vehicle_Horse/Server.cs");}
exec("./Support.cs");

function serverCmdNormalMe(%Client)
{
NormalMe(%Client);
%Player = %Client.player;
%Player.playthread(0,root);
%Player.setScale("1 1 1");
}

{
clearAllPlayerNodes(%Client.player);
if(%Client.player.getDataBlock() $= "HorseArmor")
{
%Client.Player.hideNode(head);
%Client.Player.hideNode(body);
}
%Client.player.setShapeName("");
}
function serverCmdFrogMe(%Client,%Color)
{
if(FrogConditionsCheck(%Client,'',"Frog",%Color))
{
NormalMe(%Client);
%Client.isFrog = 1;
%Client.FrogColor = %Color;
%Player = %Client.player;
clearAllPlayerNodes(%Player);
%Player.setDataBlock("SmallAnimalArmor");
%Player.hideNode(head);
%Player.hideNode(body);
if(%Player.getScale() $= "1 1 1"){%Player.setScale("0.5 0.5 0.5");}
switch$(%Color)
{
case "":%Player.mountimage(FrogImage,1);
case "red":%Player.mountimage(FrogRedImage,1);
case "blue":%Player.mountimage(FrogBlueImage,1);
case "pink":%Player.mountimage(FrogPinkImage,1);
case "green":%Player.mountimage(FrogGreenImage,1);
case "black":%Player.mountimage(FrogBlackImage,1);
case "white":%Player.mountimage(FrogWhiteImage,1);
case "yellow":%Player.mountimage(FrogYellowImage,1);
case "orange":%Player.mountimage(FrogOrangeImage,1);
case "purple":%Player.mountimage(FrogPurpleImage,1);
}
}
}

function serverCmdFrogHelp(%Client,%Arg)
{
switch(%Arg)
}
function serverCmdFrogSetMiniGameData(%Client,%Info1,%Info2,%Info3)
{
%Minigame = %Client.minigame;

%Minigame.Frog = %Info3;
}

package FrogServer
{
function GameConnection::OnClientEnterGame(%this)
{
Parent::OnClientEnterGame(%this);
cacheAvatarColor(%this);
}

function GameConnection::createplayer(%this,%spawnpoint)
{
Parent::createplayer(%this,%spawnpoint);
else if(%this.isFrog){serverCmdFrogMe(%this,%this.FrogColor);}
}

function serverCmdUpdateBodyColors(%Client,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%facedecal)
{
Parent::serverCmdUpdateBodyColors(%Client,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%facedecal);
cacheAvatarColor(%Client);
}
};
ActivatePackage(FrogServer);

}


if you can help plz help me tell me whats wrong plz

There is so much wrong with that edit of FFC that I cant list it all...

There is so much wrong with that edit of FFC that I cant list it all...
lol... acualy i changed all the dog to frog and ffc to the file name and it wont work and i acualy need help ty

lol... acualy i changed all the dog to frog and ffc to the file name and it wont work and i acualy need help ty
I'll make a new server.cs for you:
Code: [Select]
%error=ForceRequiredAddOn("Player_Frog");

if(%error==$Error::AddOn_Disabled){
 frogArmor.uiName="";
}

if(%error==$Error::AddOn_NotFound){
 error("ERROR: Player_Frog - required add-on Player_Frog not found");
}else{
 exec("./Script_FrogMe.cs");
}
With this server.cs you'll need the Player_Frog.zip in your add-ons folder, or it won't work

Now you'll need a new cs, name it Script_FrogMe.cs
Contain this in the file:
Code: [Select]
function serverCmdFrogMe(%client)
{
if(isObject(%client.player))
{
if(%client.player.getdatablock().getName() $= frogArmor)
{
return;
}else{
%Player = %Client.player;
%Player.setDataBlock("frogArmor");
}
}
}

Contain both .cs files  and a description.txt in the zip

REMEMBER: The script of the frog playertype should make a new Armor called "frogArmor"
if it isn't called "frogArmor", change the frogArmor in the script I made for you to the Armor name of the frog playertype


If you submit this, I want major credit :D
but please, don't release, because people might want to flame you

If you submit this, I want major credit :D
but please, don't release, because people might want to flame you

why would they flame me? :/

didnt work :/ need like a player type code... im horble at it but we all have 2 start somewere
« Last Edit: August 15, 2009, 03:51:59 PM by aware14 »