commit
309945b6de
@ -12,19 +12,20 @@
|
||||
#define ADMIN_COMMAND_REJECT "You don't have an appropriate administration level to use this command."
|
||||
#define ADMIN_COMMAND_TIME 4
|
||||
|
||||
// #define DIALOG_ADMIN_CMDS 1167
|
||||
// #define DIALOG_ADMIN_CMDS_BACK 1168
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_COMMAND_DATA
|
||||
{
|
||||
E_LEVEL,
|
||||
E_COMMAND[ 64 ],
|
||||
E_DESCRIPTION[ 144 ],
|
||||
}
|
||||
E_LEVEL, E_COMMAND[ 64 ], E_DESCRIPTION[ 144 ]
|
||||
};
|
||||
|
||||
/* ** Admin Ban Codes ** */
|
||||
enum E_BAN_CODE
|
||||
{
|
||||
E_CODE[ 4 ], E_DATA[ 21 ]
|
||||
};
|
||||
|
||||
static stock
|
||||
g_CommandData [ ] [ E_COMMAND_DATA ] =
|
||||
g_commandData [ ] [ E_COMMAND_DATA ] =
|
||||
{
|
||||
/* ** Level 1 Commands ** */
|
||||
{ 1, "/viewdeathmsg", "Viewing a player death message" },
|
||||
@ -172,7 +173,25 @@ static stock
|
||||
{ 6, "/playanimation", "Playing an animation" },
|
||||
{ 6, "/updaterules", "Updating the server rules" },
|
||||
{ 6, "/truncate", "Truncating a account" }
|
||||
}
|
||||
},
|
||||
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" }
|
||||
}
|
||||
;
|
||||
|
||||
/* ** Commands ** */
|
||||
@ -193,8 +212,21 @@ CMD:acmds( playerid, params[ ] )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Hooks ** */
|
||||
/* ** Functions ** */
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_ADMIN_CMDS && response )
|
||||
@ -207,12 +239,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
if ( p_AdminLevel[ playerid ] < level )
|
||||
return SendError( playerid, "You don't have permission to view these admin commands." ), cmd_acmds( playerid, "" );
|
||||
|
||||
for (new iLine = 0; iLine < sizeof( g_CommandData ); iLine ++ ) if ( g_CommandData[ iLine ][ E_LEVEL ] == level )
|
||||
for ( new iLine = 0; iLine < sizeof( g_commandData ); iLine ++ ) if ( g_commandData[ iLine ][ E_LEVEL ] == level )
|
||||
{
|
||||
format( szHugeString, sizeof( szHugeString ), "%s"COL_GREY"%s\t"COL_WHITE"%s\n",
|
||||
szHugeString,
|
||||
g_CommandData[ iLine ][ E_COMMAND ],
|
||||
g_CommandData[ iLine ][ E_DESCRIPTION ]);
|
||||
g_commandData[ iLine ][ E_COMMAND ],
|
||||
g_commandData[ iLine ][ E_DESCRIPTION ]);
|
||||
}
|
||||
|
||||
ShowPlayerDialog( playerid, DIALOG_ADMIN_CMDS_BACK, DIALOG_STYLE_TABLIST, sprintf( ""COL_PINK"Admin Level %d Commands", level ), szHugeString, "Back", "" );
|
||||
|
@ -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 );
|
||||
|
@ -58,7 +58,7 @@ hook OnScriptInit( playerid )
|
||||
CreateNavigation( "Ammu-Nation", -2626.6299, 208.2514, 4.81250, CITY_SF, "Buy guns" );
|
||||
CreateNavigation( "Pawnshop", -2490.2256, -16.9206, 25.6172, CITY_SF, "Buy toys/Burglar minivans" );
|
||||
CreateNavigation( "Hospital", -2658.3201, 639.5060, 14.4531, CITY_SF, "Buy cure/healing" );
|
||||
CreateNavigation( "Otto's Cars", -1657.7573, 1210.2754, 7.2500, CITY_SF, "Modshop" );
|
||||
CreateNavigation( "Wang Cars", -1983.6909, 288.7863, 34.8125, CITY_SF, "Modshop" );
|
||||
CreateNavigation( "Train Station", -1979.9883, 138.0498, 27.6875, CITY_SF, "Traindriver Minijob" );
|
||||
CreateNavigation( "Mining Field", -2232.9792, 251.5285, 34.8770, CITY_SF, "Mining Minijob" );
|
||||
CreateNavigation( "Duel Arena", -2232.9792, 251.5285, 34.8770, CITY_SF, "Waged Duels" );
|
||||
@ -94,6 +94,7 @@ hook OnScriptInit( playerid )
|
||||
CreateNavigation( "City Hall", 1480.1451, -1737.7921, 13.5469, CITY_LS, "Change your job/city" );
|
||||
CreateNavigation( "Police Station", 1539.8739, -1675.8989, 13.5469, CITY_LS, "Blow up jail cells" );
|
||||
CreateNavigation( "Ammu-Nation", 1362.1816, -1282.4746, 13.5469, CITY_LS, "Buy guns" );
|
||||
CreateNavigation( "Ammu-Nation", 2400.6345, -1975.4139, 13.3828, CITY_LS, "Buy guns" );
|
||||
CreateNavigation( "V.I.P Lounge", 1805.5667, -1582.5602, 13.4951, CITY_LS, ""COL_GOLD"V.I.P weapon locker" );
|
||||
CreateNavigation( "Bombshop", 1911.2462, -1775.8755, 13.3828, CITY_LS, "Buy C4" );
|
||||
CreateNavigation( "Trainstation", 1750.6547, -1945.8823, 13.5613, CITY_LS, "Traindriver Minijob" );
|
||||
|
@ -332,18 +332,18 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
else if ( IsAirVehicle( model ) ) X = -1666.2905, Y = -173.4397, Z = 15.0692, fA = 314.6289;
|
||||
else X = -2518.9045, Y = -614.8578, Z = 132.302, fA = 267.8874;
|
||||
}
|
||||
else if ( IsPlayerInDynamicCP( playerid, g_VehicleDealerCP[ 1 ] ) ) // LS
|
||||
{
|
||||
if ( IsBoatVehicle( model ) ) X = 728.4574, Y = -1516.2633, Z = 0.3122, fA = 178.5724;
|
||||
else if ( IsAirVehicle( model ) ) X = 2048.7910, Y = -2493.8928, Z = 14.4686, fA = 90.00000;
|
||||
else X = 560.9333, Y = -1267.5469, Z = 16.9957, fA = 17.2539;
|
||||
}
|
||||
else if ( IsPlayerInDynamicCP( playerid, g_VehicleDealerCP[ 2 ] ) ) // LV?
|
||||
else if ( IsPlayerInDynamicCP( playerid, g_VehicleDealerCP[ 1 ] ) ) // LV
|
||||
{
|
||||
if ( IsBoatVehicle( model ) ) X = 1633.71860, Y = 563.73600, Z = -0.0579, fA = 90.00000;
|
||||
else if ( IsAirVehicle( model ) ) X = 1477.43920, Y = 1761.4778, Z = 11.2735, fA = 180.9139;
|
||||
else X = 1986.85240, Y = 2049.2278, Z = 10.8203, fA = 132.5364;
|
||||
}
|
||||
else if ( IsPlayerInDynamicCP( playerid, g_VehicleDealerCP[ 2 ] ) ) // LS
|
||||
{
|
||||
if ( IsBoatVehicle( model ) ) X = 728.4574, Y = -1516.2633, Z = 0.3122, fA = 178.5724;
|
||||
else if ( IsAirVehicle( model ) ) X = 2048.7910, Y = -2493.8928, Z = 14.4686, fA = 90.00000;
|
||||
else X = 560.9333, Y = -1267.5469, Z = 16.9957, fA = 17.2539;
|
||||
}
|
||||
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
SetPlayerVirtualWorld( playerid, 0 );
|
||||
|
@ -221,7 +221,8 @@ new
|
||||
p_AimedAtPolice [ MAX_PLAYERS ],
|
||||
bool: p_PassiveModeDisabled [ MAX_PLAYERS char ],
|
||||
//p_PassiveModeExpireTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
Text3D: p_PassiveModeLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID }
|
||||
Text3D: p_PassiveModeLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID },
|
||||
bool: p_NameTags [ MAX_PLAYERS char ] = false
|
||||
;
|
||||
|
||||
/* ** Getters And Setters** */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Developed by Lorenc Pekaj, Steven Howard
|
||||
* Module: cnr\wanted_level.pwn
|
||||
* Purpose: server-sided wanted level system (hooks the natives)
|
||||
*/
|
||||
@ -8,6 +8,9 @@
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_WANTED_LVL 2048
|
||||
|
||||
/* ** Variables ** */
|
||||
new stock
|
||||
p_WantedLevel [ MAX_PLAYERS ];
|
||||
@ -77,14 +80,15 @@ stock GivePlayerWantedLevel( playerid, level )
|
||||
new
|
||||
current_wanted = GetPlayerWantedLevel( playerid );
|
||||
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GOLD"[CRIME]{FFFFFF} Your wanted level has been %s by %d! Wanted level: %d", current_wanted + level > current_wanted ? ( "increased" ) : ( "decreased" ), level < 0 ? level * -1 : level, current_wanted );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GOLD"[CRIME]{FFFFFF} Your wanted level has been %s by %d! Wanted level: %d", current_wanted + level > current_wanted ? ( "increased" ) : ( "decreased" ), level, current_wanted + level );
|
||||
return SetPlayerWantedLevel( playerid, current_wanted + level );
|
||||
}
|
||||
|
||||
|
||||
stock ClearPlayerWantedLevel( playerid )
|
||||
{
|
||||
PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] );
|
||||
p_WantedLevel[ playerid ] = 0;
|
||||
SetPlayerWantedLevel( playerid, 0 );
|
||||
SetPlayerColorToTeam( playerid );
|
||||
}
|
||||
}
|
@ -197,33 +197,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 )
|
||||
@ -1498,6 +1471,10 @@ public OnPlayerSpawn( playerid )
|
||||
CancelEdit( playerid );
|
||||
HidePlayerHelpDialog( playerid );
|
||||
|
||||
// Name Tags
|
||||
foreach( new pID : Player )
|
||||
ShowPlayerNameTagForPlayer( playerid, pID, p_NameTags{ playerid } ? 1 : 0 );
|
||||
|
||||
// Money Bags
|
||||
if ( p_MoneyBag{ playerid } && p_Class[ playerid ] != CLASS_POLICE ) // SetPlayerAttachedObject( playerid, 1, 1550, 1, 0.131999, -0.140999, 0.053999, 11.299997, 65.599906, 173.900054, 0.652000, 0.573000, 0.594000 );
|
||||
RemovePlayerAttachedObject( playerid, 1 ), SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 );
|
||||
@ -3385,10 +3362,12 @@ CMD:whisper( playerid, params[ ] )
|
||||
CMD:nametags( playerid, params[ ] )
|
||||
{
|
||||
if ( strmatch( params, "off" ) ) {
|
||||
foreach(new i : Player) { ShowPlayerNameTagForPlayer( playerid, i, 0 ); }
|
||||
foreach( new i : Player ) { ShowPlayerNameTagForPlayer( playerid, i, 0 ); }
|
||||
p_NameTags{ playerid } = false;
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> Name tags disabled" );
|
||||
} else if ( strmatch( params, "on" ) ) {
|
||||
foreach(new i : Player) { ShowPlayerNameTagForPlayer( playerid, i, 1 ); }
|
||||
foreach( new i : Player ) { ShowPlayerNameTagForPlayer( playerid, i, 1 ); }
|
||||
p_NameTags{ playerid } = true;
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> Name tags enabled" );
|
||||
}
|
||||
else SendClientMessage( playerid, 0xa9c4e4ff, "-> /nametags [ON/OFF]" );
|
||||
@ -10963,15 +10942,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