1
General Discussion / Re: [WIP] CityRPG's Server
« on: January 13, 2015, 07:48:21 AM »I knew by the looks of the builds were designed by BrickitectYou are correct...
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.
I knew by the looks of the builds were designed by BrickitectYou are correct...
Why did you make two topics that are the same?Accident
I can script some stuff if you want.
Tick the "Disable UPnP" box in Options > Network (if it's not already ticked) and try again.I am testing, thanks
Use
Onactivate>client>ifvalue><var:client:score> >= (COST)
Iftrue>player>additem>item
iffalse>client>centerprint> <color:ffffff><font:arial:20>You can not afford this item! It costs <color:00ffff> (COST)
Fill in the gaps since these aren't the precise event names.
This should work, tell me if you encounter any problems!
Step one: Loading item
Fist thing you need to do is to make sure that this weapon loads so that you dont break anything. To do this you can use a function called "forceRequiredAddon".
Open up server.cs inside gamemode_CityRPG.zip
Scroll down to the end of the file
Add this line
forceRequiredAddon("Your_ItemName");
Make sure to replace Your_ItemName with the name of the item you are loading. It should be in the format of "Weapon_WeaponName". If you are unsure what you should put here, put the name of the add-ons .zip file.
Step two: Getting the items datablock
Open up the zip file for the weapon you are adding. Look in each of the files for this lineCode: [Select]datablock ItemData(somethingData)
Highlight somethingData and copy it, you will need it in the next step.
Step Three: adding the preferences
In the gamemode_CityRPG zip folder open up prefs.cs
Press Ctrl+F and search for .
You will need to edit a few values. First isCode: [Select]$CityRPG::ItemCount = someNumber
. Take the number that is after the equals sign and set it to one plus whatever it is. For example if it is 6, set it to 7. Easy enough?Code: [Select]$CityRPG::prices::weapon::name[7] = "Paste What We Copied in step 2 here, leave the quotes!";
$CityRPG::prices::weapon::price[7] = 500; // Set this to what the price should be for it
$CityRPG::prices::weapon::mineral[7] = 250; // set this to how many minerals it should cost
Make sure that you set 7 to whatever number you just set $CityRPG::ItemCount to.
That should be all!
Cheers!