vacation
This commit is contained in:
parent
2647de7df1
commit
8131a87b93
4
.gitignore
vendored
4
.gitignore
vendored
@ -18,6 +18,9 @@ pawno/include/**/*
|
||||
!pawno/include/a_ig.inc
|
||||
!pawno/include/sf-cnr.inc
|
||||
!pawno/include/lookupffs.inc
|
||||
!pawno/include/a_analytics.inc
|
||||
!pawno/include/a_explosion.inc
|
||||
!pawno/include/a_weapondata.inc
|
||||
!pawno/include/attachments.inc
|
||||
!pawno/include/anticheat
|
||||
!pawno/include/anticheat/**
|
||||
@ -33,6 +36,7 @@ plugins/*
|
||||
# gamemodes
|
||||
gamemodes/*
|
||||
!gamemodes/sf-cnr.pwn
|
||||
!gamemodes/COD8.pwn
|
||||
|
||||
# scriptfiles
|
||||
scriptfiles/**/*
|
||||
|
@ -357,7 +357,7 @@ public OnFilterScriptInit()
|
||||
CreateDynamicObject( 1520, -1643.665039, 1026.648193, 48.514694, 0.000000, 0.000000, 0.000000 );
|
||||
|
||||
// Tizano LS HQ
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19538, 1413.311889, -1312.767211, 32.378932, 0.000000, 0.000000, 90.000000 ), 0, 9909, "sfvictorian", "rooftop_gz3", 0 );
|
||||
// SetDynamicObjectMaterial( CreateDynamicObject( 19538, 1413.311889, -1312.767211, 32.378932, 0.000000, 0.000000, 90.000000 ), 0, 9909, "sfvictorian", "rooftop_gz3", 0 );
|
||||
CreateDynamicObject( 16644, 1429.272460, -1334.757568, 13.878267, 0.000000, -34.299972, 0.000000 );
|
||||
CreateDynamicObject( 16644, 1429.272460, -1322.076660, 13.878267, 0.000000, -34.299972, 0.000000 );
|
||||
CreateDynamicObject( 1504, 1427.227294, -1338.999511, 12.561865, 0.000000, 0.000000, 90.000000 );
|
||||
@ -458,6 +458,69 @@ public OnFilterScriptInit()
|
||||
CreateDynamicObject( 2946, 1422.368286, -1290.386718, 12.504676, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 3525, 1421.988403, -1290.485961, 13.974697, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 3525, 1425.949829, -1290.485961, 13.974697, 0.000000, 0.000000, 0.000000 );
|
||||
|
||||
// Paradiso
|
||||
CreateDynamicObject( 1725, -2704.273925, 861.545288, 73.012802, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1797, -2705.031738, 856.832519, 73.072875, 0.000000, 0.000000, -135.000000 );
|
||||
CreateDynamicObject( 14604, -2706.304687, 856.626586, 74.082847, 0.000000, 0.000000, -117.800041 );
|
||||
CreateDynamicObject( 2835, -2704.263671, 861.643676, 73.105285, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1738, -2705.397216, 853.010314, 73.612823, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2165, -2702.396240, 859.556945, 73.132827, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 2356, -2703.134521, 858.768920, 73.092826, 0.000000, 0.000000, -62.600013 );
|
||||
CreateDynamicObject( 2295, -2712.430908, 862.778808, 73.032844, 0.000000, 0.000000, -143.399993 );
|
||||
CreateDynamicObject( 19559, -2704.850585, 863.350280, 73.502853, 0.000000, 0.000000, 79.799995 );
|
||||
CreateDynamicObject( 932, -2706.657226, 854.480163, 73.092826, 0.000000, 0.000000, 101.099983 );
|
||||
CreateDynamicObject( 2627, -2718.693359, 864.684387, 73.082847, 0.000000, 0.000000, -115.699989 );
|
||||
CreateDynamicObject( 2630, -2718.357177, 861.937500, 73.102851, 0.000000, 0.000000, 129.199951 );
|
||||
CreateDynamicObject( 2629, -2710.437255, 865.054077, 73.092887, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2915, -2710.197021, 865.054077, 73.192901, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2295, -2714.253662, 862.449035, 73.032844, 0.000000, 0.000000, 173.000015 );
|
||||
CreateDynamicObject( 2814, -2713.257080, 862.329772, 73.122810, 0.000000, 0.000000, 43.699993 );
|
||||
CreateDynamicObject( 948, -2717.145019, 853.107116, 73.072837, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 948, -2714.044433, 853.107116, 73.072837, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 948, -2710.943115, 853.107116, 73.072837, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2225, -2713.720947, 865.860229, 73.052864, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1808, -2707.903320, 864.792297, 73.062812, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 1702, -2701.407714, 857.170043, 69.680976, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 1702, -2704.697265, 858.230102, 69.680976, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1705, -2705.604736, 855.241882, 69.680976, 0.000000, 0.000000, 101.100006 );
|
||||
CreateDynamicObject( 1228, -2719.599853, 859.667785, 70.050933, 0.000000, 0.000000, -11.299998 );
|
||||
CreateDynamicObject( 1228, -2718.628662, 859.210571, 70.050933, 0.000000, 0.000000, 69.599998 );
|
||||
CreateDynamicObject( 2159, -2701.751953, 866.421997, 69.681030, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2157, -2703.123291, 866.421997, 69.681030, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 19933, -2701.907714, 866.144653, 70.200965, 0.000000, 0.000000, 90.000000 );
|
||||
CreateDynamicObject( 2156, -2704.484619, 866.421997, 69.681030, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2156, -2705.395507, 865.731933, 69.682029, 0.000000, 0.000000, 90.000000 );
|
||||
CreateDynamicObject( 2156, -2705.134277, 866.422973, 69.683029, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 19923, -2703.045410, 863.661682, 69.610946, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 1716, -2703.208251, 862.920898, 69.670959, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1716, -2702.297363, 862.920898, 69.670959, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2421, -2705.216308, 866.393249, 70.690971, 0.000000, 0.000000, 54.300003 );
|
||||
CreateDynamicObject( 19830, -2701.449218, 866.287780, 70.700965, 0.000000, 0.000000, -39.299999 );
|
||||
CreateDynamicObject( 2767, -2702.743164, 866.304016, 70.730972, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 19582, -2702.633056, 866.304016, 70.760978, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 19582, -2702.863281, 866.304016, 70.760978, 0.000000, 0.000000, 24.399997 );
|
||||
CreateDynamicObject( 19583, -2702.130126, 866.357666, 70.762702, 0.199999, 0.000000, -38.599994 );
|
||||
CreateDynamicObject( 19579, -2704.347900, 866.373657, 70.690971, 0.000000, 0.000000, -44.099994 );
|
||||
CreateDynamicObject( 11740, -2703.977783, 866.323425, 70.730979, 0.000000, 0.000000, -44.099994 );
|
||||
CreateDynamicObject( 2313, -2703.046630, 854.153686, 69.711006, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 19787, -2703.707031, 853.693237, 71.331008, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 2245, -2703.696777, 854.117309, 70.460983, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 2311, -2704.308349, 856.214477, 69.650978, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1421, -2716.784179, 857.968994, 70.420974, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 19573, -2707.722412, 864.541687, 71.220970, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 19573, -2707.722412, 865.171691, 71.220970, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 19573, -2707.722412, 865.011901, 70.580978, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 19786, -2713.826660, 865.825683, 75.107490, 4.399998, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1437, -2700.059570, 864.697570, 69.131690, -28.699996, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 1437, -2703.815917, 865.807678, 73.838386, -37.299999, 0.000000, 90.000000 );
|
||||
CreateDynamicObject( 3934, -2714.048339, 858.807495, 79.000198, 0.000000, 7.799992, 90.000000 );
|
||||
CreateDynamicObject( 1569, -2704.634765, 866.847290, 69.648757, 0.000000, 0.000000, 0.000000 );
|
||||
CreateDynamicObject( 1569, -2701.654296, 866.857299, 69.648757, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 1617, -2701.655273, 856.640563, 74.483779, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 2273, -2708.328369, 862.312072, 71.020866, 0.000000, 0.000000, -90.000000 );
|
||||
CreateDynamicObject( 2272, -2711.598876, 859.092407, 71.020866, 0.000000, 0.000000, 180.000000 );
|
||||
CreateDynamicObject( 2276, -2715.440917, 859.092407, 71.100883, 0.000000, 0.000000, 180.000000 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
11584
gamemodes/COD8.pwn
Normal file
11584
gamemodes/COD8.pwn
Normal file
File diff suppressed because it is too large
Load Diff
@ -2766,15 +2766,15 @@ enum E_RANK_DATA
|
||||
stock const
|
||||
g_aPlayerRanks[ ] [ E_RANK_DATA ] =
|
||||
{
|
||||
{ 5497.0, "Elite V", 19780, COLOR_GOLD },
|
||||
{ 3435.0, "Elite IV", 19782, COLOR_GOLD },
|
||||
{ 2147.0, "Elite III", 19781, COLOR_GOLD },
|
||||
{ 1342.0, "Elite II", 19784, COLOR_GOLD },
|
||||
{ 838.0, "Elite I", 19783, COLOR_GOLD },
|
||||
{ 524.0, "Silver V", 19780, COLOR_GREY },
|
||||
{ 328.0, "Silver IV", 19782, COLOR_GREY },
|
||||
{ 205.0, "Silver III", 19781, COLOR_GREY },
|
||||
{ 128.0, "Silver II", 19784, COLOR_GREY },
|
||||
{ 9497.2, "Elite V", 19780, COLOR_GOLD },
|
||||
{ 5301.7, "Elite IV", 19782, COLOR_GOLD },
|
||||
{ 2959.61, "Elite III", 19781, COLOR_GOLD },
|
||||
{ 1652.17, "Elite II", 19784, COLOR_GOLD },
|
||||
{ 922.303, "Elite I", 19783, COLOR_GOLD },
|
||||
{ 514.865, "Silver V", 19780, COLOR_GREY },
|
||||
{ 287.417, "Silver IV", 19782, COLOR_GREY },
|
||||
{ 160.45, "Silver III", 19781, COLOR_GREY },
|
||||
{ 89.56, "Silver II", 19784, COLOR_GREY },
|
||||
{ 50.0, "Silver I", 19783, COLOR_GREY },
|
||||
{ 0.0, "unranked", 19300, COLOR_GREY }
|
||||
}
|
||||
@ -5509,7 +5509,7 @@ public ZoneTimer( )
|
||||
{
|
||||
if ( IsPlayerSpawned( d ) && p_Class[ d ] == CLASS_CIVILIAN && p_GangID[ d ] == g_gangzoneAttacker[ z ] && !p_inPaintBall{ d } )
|
||||
{
|
||||
GivePlayerScore( d, 2 );
|
||||
GivePlayerScore( d, 2, .multiplier = 0.5 );
|
||||
GivePlayerWantedLevel( d, 6 );
|
||||
}
|
||||
}
|
||||
@ -7315,7 +7315,7 @@ public OnPlayerDeath(playerid, killerid, reason)
|
||||
}
|
||||
}
|
||||
|
||||
if ( p_Class[ killerid ] != CLASS_POLICE ) GivePlayerWantedLevel( killerid, 12 ), GivePlayerScore( killerid, 1, .multiplier = 0.25 );
|
||||
if ( p_Class[ killerid ] != CLASS_POLICE ) GivePlayerWantedLevel( killerid, 12 ), GivePlayerScore( killerid, 1, .multiplier = 0.2 );
|
||||
}
|
||||
else if ( IsPlayerNPC( killerid ) ) SendDeathMessage( killerid, playerid, reason );
|
||||
else
|
||||
@ -8206,7 +8206,7 @@ public OnMethamphetamineCooking( playerid, vehicleid, last_chemical )
|
||||
ShowPlayerHelpDialog( playerid, 5000, "The process is done. Bag it up and do another round if you wish." );
|
||||
SendServerMessage( playerid, "Process is done. Bag it up, and do another round if you wish. Export it for money." );
|
||||
GivePlayerWantedLevel( playerid, 12 );
|
||||
GivePlayerScore( playerid, 3 );
|
||||
GivePlayerScore( playerid, 3, .multiplier = 0.30 );
|
||||
Achievement::HandleMethYielded( playerid );
|
||||
SetGVarInt( "meth_yield", CreateDynamicObject( 1579, 1477.72449, 1464.36450, 1011.78589, 0.00000, 0.00000, 0.00000, GetPlayerVirtualWorld( playerid ) ), vehicleid );
|
||||
}
|
||||
@ -12949,7 +12949,7 @@ CMD:arrest( playerid, params[ ] )
|
||||
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
|
||||
new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 300 );
|
||||
new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
|
||||
GivePlayerScore( playerid, 2 );
|
||||
GivePlayerScore( playerid, 2, .multiplier = 1.5 );
|
||||
GivePlayerCash( playerid, totalCash );
|
||||
if ( totalCash > 20000 ) printf("[police arrest] %s -> %s - %s", ReturnPlayerName( playerid ), ReturnPlayerName( victimid ), ConvertPrice( totalCash ) ); // 8hska7082bmahu
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[ACHIEVE]{FFFFFF} You have earned "COL_GOLD"%s{FFFFFF} dollars and 2 score for arresting %s(%d)!", ConvertPrice( totalCash ), ReturnPlayerName( victimid ), victimid );
|
||||
@ -18283,7 +18283,7 @@ public OnPlayerEnterDynamicRaceCP( playerid, checkpointid )
|
||||
}
|
||||
items = GetGVarInt( szItems );
|
||||
score = floatround( items / 2 );
|
||||
GivePlayerScore( playerid, score == 0 ? 1 : score );
|
||||
GivePlayerScore( playerid, score == 0 ? 1 : score, .multiplier = 0.4 );
|
||||
DestroyDynamicMapIcon( p_PawnStoreMapIcon[ playerid ] );
|
||||
p_PawnStoreMapIcon[ playerid ] = 0xFFFF;
|
||||
DestroyDynamicRaceCP( p_PawnStoreExport[ playerid ] );
|
||||
@ -31371,8 +31371,8 @@ stock GivePlayerIrresistiblePoints( playerid, Float: points )
|
||||
if ( fCurrentPoints < 0.0 )
|
||||
fCurrentPoints = 0.0;
|
||||
|
||||
if ( fCurrentPoints > 6000.0 )
|
||||
fCurrentPoints = 6000.0;
|
||||
if ( fCurrentPoints > 10000.0 )
|
||||
fCurrentPoints = 10000.0;
|
||||
|
||||
// gained
|
||||
for( new iRank = 0; iRank < sizeof( g_aPlayerRanks ); iRank++ )
|
||||
|
146
pawno/include/a_analytics.inc
Normal file
146
pawno/include/a_analytics.inc
Normal file
@ -0,0 +1,146 @@
|
||||
/*
|
||||
*
|
||||
* Irresistible Gaming
|
||||
*
|
||||
* Founded by Lorenc
|
||||
*
|
||||
* Analytics to be used with Irresistible Gaming SA-MP Servers
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined ANAL_INCLUDED
|
||||
#include < a_samp >
|
||||
|
||||
// Variables
|
||||
|
||||
enum E_ANALYTICS
|
||||
{
|
||||
E_CONNECTS,
|
||||
|
||||
E_DISCONNECTS[ 3 ],
|
||||
|
||||
E_BAN_USES,
|
||||
E_KICK_USES,
|
||||
|
||||
E_CUSTOM_BAN_REJECTS,
|
||||
};
|
||||
|
||||
new
|
||||
g_Analytics [ E_ANALYTICS ]
|
||||
;
|
||||
|
||||
// Function Hook (KickPlayer)
|
||||
|
||||
stock SAMPANALYTICS_Kick( playerid )
|
||||
{
|
||||
g_Analytics[ E_KICK_USES ] ++;
|
||||
return Kick( playerid );
|
||||
}
|
||||
|
||||
#if defined _ALS_Kick
|
||||
#undef Kick
|
||||
#else
|
||||
#define _ALS_Kick
|
||||
#endif
|
||||
#define Kick SAMPANALYTICS_Kick
|
||||
|
||||
// Function Hook (KickPlayer)
|
||||
|
||||
stock SAMPANALYTICS_Ban( playerid )
|
||||
{
|
||||
g_Analytics[ E_BAN_USES ] ++;
|
||||
return Ban( playerid );
|
||||
}
|
||||
|
||||
#if defined _ALS_Ban
|
||||
#undef Ban
|
||||
#else
|
||||
#define _ALS_Ban
|
||||
#endif
|
||||
#define Ban SAMPANALYTICS_Ban
|
||||
|
||||
// Function Hook (KickPlayer)
|
||||
|
||||
stock SAMPANALYTICS_BanEx( playerid, reason[ ] )
|
||||
{
|
||||
g_Analytics[ E_BAN_USES ] ++;
|
||||
return BanEx( playerid, reason );
|
||||
}
|
||||
|
||||
#if defined _ALS_BanEx
|
||||
#undef BanEx
|
||||
#else
|
||||
#define _ALS_BanEx
|
||||
#endif
|
||||
#define BanEx SAMPANALYTICS_BanEx
|
||||
|
||||
// Callback Hook (OnPlayerConnect)
|
||||
|
||||
public OnPlayerConnect( playerid )
|
||||
{
|
||||
g_Analytics[ E_CONNECTS ] ++;
|
||||
|
||||
#if defined SAMPANAL_OnPlayerConnect
|
||||
return SAMPANAL_OnPlayerConnect( playerid );
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined SAMPANAL_OnPlayerConnect
|
||||
forward SAMPANAL_OnPlayerConnect( playerid );
|
||||
#endif
|
||||
#if defined _ALS_OnPlayerConnect
|
||||
#undef OnPlayerConnect
|
||||
#else
|
||||
#define _ALS_OnPlayerConnect
|
||||
#endif
|
||||
#define OnPlayerConnect SAMPANAL_OnPlayerConnect
|
||||
|
||||
// Callback Hook (OnPlayerDisconnect)
|
||||
|
||||
public OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
if( reason < 3 )
|
||||
g_Analytics[ E_DISCONNECTS ] [ reason ] ++;
|
||||
|
||||
#if defined SAMPANAL_OnPlayerDisconnect
|
||||
return SAMPANAL_OnPlayerDisconnect( playerid, reason );
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined SAMPANAL_OnPlayerDisconnect
|
||||
forward SAMPANAL_OnPlayerDisconnect( playerid, reason );
|
||||
#endif
|
||||
#if defined _ALS_OnPlayerDisconnect
|
||||
#undef OnPlayerDisconnect
|
||||
#else
|
||||
#define _ALS_OnPlayerDisconnect
|
||||
#endif
|
||||
#define OnPlayerDisconnect SAMPANAL_OnPlayerDisconnect
|
||||
|
||||
// Functions
|
||||
|
||||
stock IncremementAnalyticalValue( E_ANALYTICS: type, value = 1 )
|
||||
return ( g_Analytics[ type ] += value );
|
||||
|
||||
stock AnalyticsToHumanReadable( )
|
||||
{
|
||||
|
||||
new
|
||||
szString[ 256 ],
|
||||
iDisconnects = g_Analytics[ E_DISCONNECTS ] [ 0 ] + g_Analytics[ E_DISCONNECTS ] [ 1 ] + g_Analytics[ E_DISCONNECTS ] [ 2 ]
|
||||
;
|
||||
|
||||
format( szString, sizeof( szString ),
|
||||
"Connections: %d\nDisconnections: %d\n\nPlayer Timeout/Crash: %d\nPlayer Quits: %d\nPlayer Kick/Ban: %d\n\nServer Ban Uses: %d\nServer Kick Uses: %d\n\nCustom Ban Rejects: %d",
|
||||
g_Analytics[ E_CONNECTS ], iDisconnects, g_Analytics[ E_DISCONNECTS ] [ 0 ], g_Analytics[ E_DISCONNECTS ] [ 1 ], g_Analytics[ E_DISCONNECTS ] [ 2 ], g_Analytics[ E_BAN_USES ],
|
||||
g_Analytics[ E_KICK_USES ], g_Analytics[ E_CUSTOM_BAN_REJECTS ]
|
||||
);
|
||||
|
||||
return szString;
|
||||
}
|
||||
#endif
|
60
pawno/include/a_explosion.inc
Normal file
60
pawno/include/a_explosion.inc
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
*
|
||||
* Author: Lorenc P.
|
||||
* Uses: Call Deaths with Explosions
|
||||
* Credits: Mauzen, I just edited lol
|
||||
*
|
||||
*/
|
||||
|
||||
/* ** Stopping crap from duplicate ** */
|
||||
#if defined using_lexplode
|
||||
#endinput
|
||||
#endif
|
||||
#define using_lexplode
|
||||
|
||||
/* ** Includes ** */
|
||||
#tryinclude < foreach >
|
||||
|
||||
/* ** Some Functions ** */
|
||||
#define DestroyObjectTimed(%0,%1) SetTimerEx("lexplode_Destroy",%1,0,"i",%0)
|
||||
|
||||
/* ** Includes ** */
|
||||
#define EXPLOSION_TYPE_FUEL_CAR ( 0 )
|
||||
#define EXPLOSION_TYPE_LARGE ( 1 )
|
||||
#define EXPLOSION_TYPE_MEDIUM ( 2 )
|
||||
#define EXPLOSION_TYPE_MOLOTOV ( 3 )
|
||||
#define EXPLOSION_TYPE_SMALL ( 4 )
|
||||
#define EXPLOSION_TYPE_TINY ( 5 )
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerExplosion( killerid, playerid, reason );
|
||||
forward lexplode_Destroy( objectid );
|
||||
|
||||
/* ** Script ** */
|
||||
stock CreateExplosionEx( playerid, Float: x, Float: y, Float: z, Float: radius, type = EXPLOSION_TYPE_MEDIUM, reason )
|
||||
{
|
||||
if( type < 0 || type > 5 )
|
||||
return;
|
||||
|
||||
new
|
||||
objectid = INVALID_OBJECT_ID;
|
||||
|
||||
objectid = CreateObject( 18681 + type, x, y, z - 1.5, 0.0, 0.0, 0.0, 1000.0 );
|
||||
SetTimerEx( "lexplode_Destroy", 5000, 0, "i", objectid );
|
||||
|
||||
if( type == 1 || type == 2 || type == 4 ) CreateExplosion( x, y, z, 13, 0.0 );
|
||||
|
||||
foreach(new i : Player)
|
||||
{
|
||||
PlayerPlaySound( i, 1159, x, y, z );
|
||||
if( i == playerid ) continue;
|
||||
if( p_Team[ i ] == p_Team[ playerid ] ) continue;
|
||||
if( !p_Spawned{ i } ) continue;
|
||||
if( p_Spectating{ i } ) continue;
|
||||
if( !IsPlayerInRangeOfPoint( i, radius, x, y, z ) ) continue;
|
||||
OnPlayerExplosion( playerid, i, reason );
|
||||
}
|
||||
}
|
||||
|
||||
public lexplode_Destroy( objectid )
|
||||
return DestroyObject(objectid);
|
212
pawno/include/a_weapondata.inc
Normal file
212
pawno/include/a_weapondata.inc
Normal file
@ -0,0 +1,212 @@
|
||||
/*==============================================================================
|
||||
|
||||
Southclaw's Advanced Weapon Damage Library
|
||||
|
||||
With this you can finely tune weapon damage based on distance.
|
||||
Using min/max range values, a weapon's damage varies depending on the
|
||||
distance between the shooter and the target.
|
||||
|
||||
Do what you want with it, but keep my name on it :)
|
||||
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
#define MAX_WEAPONS (50)
|
||||
#define MAX_WEAPON_NAME (17)
|
||||
|
||||
#if defined __WEAPONDAMAGEINC__
|
||||
#endinput
|
||||
#endif
|
||||
#define __WEAPONDAMAGEINC__
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
WEAPON_VEHICLE_BULLET = WEAPON_PARACHUTE + 1,
|
||||
WEAPON_VEHICLE_EXPLOSIVE,
|
||||
WEAPON_VEHICLE_COLLISION
|
||||
}
|
||||
|
||||
enum E_WEAPON_DATA
|
||||
{
|
||||
weapon_name[MAX_WEAPON_NAME], // A
|
||||
weapon_model, // B
|
||||
weapon_magSize, // C
|
||||
weapon_slot, // D
|
||||
Float: weapon_minDmg, // E
|
||||
Float: weapon_maxDmg, // F
|
||||
Float: weapon_minRange, // G
|
||||
Float: weapon_maxRange, // H
|
||||
Float: weapon_shotInterval, // I
|
||||
Float: weapon_rangeCap // J
|
||||
}
|
||||
|
||||
|
||||
stock const WeaponData[MAX_WEAPONS][E_WEAPON_DATA]=
|
||||
{
|
||||
// A B C D E F G H I J
|
||||
{"Fist", 000, 1, 0, 1.5, 5.0, 0.0, 2.0, 0.0, 1.6}, // 0
|
||||
{"Knuckle Duster", 331, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 1
|
||||
{"Golf Club", 333, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 2
|
||||
{"Baton", 334, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 3
|
||||
{"Knife", 335, 1, 1, 26.0, 26.0, 0.0, 1.6, 0.0, 1.6}, // 4
|
||||
{"Baseball Bat", 336, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 5
|
||||
{"Spade", 337, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 6
|
||||
{"Pool Cue", 338, 1, 1, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 7
|
||||
{"Katana", 339, 1, 1, 24.0, 31.5, 0.0, 2.0, 0.0, 1.6}, // 8
|
||||
{"Chainsaw", 341, 1, 1, 24.5, 50.0, 0.0, 2.0, 0.0, 1.6}, // 9
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Dildo", 321, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 10
|
||||
{"Dildo", 322, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 11
|
||||
{"Dildo", 323, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 12
|
||||
{"Dildo", 324, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 13
|
||||
{"Flowers", 325, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 14
|
||||
{"Cane", 326, 1, 10, 0.5, 1.0, 0.0, 2.0, 0.0, 1.6}, // 15
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Grenade", 342, 1, 8, 50.0, 100.0, 0.0, 2.0, 0.0, 40.0}, // 16
|
||||
{"Teargas", 343, 1, 8, 0.0, 0.0, 0.0, 2.0, 0.0, 40.0}, // 17
|
||||
{"Molotov", 344, 1, 8, 0.1, 0.1, 0.0, 1.0, 0.0, 40.0}, // 18
|
||||
|
||||
{"<null>", 000, 0, 0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0}, // 19
|
||||
{"<null>", 000, 0, 0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0}, // 20
|
||||
{"<null>", 000, 0, 0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0}, // 21
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"9mm Pistol", 346, 10, 2, 21.0, 24.0, 10.0, 30.0, 164.83, 35.0}, // 22
|
||||
{"Silenced Pistol", 347, 10, 2, 25.0, 26.0, 10.0, 25.0, 166.61, 35.0}, // 23
|
||||
{"Desert Eagle", 348, 7, 2, 20.0, 30.0, 12.0, 35.0, 82.54, 35.0}, // 24
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Shotgun", 349, 6, 3, 15.0, 54.0, 11.0, 35.0, 56.40, 40.0}, // 25
|
||||
{"Sawn-off Shotgun",350, 2, 3, 5.0, 48.0, 5.0, 24.0, 196.07, 35.0}, // 26
|
||||
{"Spas 12", 351, 7, 3, 16.0, 31.0, 14.0, 40.0, 179.10, 40.0}, // 27
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Mac 10", 352, 36, 4, 12.0, 20.0, 10.0, 35.0, 461.26, 35.0}, // 28
|
||||
{"MP5", 353, 30, 4, 12.0, 24.0, 9.0, 38.0, 554.98, 45.0}, // 29
|
||||
{"AK-47", 355, 30, 5, 18.0, 24.0, 11.0, 39.0, 474.47, 70.0}, // 30
|
||||
{"M4", 356, 30, 5, 16.0, 24.0, 13.0, 46.0, 490.59, 90.0}, // 31
|
||||
{"Tec 9", 372, 30, 4, 10.0, 20.0, 10.0, 25.0, 447.48, 35.0}, // 32
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Rifle", 357, 5, 6, 45.0, 60.0, 30.0, 100.0, 55.83, 100.0}, // 33
|
||||
{"Sniper", 358, 5, 6, 45.0, 65.0, 30.0, 100.0, 55.67, 100.0}, // 34 [Jul 1 2015] Sniper max dmg (F) changed from 60 to 65
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"RPG", 359, 1, 7, 100.0, 100.0, 1.0, 30.0, 0.0, 55.0}, // 35
|
||||
{"Heatseeker", 360, 1, 7, 100.0, 100.0, 1.0, 30.0, 0.0, 55.0}, // 36
|
||||
{"Flamer", 361, 100, 7, 10.1, 15.1, 1.0, 5.0, 2974.95, 5.1}, // 37
|
||||
{"Minigun", 362, 100, 7, 1.1, 2.0, 1.0, 60.0, 2571.42, 75.0}, // 38
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Remote Bomb", 363, 1, 8, 5.0, 20.0, 10.0, 50.0, 0.0, 40.0}, // 39
|
||||
{"Detonator", 364, 1, 12, 0.0, 0.0, 0.0, 0.0, 0.0, 25.0}, // 40
|
||||
{"Spray Paint", 365, 500, 9, 0.0, 0.1, 0.0, 2.0, 0.0, 6.1}, // 41
|
||||
{"Extinguisher", 366, 500, 9, 0.0, 0.0, 0.0, 2.0, 0.0, 10.1}, // 42
|
||||
{"Camera", 367, 36, 9, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0}, // 43
|
||||
{"Night Vision", 000, 1, 11, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0}, // 44
|
||||
{"Thermal Vision", 000, 1, 11, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0}, // 45
|
||||
{"Parachute", 371, 1, 11, 0.0, 0.0, 0.0, 0.0, 0.0, 50.0}, // 46
|
||||
|
||||
// A B C D E F G H I J
|
||||
{"Vehicle Gun", 000, 0, 0, 3.0, 7.0, 0.0, 50.0, 0.0, 50.0}, // 47
|
||||
{"Vehicle Bomb", 000, 0, 0, 50.0, 50.0, 0.0, 50.0, 0.0, 50.0}, // 48
|
||||
{"Vehicle", 000, 0, 0, 20.0, 30.0, 0.0, 10.0, 0.0, 25.0} // 49 Should be scripted to be based on velocity.
|
||||
};
|
||||
|
||||
#define GetWeaponName GetWeaponName_New
|
||||
stock GetWeaponName_New(weaponid, string[], size = sizeof(string))
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0;
|
||||
|
||||
string[0] = EOS;
|
||||
strcat(string, WeaponData[weaponid][weapon_name], size);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock GetWeaponModel(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0;
|
||||
|
||||
return WeaponData[weaponid][weapon_model];
|
||||
}
|
||||
|
||||
stock GetWeaponMagSize(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0;
|
||||
|
||||
return WeaponData[weaponid][weapon_magSize];
|
||||
}
|
||||
|
||||
stock GetWeaponSlot(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0;
|
||||
|
||||
return WeaponData[weaponid][weapon_slot];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponMinDamage(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_minDmg];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponMaxDamage(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_maxDmg];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponMinRange(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_minRange];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponMaxRange(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_maxRange];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponShotInterval(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_shotInterval];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponRangeCap(weaponid)
|
||||
{
|
||||
if(!(0 <= weaponid < MAX_WEAPONS))
|
||||
return 0.0;
|
||||
|
||||
return WeaponData[weaponid][weapon_rangeCap];
|
||||
}
|
||||
|
||||
stock Float:GetWeaponDamageFromDistance(weaponid, Float:distance)
|
||||
{
|
||||
if(distance < WeaponData[weaponid][weapon_minRange])
|
||||
return WeaponData[weaponid][weapon_maxDmg];
|
||||
|
||||
if(distance > WeaponData[weaponid][weapon_maxRange])
|
||||
return WeaponData[weaponid][weapon_minDmg];
|
||||
|
||||
return ((WeaponData[weaponid][weapon_minDmg]-WeaponData[weaponid][weapon_maxDmg]) / (WeaponData[weaponid][weapon_maxRange]-WeaponData[weaponid][weapon_minRange])) * (distance - WeaponData[weaponid][weapon_maxRange]) + WeaponData[weaponid][weapon_minDmg];
|
||||
}
|
Loading…
Reference in New Issue
Block a user