cannon doesn't reset health and weapons now.
fixes http://forum.sfcnr.com/showthread.php?59234-Orbital-canon
This commit is contained in:
parent
bc008c3578
commit
f8e6a45cfe
@ -26,7 +26,12 @@ new
|
||||
g_orbitalCannonData [ MAX_FACILITIES ] [ E_ORBITAL_CANNON_DATA ],
|
||||
p_usingOrbitalCannon [ MAX_PLAYERS ] = { -1, ... },
|
||||
Text: g_orbitalAimTD = Text: INVALID_TEXT_DRAW,
|
||||
Text3D: g_orbitalPlayerLabels [ MAX_FACILITIES ] [ MAX_PLAYERS ]
|
||||
Text3D: g_orbitalPlayerLabels [ MAX_FACILITIES ] [ MAX_PLAYERS ],
|
||||
|
||||
p_Weapons [ MAX_PLAYERS ][ 13 ],
|
||||
p_Ammo [ MAX_PLAYERS ][ 13 ],
|
||||
Float: p_Health [ MAX_PLAYERS ],
|
||||
Float: p_Armour [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
@ -65,6 +70,12 @@ hook SetPlayerRandomSpawn( playerid )
|
||||
SetPlayerPos( playerid, g_gangFacilityInterior[ int_type ] [ E_CANNON_POS ] [ 0 ], g_gangFacilityInterior[ int_type ] [ E_CANNON_POS ] [ 1 ], g_gangFacilityInterior[ int_type ] [ E_CANNON_POS ] [ 2 ] );
|
||||
SetPlayerVirtualWorld( playerid, g_gangFacilities[ facilityid ] [ E_WORLD ] );
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
SetPlayerHealth( playerid, p_Health[ playerid ] );
|
||||
SetPlayerArmour( playerid, p_Armour[ playerid ] );
|
||||
|
||||
for ( new iWeapon; iWeapon < 13; iWeapon ++ ) {
|
||||
GivePlayerWeapon( playerid, p_Weapons[ playerid ][ iWeapon ], p_Ammo[ playerid ][ iWeapon ] );
|
||||
}
|
||||
|
||||
// set camera
|
||||
DeletePVar( playerid, "left_cannon" );
|
||||
@ -268,6 +279,12 @@ stock StartPlayerOrbitalCannon( playerid, facilityid )
|
||||
return 0;
|
||||
|
||||
// player
|
||||
for ( new iWeapon; iWeapon < 13; iWeapon ++ )
|
||||
GetPlayerWeaponData( playerid, iWeapon, p_Weapons[ playerid ][ iWeapon ], p_Ammo[ playerid ][ iWeapon ] );
|
||||
|
||||
GetPlayerHealth( playerid, p_Health[ playerid ] );
|
||||
GetPlayerArmour( playerid, p_Armour[ playerid ] );
|
||||
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
SetPlayerVirtualWorld( playerid, 0 );
|
||||
TogglePlayerSpectating( playerid, 1 );
|
||||
|
@ -198,33 +198,6 @@ new
|
||||
p_C4Amount [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Admin Ban Codes ** */
|
||||
enum E_BAN_CODE
|
||||
{
|
||||
E_CODE[ 4 ], E_DATA[ 21 ]
|
||||
};
|
||||
|
||||
new
|
||||
g_banCodes[ ] [ E_BAN_CODE ] =
|
||||
{
|
||||
{ "AH", "Armor Hacking" },
|
||||
{ "HH", "Health Hacking" },
|
||||
{ "VHH", "Vehicle Health Hacks" },
|
||||
{ "NR", "No Reload" },
|
||||
{ "IA", "Infinite Ammo" },
|
||||
{ "FH", "Fly Hacks" },
|
||||
{ "BE", "Ban Evasion" },
|
||||
{ "AB", "Air Brake" },
|
||||
{ "TP", "Teleport Hacks" },
|
||||
{ "WH", "Weapon Hack" },
|
||||
{ "SH", "Speed Hacks" },
|
||||
{ "UA", "Unlimited Ammo" },
|
||||
{ "RF", "Rapid Fire" },
|
||||
{ "AIM", "Aimbot" },
|
||||
{ "ADV", "Advertising" }
|
||||
}
|
||||
;
|
||||
|
||||
/* ** Jail System ** */
|
||||
#define JAIL_SECONDS_MULTIPLIER ( 3 )
|
||||
#define ALCATRAZ_REQUIRED_TIME ( 150 )
|
||||
@ -11330,15 +11303,6 @@ stock KillEveryoneInShamal( vehicleid )
|
||||
}
|
||||
}
|
||||
|
||||
stock adhereBanCodes( string[ ], maxlength = sizeof( string ) ) {
|
||||
for( new i; i < sizeof( g_banCodes ); i++ ) {
|
||||
if ( strfind( string, g_banCodes[ i ] [ E_CODE ], false ) != -1 ) {
|
||||
strreplace( string, g_banCodes[ i ] [ E_CODE ], g_banCodes[ i ] [ E_DATA ], false, 0, -1, maxlength );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock CreateExplosionEx( Float: X, Float: Y, Float: Z, type, Float: radius, world, interior, issuerid = INVALID_PLAYER_ID )
|
||||
{
|
||||
foreach(new i : Player) {
|
||||
|
Loading…
Reference in New Issue
Block a user