Author Topic: Cityrp adding jobs  (Read 954 times)

Hi, does anyone know how to add jobs to the cityrp script using notpad?

Get the hell out of here!

Yeah,
which version
is it 1.cs
or civilan.cs
For civlian:
Code: [Select]
//============================================================
// Project : CityRPG
// Author : You
// Description : JobName Code file
// ============================================================

$CityRPG::jobs::name = "Name of Job Here";  // the name of job
$CityRPG::jobs::initialInvestment = 0-1000; //how much it costs to get that job
$CityRPG::jobs::pay = 1-1000;     //how much they get payed
$CityRPG::jobs::tools = "hammerImage printerImage wrenchImage";  //default tools
$CityRPG::jobs::datablock = playerNoJet;
$CityRPG::jobs::education = 1-100;

$CityRPG::jobs::sellItems = true/false;
$CityRPG::jobs::sellFood = true/false;
$CityRPG::jobs::sellServices = true/false;

$CityRPG::jobs::law = true/false;
$CityRPG::jobs::canPardon = true/false;

$CityRPG::jobs::thief = truefalse;
$CityRPG::jobs::hideJobName = true/false;

$CityRPG::jobs::offerer = true/false;
$CityRPG::jobs::claimer = true/falsefalse;

$CityRPG::jobs::labor = true/false;

$CityRPG::jobs::tmHexColor = "CCCCCC";
$CityRPG::jobs::helpline = "\c6Describe your job here.";

And for the 1.cs:
Code: [Select]
// ============================================================
// Project : peopleRP
// Author : Iban
// Description : Civilian Code file
// ============================================================
// Table of Contents
// 1. Preferences
// ============================================================



// ============================================================
// ============================================================
// Section 1 : Preferences
// ============================================================
if(!$CityRPG__HasBuiltJobs || !isFile("config/server/IbanMod/CityRPGG/Prefs.cs") || $CityRPG::temp::rebuildPref)
{
$CityRPG::jobs::name[$CityRPG::jobs++] = "Job Name here";
$CityRPG::jobs::initialInvestment[$CityRPG::jobs] = 0-1000; /how much it takes to get this job
$CityRPG::jobs::pay[$CityRPG::jobs] = 0-1000; //how much they get payed
$CityRPG::jobs::tools[$CityRPG::jobs] = "hammerImage printerImage wrenchImage"; //default tools
$CityRPG::jobs::items[$CityRPG::jobs] = true/false;
$CityRPG::jobs::law[$CityRPG::jobs] = true/false;
$CityRPG::jobs::canPardon[$CityRPG::jobs] = true/false;

$CityRPG::jobs::thief[$CityRPG::jobs] = true/false;
$CityRPG::jobs::drugPusher[$CityRPG::jobs] = true/false;
$CityRPG::jobs::hideJobName[$CityRPG::jobs] = true/false;

$CityRPGG::jobs::tmHexColor[$CityRPG::jobs] = "CCCCCC";

$CityRPG::jobs::bounty::Offerer[$CityRPG::jobs] = true/false;
$CityRPG::jobs::bounty::Claimer[$CityRPG::jobs] = true/false;

$CityRPG::jobs::labor[$CityRPG::jobs] = true/false; //can you chop treez

$CityRPG::jobs::helpline[$CityRPG::jobs] = "\c6Describe your job in this collem";
}

If you are doing the civilian.cs one, you must go to scriptobject.cs in main folder and find:
Code: [Select]
// ============================================================
// Project : CityRPG
// Author : Iban
// Description : Your new ScriptObject overlords.
// ============================================================
// Table of Contents
// 1. JobSO
// 2. CitySO
// 3. CalendarSO
// 4. ClothesSO
// 5. WeatherSO
// ============================================================

// ============================================================
// Section 1 : JobsSO
// ============================================================
function JobSO::populateJobs(%so)
{
for(%a = 1; isObject(%so.job[%a]); %a++)
{
%so.job[%a].delete();
%so.job[%a] = "";
}

// NOTE: Order is incredibly important. Jobs are referenced by ID, which is determined by order.
// Mixing up the order of these professions will cause save data to reference the wrong job.
%so.addJobFromFile("civilian");
%so.addJobFromFile("grocer");
%so.addJobFromFile("policeman");
%so.addJobFromFile("criminal");
%so.addJobFromFile("bountyhunter");
%so.addJobFromFile("official");
%so.addJobFromFile("miner");
%so.addJobFromFile("shopkeeper");
%so.addJobFromFile("armsdealer");
%so.addJobFromFile("lumberjack");
%so.addJobFromFile("laborer");
%so.addJobFromFile("tailor");
}

You must add an
Code: [Select]
%so.addJobFromFile("filenamehere");Example:
Code: [Select]
// ============================================================
// Project : CityRPG
// Author : Iban
// Description : Your new ScriptObject overlords.
// ============================================================
// Table of Contents
// 1. JobSO
// 2. CitySO
// 3. CalendarSO
// 4. ClothesSO
// 5. WeatherSO
// ============================================================

// ============================================================
// Section 1 : JobsSO
// ============================================================
function JobSO::populateJobs(%so)
{
for(%a = 1; isObject(%so.job[%a]); %a++)
{
%so.job[%a].delete();
%so.job[%a] = "";
}

// NOTE: Order is incredibly important. Jobs are referenced by ID, which is determined by order.
// Mixing up the order of these professions will cause save data to reference the wrong job.
%so.addJobFromFile("civilian");
%so.addJobFromFile("grocer");
%so.addJobFromFile("policeman");
%so.addJobFromFile("criminal");
%so.addJobFromFile("bountyhunter");
%so.addJobFromFile("official");
%so.addJobFromFile("miner");
%so.addJobFromFile("shopkeeper");
%so.addJobFromFile("armsdealer");
%so.addJobFromFile("lumberjack");
%so.addJobFromFile("laborer");
%so.addJobFromFile("tailor");
        %so.addjobFromFile("Terrorest");
}

That is your tutorial, now i will post this in help, and this will never beasked again.

Get the hell out of here!

You, sir, are a dumbass.
He means the newest PWNFUL one. Not the old one you dumbstuff.

They both suck ass, but don't just tell people to get out.

You, sir, are a dumbass.
He means the newest PWNFUL one. Not the old one you dumbstuff.

I think he means, WRONG SECTION!

And you sir, GTFO!