Author Topic: Fixing the old CityRP  (Read 2282 times)

Hello, this is Pecon7 (Left4Block in game) and I found an old dusty copy of the OLD CityRP. Personally I liked this mod beacause it had quite a few epic features including that the system for "buying" land was completely automatic and it had a good taxes system as well. There are a few features that are "broken" like

Code: [Select]
function CityRP_giveMoney(%client, %command, %args)
{
%money = mFloor(getWord(%args, 0));

if(%money < 1)
{
messageClient(%client, '', "\c6You must enter a valid amount of money to give.");

return;
}
if(CityRPData.getData(%client.bl_id).valueMoney - %money < 0)
{
messageClient(%client, '', "\c6You don't have that much money to give.");

return;
}

if(!isObject(%client.player))
{
messageClient(%client, '', "\c6Spawn first before you use this command.");

return;
}

%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 8), %client.player.getEyePoint()), $typeMasks::playerObjectType).client;

if(!isObject(%target))
{
messageClient(%client, '', "\c6You must be looking at and be in a reasonable distance of the player in order to give them money.");

return;
}

messageClient(%client, '', "\c6You give \c3$" @ %money SPC "\c6to \c3" @ %target.name @ "\c6.");
messageClient(%target, '', "\c3" @ %client.name SPC "\c6has given you \c3$" @ %money @ "\c6.");

CityRPData.getData(%client.bl_id).valueMoney -= %money;
CityRPData.getData(%target.bl_id).valueMoney += %money;

%client.CityRP(1);
%target.CityRP(1);

return;

I have been testing this mod a lot lately and have found only a few other minor issues. I hope somebody could help me find the problem with this part of the script. 

Hopefully there will be at least someone who can give a small helpful comment.
« Last Edit: March 08, 2010, 07:12:02 PM by pecon7 »



Want a dust copy of cityrpg, sometimes i host my SmithRPG, that was v1 Iban, i made it have gui's, suck my  :cookie: gar becuase your not in the  :cookieMonster: anymore D:<
Er... Sorry for double post.

Want a dust copy of cityrpg, sometimes i host my SmithRPG, that was v1 Iban, i made it have gui's, suck my  :cookie: gar becuase your not in the  :cookieMonster: anymore D:<
Er... Sorry for double post.
K?

I have Iban's older version...


K?

I have Iban's older version...

I can make in nondedicated if you want, but some problems like non working bricks and some stuff, but its really fun. ANd i can make jobs and edit demerits and stuff.
Have fun with your small project, pm me for any tips/help.

I can make in nondedicated if you want, but some problems like non working bricks and some stuff, but its really fun. ANd i can make jobs and edit demerits and stuff.
Have fun with your small project, pm me for any tips/help.

Well, thats the stuff that everyone should know how to do AT THE LEAST =P (that means I already know how to do that)
But do you know how to fix the givemoney thing??? It's all stuff I don't really know how to do yet. =/

It's Ok.

Ok... Does it work?
Yeah, I can host it on a non-dedicated server and it works epicly.

Yeah, I can host it on a non-dedicated server and it works epicly.

Want a newer one?

Easy fix.

Replace
Code: [Select]
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 8), %client.player.getEyePoint()), $typeMasks::playerObjectType).client;with
Code: [Select]
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 5), %client.player.getEyePoint()), $typeMasks::playerObjectType,%client.player).client;
Also next time try searching, I made this exact topic a while ago in coding help:
http://forum.blockland.us/index.php?topic=89921.0

Easy fix.

Replace
Code: [Select]
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 8), %client.player.getEyePoint()), $typeMasks::playerObjectType).client;with
Code: [Select]
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 5), %client.player.getEyePoint()), $typeMasks::playerObjectType,%client.player).client;
may you just give me the bank.cs (pm) thanks. also, can you start modeling for me. Tribalrp  :panda:

Also next time try searching, I made this exact topic a while ago in coding help:
http://forum.blockland.us/index.php?topic=89921.0



I assume that most people would tell you to use RP Content instead.