Variables for Beginners
#1

new;

Код:
new MyCar;
- This is creating a new variable which can be used in many ways, for example.

Код:
MyCar = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
- Or for you to have more vehicles you can use this.

Код:
new MyCar[5];
Код:
MyCar[0] = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
MyCar[1] = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
MyCar[2] = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
MyCar[3] = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
MyCar[4] = CreateVehicle(ID, Float:X, Float:Y, Float:Z, 0, 0, -1);
Interesting Functions

- These are interesting Variables i myself like to use.

Код:
/ = Divide
* = Times
+ = Plus (Obvious)
- = Minus (Obvious)
> = Above Number
< = Below Number
>= = Above or equal to
<= = Below or equal to
|| = or
&& = and
true = if the problem is true
false = if the problem is false
- I will try an example

Код:
new MyNumber = 20;
new Result; // Is 18

Result = MyNumber *10 / 5 + 3 - 5;

if(Result >= 18 || < 19 && true) { return print("Hello!"); return 1; }
- If the result is above or equal to 18 and is below the number 19 and it is true

Got bored and will add more information later when i come home.

EDIT: I'll add array's later :P
Reply


Messages In This Thread
Variables for Beginners - by [ERP]Snow - 21.08.2009, 08:58
Re: Variables for Beginners - by MenaceX^ - 21.08.2009, 09:01
Re: Variables for Beginners - by [ERP]Snow - 21.08.2009, 09:02

Forum Jump:


Users browsing this thread: 1 Guest(s)