Author Topic: CityRPG Coding help  (Read 474 times)

A few things I need help with, the drugs and the GUI. First off, I can not find the source of the disappearing drug brick. The only thing I could find relating to color and color looping is this [ %drug.currentColor = 45; ]  but still if I change it, it still is gone. It appears as a purple colored invisible brick that can be clicked and is raycasting but just not rendering. Another thing I would like to add the GUI is the amount of drugs you are carrying. Like so [ Job: Civilian Salary: 10 Money: 100 Hunger 100% Marijuana 10 Opium 0 ] I tried this and it wont work

 // Drugs
   if(%client.brickGroup.totaldrugs > 0)
      %client.CityRPGXPrint = %client.CityRPGXPrint SPC "\c6Drugs: \c3" @ %client.brickGroup.totaldrugs;
      %client.CityRPGXPrint = %client.CityRPGXPrint SPC "\c6Drugs:" SPC %client.valuedrugamount();

please help
« Last Edit: July 24, 2014, 06:22:25 PM by JackofTrades »

Code: [Select]
if(%client.brickGroup.totaldrugs > 0) {
%client.CityRPGXPrint = %client.CityRPGXPrint SPC "\c6Drugs: \c3" @ %client.brickGroup.totaldrugs;
%client.CityRPGXPrint = %client.CityRPGXPrint SPC "\c6Drugs:" SPC %client.valuedrugamount();
}
You forgot braces. If you have more than 1 line of code under an if/for/while than you need braces.