move constant code to modules
This commit is contained in:
parent
ebbfcc59e7
commit
717f38f073
@ -115,3 +115,31 @@ stock IsLowriderVehicle(model)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
stock GetVehicleSeatCount(iModel)
|
||||
{
|
||||
if (400 <= iModel <= 611)
|
||||
{
|
||||
static
|
||||
s_MaxPassengers[] =
|
||||
{
|
||||
271782163, 288428337, 288559891, -2146225407, 327282960, 271651075, 268443408, 286339857, 319894289, 823136512, 805311233,
|
||||
285414161, 286331697, 268513553, 18026752, 286331152, 286261297, 286458129, 856765201, 286331137, 856690995, 269484528,
|
||||
51589393, -15658689, 322109713, -15527663, 65343
|
||||
}
|
||||
;
|
||||
return ((s_MaxPassengers[(iModel -= 400) >>> 3] >>> ((iModel & 7) << 2)) & 0xF);
|
||||
}
|
||||
return 0xF;
|
||||
}
|
||||
|
||||
stock IsPaintJobVehicle(value) {
|
||||
static const valid_values[3] = {
|
||||
1, 3670016, 806680576
|
||||
};
|
||||
if (483 <= value <= 576) {
|
||||
value -= 483;
|
||||
return (valid_values[value >>> 5] & (1 << (value & 31))) || false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -10258,27 +10258,6 @@ stock SetPlayerColorToTeam( playerid )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*stock GivePlayerXP_Legacy( playerid, amount )
|
||||
{
|
||||
if ( p_PlayerLogged{ playerid } == true )
|
||||
{
|
||||
new string[ 20 ];
|
||||
if ( amount < 0 ) format( string, sizeof( string ), "~r~%d XP", amount );
|
||||
else {
|
||||
if ( IsDoubleXP( ) ) amount *= 2;
|
||||
format( string, sizeof( string ), "+%d XP", amount );
|
||||
}
|
||||
p_XP[ playerid ] += amount;
|
||||
PlayerTextDrawSetString( playerid, p_ExperienceAwardTD[ playerid ], string );
|
||||
PlayerTextDrawShow( playerid, p_ExperienceAwardTD[ playerid ] );
|
||||
SetTimerEx( "Experience_HideIncrementTD", 3500, false, "d", playerid );
|
||||
if ( p_XP[ playerid ] > 99999999 ) p_XP[ playerid ] = 99999999;
|
||||
autosaveStart( playerid ); // auto-save
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
stock PutPlayerInEmptyVehicleSeat( vehicleid, playerid )
|
||||
{
|
||||
new
|
||||
@ -10318,23 +10297,6 @@ stock PutPlayerInEmptyVehicleSeat( vehicleid, playerid )
|
||||
return seats;
|
||||
}
|
||||
|
||||
stock GetVehicleSeatCount(iModel)
|
||||
{
|
||||
if (400 <= iModel <= 611)
|
||||
{
|
||||
static
|
||||
s_MaxPassengers[] =
|
||||
{
|
||||
271782163, 288428337, 288559891, -2146225407, 327282960, 271651075, 268443408, 286339857, 319894289, 823136512, 805311233,
|
||||
285414161, 286331697, 268513553, 18026752, 286331152, 286261297, 286458129, 856765201, 286331137, 856690995, 269484528,
|
||||
51589393, -15658689, 322109713, -15527663, 65343
|
||||
}
|
||||
;
|
||||
return ((s_MaxPassengers[(iModel -= 400) >>> 3] >>> ((iModel & 7) << 2)) & 0xF);
|
||||
}
|
||||
return 0xF;
|
||||
}
|
||||
|
||||
|
||||
stock IsPointToPoint(Float: fRadius, Float: fX1, Float: fY1, Float: fZ1, Float: fX2, Float: fY2, Float: fZ2)
|
||||
return ((-fRadius < floatabs(fX2 - fX1) < fRadius) && (-fRadius < floatabs(fY2 - fY1) < fRadius) && (-fRadius < floatabs(fZ2 - fZ1) < fRadius));
|
||||
@ -10980,17 +10942,6 @@ stock IsMeleeWeapon(value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
stock IsPaintJobVehicle(value) {
|
||||
static const valid_values[3] = {
|
||||
1, 3670016, 806680576
|
||||
};
|
||||
if (483 <= value <= 576) {
|
||||
value -= 483;
|
||||
return (valid_values[value >>> 5] & (1 << (value & 31))) || false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
stock IsVehicleUpsideDown(vehicleid)
|
||||
{
|
||||
new
|
||||
|
Loading…
Reference in New Issue
Block a user