Author Topic: Some questions...  (Read 1000 times)

I look at the some of the CityRP code and would like to know this:

What do the red and blue parts mean?

"\c6Taxes: \c3$" @ ((%this.brickGroup.taxes > 0) ? %this.brickGroup.taxes : "0") @ (isObject(%this.CityRPLotTrigger)

I look at the some of the CityRP code and would like to know this:

What do the red and blue parts mean?

"\c6Taxes: \c3$" @ ((%this.brickGroup.taxes > 0) ? %this.brickGroup.taxes : "0") @ (isObject(%this.CityRPLotTrigger)
Code: [Select]
((%this.brickGroup.taxes > 0) ? %this.brickGroup.taxes : "0")Is the same as
Code: [Select]
if(%this.brickGroup.taxes > 0)
{
    return %this.brickGroup.taxes;
} else {
    return "0";
}
Basically it's a single-line if/else.
The next red part is incomplete, but with the rest of it it's just checking to see if they're in a lot and if they are, displaying it's owner.

Thanks :) Btw, how would I make it so it only shows "Taxes: (taxes)" if their taxes are more than 0?

Nevermind, I got it :D
« Last Edit: February 16, 2009, 12:25:55 PM by Pew446 »

Why doesn't this part work?

messageClient(%client, 'MessageBoxOK', "\c6You are starving! If you don't eat soon you will die.");

It says I'm starving but it doesn't do a messagebox, it does a chat message...

Because you're sending a message, not a command. It doesn't recognise the message type 'MessageBoxOK', so it ignores it and puts a chat message instead.

commandtoclient(%client, 'MessageBoxOK', "\c6You are starving! If you don't eat soon you will die.");


New question. How would i make this:

registerOutputEvent("fxDTSBrick", "SellFood", "list Water 0 Cheeseburger 1 Fries 2 Taco 3 Cheese 4 Chocolate 5 Soda 6 Gum 7 Watermellon 8 Mint 9 Lemonade 10 Noodles 11 OrangeChicken 12 EggRoll 13 Candy 14 HotDog 15 Cake 16 Pizza 17 Cookie 18 Milk 19 Meat 20 Tortilla 21 Chicken 22 Mushroom 23 Carrot 24 Onion 25" TAB "list Small 0 Medium 1 Large 2", int 0 1 1, 1);

So it says "This service is offering to sell you a " (size) " amount of " (item name) " for " (amount) ". Say ^yes to accept or ^no to decline."

when activated?

Thanks :)

Hey, I have this really strange feeling that Iban could answer that!


Ambiguous topic title :\