03.05.2015, 15:19
making a huge spam by creating objects ...
// I noticed that all objects created once
// I noticed that all objects created once
PHP код:
enum fInfo
{
OwnedPlantation,
ObjectOne,
ObjectTwo
}
new FarmInfo[ MAX_PLANTATIONS ][ fInfo ];
forward Farmer( );
public Farmer( )
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
new vehicle = GetPlayerVehicleID(i);
if( vehicle == FarmerJob[ 4 ] || vehicle == FarmerJob[ 5 ] || vehicle == FarmerJob[ 6 ] || vehicle == FarmerJob[ 6 ] || vehicle == FarmerJob[ 7 ] || vehicle == FarmerJob[ 8 ] || vehicle == FarmerJob[ 9 ] )
{
for(new x = 0; x < MAX_PLANTATIONS; x++)
{
new Float: X, Float: Y, Float: Z;
GetPlayerPos( i, X, Y, Z );
FarmInfo[ x ][ ObjectOne ]= CreateObject( 872, X, Y, Z-1, 0.00000, 0.00000, 0.00000 );
FarmInfo[ x ][ OwnedPlantation ] = i;
}
}
}
return 1;
}
forward LoadFarmer( );
public LoadFarmer( )
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
new vehicle = GetPlayerVehicleID(i);
if( vehicle == FarmerJob[ 0 ] || vehicle == FarmerJob[ 1 ] || vehicle == FarmerJob[ 2 ] || vehicle == FarmerJob[ 3 ] )
{
for(new x = 0; x < MAX_PLANTATIONS; x++)
{
new Float: pX, Float: pY, Float: pZ;
GetObjectPos( FarmInfo[ x ][ ObjectOne ], pX, pY, pZ );
if( PlayerToPoint ( 10.0, i, pX, pY, pZ ) )
{
DestroyObject( FarmInfo[ x ][ ObjectOne ]);
new Float: X, Float: Y, Float: Z;
GetPlayerPos( i, X, Y, Z );
FarmInfo[ x ][ ObjectTwo ] = CreateObject( 2901, X, Y, Z, 0.00000, 0.00000, 0.00000 );
}
}
}
}
return 1;
}