move turf function into its module

This commit is contained in:
Lorenc Pekaj 2018-12-22 22:50:21 +11:00
parent 82c1d0e1b5
commit 1736bfd849
2 changed files with 12 additions and 1 deletions

View File

@ -607,3 +607,15 @@ stock Turf_GetMiddlePos( zoneid, &Float: middle_x, &Float: middle_y )
middle_x = ( min_x + max_x ) / 2.0; middle_x = ( min_x + max_x ) / 2.0;
middle_y = ( min_y + max_y ) / 2.0; middle_y = ( min_y + max_y ) / 2.0;
} }
stock GetGangCapturedTurfs( gangid )
{
new
z,
c;
foreach ( z : turfs ) if ( g_gangTurfData[ z ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ z ] [ E_OWNER ] == gangid ) {
c++;
}
return c;
}

View File

@ -11299,7 +11299,6 @@ stock SendClientMessageToCops( colour, format[ ], va_args<> ) // Conversion to f
return 1; return 1;
} }
stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets the player position, if interior then the last checkpoint position stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets the player position, if interior then the last checkpoint position
{ {
new new