29.04.2014, 15:41
I agree with Pottus, so many entries that you could have just indexed it with an array, Yes the script is cool but the code isn't, Anyways if you're planning to update it asap I think this could have saved your time when you used array.
For example
Instead of
Instead of
It looks shorter isn't it?
For example
pawn Code:
new Object0[ MAX_HOUSES ];
new Object1[ MAX_HOUSES ];
// and so on.
pawn Code:
new Object[ MAX_HOUSES ][ 30 ];
pawn Code:
enum JHouseInfo
{
Object1ID,
Float:Object1X,
Float:Object1Y,
Float:Object1Z,
Float:Object1RX,
Float:Object1RY,
Float:Object1RZ,
Object1INT,
Object1VW
// and so on.
}
new jHinfo [ MAX_HOUSES][ JHouseInfo ];
pawn Code:
enum JHouseInfo
{
ObjectID[ 60 ],
Float:ObjectX[ 60 ],
Float:ObjectY[ 60 ],
Float:ObjectZ[ 60 ],
Float:ObjectRX[ 60 ],
Float:ObjectRY[ 60 ],
Float:ObjectRZ[ 60 ],
ObjectINT[ 60 ],
ObjectVW[ 60]
// and so on.
}
new jHinfo [ MAX_HOUSES][ JHouseInfo ];