moved gamemode modules into gamemodes/irresistible ... updated git ignore
This commit is contained in:
parent
c586647770
commit
6e9073296f
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,6 +23,9 @@ plugins/*
|
||||
|
||||
# gamemodes
|
||||
gamemodes/*
|
||||
!gamemodes/irresistible
|
||||
!gamemodes/irresistible/**
|
||||
gamemodes/irresistible/config/database.pwn
|
||||
!gamemodes/sf-cnr.pwn
|
||||
!gamemodes/COD8.pwn
|
||||
|
||||
|
14
gamemodes/irresistible/README.md
Normal file
14
gamemodes/irresistible/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
|
||||
Irresistible Gaming Development Framework
|
||||
Copyright (c) 2018
|
||||
|
||||
This framework allows you to easily collaborate on Irresistible Gaming servers.
|
||||
|
||||
Internal Server Hooks:
|
||||
- InitializeTextDraws( )
|
||||
* Where text draws get recreated
|
||||
|
||||
- SetPlayerRandomSpawn( )
|
||||
* When a player is attempting to spawn somewhere randomly
|
||||
*/
|
17
gamemodes/irresistible/_blank.pwn
Normal file
17
gamemodes/irresistible/_blank.pwn
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
|
||||
/* ** Variables ** */
|
||||
|
||||
/* ** Hooks ** */
|
||||
|
||||
/* ** Functions ** */
|
61
gamemodes/irresistible/_main.pwn
Normal file
61
gamemodes/irresistible/_main.pwn
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: main.inc
|
||||
* Purpose: centralize includes
|
||||
*/
|
||||
|
||||
// config
|
||||
#include "irresistible\config\database.pwn" // keep #1
|
||||
#include "irresistible\config\colors.pwn"
|
||||
|
||||
// anticheat
|
||||
#include "irresistible\anticheat\_anticheat.pwn"
|
||||
|
||||
// default
|
||||
#include "irresistible\security.pwn"
|
||||
#include "irresistible\helpers.pwn"
|
||||
#include "irresistible\floodcontrol.pwn"
|
||||
#include "irresistible\mailer.pwn"
|
||||
#include "irresistible\attachments.pwn"
|
||||
#include "irresistible\lookup.pwn"
|
||||
#include "irresistible\servervars.pwn"
|
||||
#include "irresistible\sampac.pwn"
|
||||
// #include "irresistible\analytics.pwn"
|
||||
|
||||
// gta related variables
|
||||
#include "irresistible\gta\_gta.pwn"
|
||||
|
||||
// cnr configuration
|
||||
#include "irresistible\cnr\player.pwn"
|
||||
#include "irresistible\cnr\global.pwn"
|
||||
#include "irresistible\cnr\classes.pwn"
|
||||
#include "irresistible\cnr\cities.pwn"
|
||||
#include "irresistible\cnr\dialog_ids.pwn"
|
||||
#include "irresistible\cnr\vip.pwn"
|
||||
|
||||
// features
|
||||
#include "irresistible\features\fps.pwn"
|
||||
#include "irresistible\features\radio.pwn"
|
||||
#include "irresistible\features\cash_cards.pwn"
|
||||
#include "irresistible\features\furniture.pwn"
|
||||
#include "irresistible\features\weapon_drop.pwn"
|
||||
#include "irresistible\features\ammunation.pwn"
|
||||
#include "irresistible\features\duel.pwn"
|
||||
#include "irresistible\features\crowdfund.pwn"
|
||||
// #include "irresistible\features\pilot.pwn"
|
||||
// #include "irresistible\features\fishing.pwn"
|
||||
// #include "irresistible\features\vote.pwn"
|
||||
|
||||
// gangs and facilities
|
||||
#include "irresistible\features\gangs\gangs.pwn"
|
||||
#include "irresistible\features\gangs\facilities.pwn"
|
||||
#include "irresistible\features\gangs\turfs.pwn"
|
||||
#include "irresistible\features\gangs\cannon.pwn"
|
||||
// #include "irresistible\features\gangs\gvehicles.pwn"
|
||||
|
||||
// visage casino
|
||||
#include "irresistible\features\visage\_visage.pwn"
|
||||
|
||||
// static cnr features
|
||||
#include "irresistible\cnr\static\_cnr_static.pwn"
|
142
gamemodes/irresistible/analytics.pwn
Normal file
142
gamemodes/irresistible/analytics.pwn
Normal file
@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: analytics.inc
|
||||
* Purpose: track player connection analytics
|
||||
*/
|
||||
|
||||
#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
|
165
gamemodes/irresistible/anticheat/_anticheat.pwn
Normal file
165
gamemodes/irresistible/anticheat/_anticheat.pwn
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: anticheat/main.inc
|
||||
* Purpose: core file to include anticheat items
|
||||
*/
|
||||
|
||||
/* ** Error checking ** */
|
||||
#if !defined AC_INCLUDED
|
||||
#define AC_INCLUDED
|
||||
#else
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define AC_MAX_DETECTIONS ( 13 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum
|
||||
{
|
||||
CHEAT_TYPE_WEAPON,
|
||||
//CHEAT_TYPE_CARWARP,
|
||||
//CHEAT_TYPE_MONEY,
|
||||
//CHEAT_TYPE_PLAYERBUGGER,
|
||||
//CHEAT_TYPE_PICKUP_SPAM,
|
||||
//CHEAT_TYPE_SPECTATE,
|
||||
//CHEAT_TYPE_FAKEKILL,
|
||||
CHEAT_TYPE_REMOTE_JACK,
|
||||
//CHEAT_TYPE_PING_LIMIT,
|
||||
CHEAT_TYPE_SPEED_HACK,
|
||||
//CHEAT_TYPE_JETPACK,
|
||||
CHEAT_TYPE_HEALTH,
|
||||
CHEAT_TYPE_ARMOUR,
|
||||
CHEAT_TYPE_AIRBRAKE,
|
||||
CHEAT_TYPE_PROAIM,
|
||||
CHEAT_TYPE_AUTOCBUG,
|
||||
CHEAT_TYPE_FLYHACKS
|
||||
};
|
||||
|
||||
static stock
|
||||
bool: bIsDetectionEnabled [ AC_MAX_DETECTIONS ] = { true, ... },
|
||||
bool: p_acSpawned [ MAX_PLAYERS char ],
|
||||
p_acUpdateTime [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerCheatDetected( playerid, detection, params );
|
||||
forward bool: AC_IsPlayerSpawned( playerid );
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerUpdate( playerid )
|
||||
{
|
||||
if( ! AC_IsPlayerSpawned( playerid ) )
|
||||
return Y_HOOKS_BREAK_RETURN_0; // Not Spawned, No SYNC!
|
||||
|
||||
if( !IsPlayerNPC( playerid ) )
|
||||
{
|
||||
new
|
||||
iState = GetPlayerState( playerid );
|
||||
|
||||
p_acUpdateTime[ playerid ] = GetTickCount( );
|
||||
|
||||
if( iState != PLAYER_STATE_SPECTATING )
|
||||
{
|
||||
AC_CheckForAirbrake ( playerid, p_acUpdateTime[ playerid ], iState );
|
||||
AC_CheckForHealthHacks ( playerid, p_acUpdateTime[ playerid ] );
|
||||
AC_CheckForFlyHacks ( playerid, p_acUpdateTime[ playerid ] );
|
||||
AC_CheckPlayerRemoteJacking ( playerid );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
|
||||
{
|
||||
new
|
||||
iState = GetPlayerState( playerid );
|
||||
|
||||
if( iState == PLAYER_STATE_WASTED || ! AC_IsPlayerSpawned( playerid ) )
|
||||
return Y_HOOKS_BREAK_RETURN_0; // Why bother, he's dead!
|
||||
|
||||
AC_CheckForAutoCbug( playerid, weaponid );
|
||||
AC_CheckForSilentAimbot( playerid, hittype, hitid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_acSpawned{ playerid } = false;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_acSpawned{ playerid } = true;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerRequestClass( playerid, classid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_acSpawned{ playerid } = false;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock AC_DetectedCheatToString( iDetection ) {
|
||||
new
|
||||
szString[ 16 ] = "unknown";
|
||||
|
||||
switch( iDetection ) {
|
||||
case CHEAT_TYPE_ARMOUR: szString = "Armour Hacks";
|
||||
case CHEAT_TYPE_HEALTH: szString = "Health Hacks";
|
||||
case CHEAT_TYPE_WEAPON: szString = "Weapon Hacks";
|
||||
case CHEAT_TYPE_AIRBRAKE: szString = "Airbrake";
|
||||
case CHEAT_TYPE_PROAIM: szString = "Silent Aimbot";
|
||||
case CHEAT_TYPE_AUTOCBUG: szString = "Auto CBUG";
|
||||
case CHEAT_TYPE_FLYHACKS: szString = "Fly Hacks";
|
||||
case CHEAT_TYPE_REMOTE_JACK: szString = "Remote Jacking";
|
||||
}
|
||||
return szString;
|
||||
}
|
||||
|
||||
stock ac_IsPointInArea( Float: X, Float: Y, Float: minx, Float: maxx, Float: miny, Float: maxy )
|
||||
return ( X > minx && X < maxx && Y > miny && Y < maxy );
|
||||
|
||||
stock Float: ac_PointDistance( Float: X, Float: Y, Float: dstX, Float: dstY )
|
||||
return ( ( X - dstX ) * ( X - dstX ) ) + ( ( Y - dstY ) * ( Y - dstY ) );
|
||||
|
||||
stock Float: ac_GetDistanceBetweenPlayers( iPlayer1, iPlayer2, &Float: fDistance = Float: 0x7F800000 )
|
||||
{
|
||||
static
|
||||
Float: fX, Float: fY, Float: fZ;
|
||||
|
||||
if( GetPlayerVirtualWorld( iPlayer1 ) == GetPlayerVirtualWorld( iPlayer2 ) && GetPlayerPos( iPlayer2, fX, fY, fZ ) )
|
||||
fDistance = GetPlayerDistanceFromPoint( iPlayer1, fX, fY, fZ );
|
||||
|
||||
return fDistance;
|
||||
}
|
||||
|
||||
stock AC_GetLastUpdateTime( playerid ) {
|
||||
return p_acUpdateTime[ playerid ];
|
||||
}
|
||||
|
||||
stock bool: AC_IsPlayerSpawned( playerid ) {
|
||||
return p_acSpawned{ playerid };
|
||||
}
|
||||
|
||||
stock AC_SetPlayerSpawned( playerid, bool: spawned ) {
|
||||
p_acSpawned{ playerid } = spawned;
|
||||
}
|
||||
|
||||
/* ** Modules (remove to disable) ** */
|
||||
#include "irresistible\anticheat\hitpoints.pwn"
|
||||
#include "irresistible\anticheat\weapon.pwn"
|
||||
#include "irresistible\anticheat\airbrake.pwn"
|
||||
#include "irresistible\anticheat\proaim.pwn"
|
||||
#include "irresistible\anticheat\autocbug.pwn"
|
||||
#include "irresistible\anticheat\flying.pwn"
|
||||
#include "irresistible\anticheat\remotejack.pwn"
|
167
gamemodes/irresistible/anticheat/airbrake.pwn
Normal file
167
gamemodes/irresistible/anticheat/airbrake.pwn
Normal file
@ -0,0 +1,167 @@
|
||||
/*
|
||||
PROJECT <> SA:MP Anticheat Plug-in
|
||||
LICENSE <> See LICENSE in the top level directory.
|
||||
AUTHOR(S) <> Lorenc_ (zeelorenc@hotmail.com), Emmet_ (no email)
|
||||
PURPOSE <> Providing datastructures for the internal SA:MP Server.
|
||||
|
||||
|
||||
Copyright (C) 2014 SA:MP Anticheat Plug-in.
|
||||
|
||||
The Project is available on https://github.com/myudev/SAMPAC
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
Float: p_abLastPosition [ MAX_PLAYERS ] [ 3 ],
|
||||
p_abLastTick [ MAX_PLAYERS ],
|
||||
p_abPosTick [ MAX_PLAYERS ],
|
||||
p_abDetected [ MAX_PLAYERS char ],
|
||||
p_abResetTimer [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
public AC_ResetABDetected( playerid );
|
||||
|
||||
/* ** Function Hooks ** */
|
||||
|
||||
// Function Hook (PutPlayerInVehicle)
|
||||
|
||||
stock AC_AB_PutPlayerInVehicle( playerid, vehicleid, seatid )
|
||||
{
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
return PutPlayerInVehicle( playerid, vehicleid, seatid );
|
||||
}
|
||||
|
||||
#if defined _ALS_PutPlayerInVehicle
|
||||
#undef PutPlayerInVehicle
|
||||
#else
|
||||
#define _ALS_PutPlayerInVehicle
|
||||
#endif
|
||||
#define PutPlayerInVehicle AC_AB_PutPlayerInVehicle
|
||||
|
||||
// Function Hook (SetPlayerPos)
|
||||
|
||||
stock AC_SetPlayerPos( playerid, Float: x, Float: y, Float: z )
|
||||
{
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
return SetPlayerPos( playerid, x, y, z );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerPos
|
||||
#undef SetPlayerPos
|
||||
#else
|
||||
#define _ALS_SetPlayerPos
|
||||
#endif
|
||||
#define SetPlayerPos AC_SetPlayerPos
|
||||
|
||||
// Function Hook (SetPlayerPosFindZ)
|
||||
|
||||
stock AC_SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z)
|
||||
{
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
return SetPlayerPosFindZ( playerid, x, y, z );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerPosFindZ
|
||||
#undef SetPlayerPosFindZ
|
||||
#else
|
||||
#define _ALS_SetPlayerPosFindZ
|
||||
#endif
|
||||
#define SetPlayerPosFindZ AC_SetPlayerPosFindZ
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerDeath( playerid, killerid, reason ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_abDetected{ playerid } = 0;
|
||||
p_abResetTimer[ playerid ] = -1;
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_abDetected{ playerid } = 0;
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerStateChange( playerid, newstate, oldstate ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_abLastTick[ playerid ] = GetTickCount( ) + 3000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Hooks ** */
|
||||
stock AC_CheckForAirbrake( playerid, iTicks, iState )
|
||||
{
|
||||
if( iState == 0 || iState == 2 || iState == 3 || iState == 7 || iState == 9 )
|
||||
p_abLastTick[ playerid ] = iTicks + 1000;
|
||||
|
||||
else if( !IsPlayerInAnyVehicle( playerid ) && GetPlayerSurfingVehicleID( playerid ) == INVALID_VEHICLE_ID && GetPlayerSurfingObjectID( playerid ) == INVALID_VEHICLE_ID ) // && !IsPlayerNPC( playerid )
|
||||
{
|
||||
new
|
||||
Float: iPacketLoss = NetStats_PacketLossPercent( playerid );
|
||||
|
||||
if( iTicks > p_abLastTick[ playerid ] && iPacketLoss < 0.8 )
|
||||
{
|
||||
static
|
||||
Float: x, Float: y, Float: z,
|
||||
Float: distance
|
||||
;
|
||||
|
||||
GetPlayerPos( playerid, x, y, z );
|
||||
|
||||
if( floatabs( p_abLastPosition[ playerid ] [ 2 ] - z ) < 1.0 )
|
||||
{
|
||||
distance = GetPlayerDistanceFromPoint( playerid, p_abLastPosition[ playerid ] [ 0 ], p_abLastPosition[ playerid ] [ 1 ], p_abLastPosition[ playerid ] [ 2 ] );
|
||||
if( floatabs( distance ) >= 75.0 && ( floatabs( p_abLastPosition[ playerid ] [ 1 ] - y ) >= 50.0 || floatabs( p_abLastPosition[ playerid ] [ 0 ] - x ) >= 50.0 ) )
|
||||
{
|
||||
if( ++p_abDetected{ playerid } >= 3 )
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_AIRBRAKE, 0 );
|
||||
|
||||
if( p_abResetTimer[ playerid ] == -1 )
|
||||
p_abResetTimer[ playerid ] = SetTimerEx( "AC_ResetABDetected", 60000, false, "d", playerid );
|
||||
}
|
||||
}
|
||||
p_abLastTick[ playerid ] = iTicks + 1000;
|
||||
}
|
||||
|
||||
if( iTicks > p_abPosTick[ playerid ] )
|
||||
{
|
||||
p_abPosTick[ playerid ] = iTicks + 1000;
|
||||
GetPlayerPos( playerid, p_abLastPosition[ playerid ] [ 0 ], p_abLastPosition[ playerid ] [ 1 ], p_abLastPosition[ playerid ] [ 2 ] );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public AC_ResetABDetected( playerid ) {
|
||||
p_abDetected{ playerid } = 0;
|
||||
p_abResetTimer[ playerid ] = -1;
|
||||
}
|
82
gamemodes/irresistible/anticheat/autocbug.pwn
Normal file
82
gamemodes/irresistible/anticheat/autocbug.pwn
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: anticheat/autocbug.pwn
|
||||
* Purpose: rapid fire detection
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define AUTOCBUG_TICKS_DEAGLE ( 500 ) // prev 600
|
||||
#define AUTOCBUG_TICKS_SHOTGUN ( 850 )
|
||||
#define AUTOCBUG_TICKS_COUNTRY ( 750 )
|
||||
#define AUTOCBUG_TICKS_SNIPER ( 750 )
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
p_cbugKeyTicks [ MAX_PLAYERS ],
|
||||
p_cbugFireTicks [ MAX_PLAYERS ],
|
||||
p_cbugWarns [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_cbugWarns{ playerid } = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
if( !p_cbugKeyTicks[ playerid ] ) {
|
||||
p_cbugKeyTicks[ playerid ] = GetTickCount( ), p_cbugWarns{ playerid } = 0;
|
||||
}
|
||||
|
||||
if( ( ( ( newkeys & ( KEY_CROUCH ) ) == ( KEY_CROUCH ) ) || ( ( oldkeys & ( KEY_CROUCH ) ) == ( KEY_CROUCH ) ) ) ) {
|
||||
p_cbugKeyTicks[ playerid ] = GetTickCount( ), p_cbugWarns{ playerid } = 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock AC_CheckForAutoCbug( playerid, weaponid )
|
||||
{
|
||||
// Anti-Rapid Fire
|
||||
if( !p_cbugFireTicks[ playerid ] ) p_cbugFireTicks[ playerid ] = GetTickCount( );
|
||||
else
|
||||
{
|
||||
new
|
||||
iTicks = GetTickCount( ),
|
||||
iInterval = iTicks - p_cbugFireTicks[ playerid ],
|
||||
iKeyInterval = iTicks - p_cbugKeyTicks[ playerid ],
|
||||
iHardInterval = 1000
|
||||
;
|
||||
|
||||
if( weaponid == WEAPON_DEAGLE || weaponid == WEAPON_SHOTGUN || weaponid == WEAPON_RIFLE || weaponid == WEAPON_SNIPER )
|
||||
{
|
||||
new
|
||||
iCompare = iKeyInterval - iInterval,
|
||||
Float: fOwnPacketLoss = NetStats_PacketLossPercent( playerid )
|
||||
;
|
||||
|
||||
switch( weaponid )
|
||||
{
|
||||
case WEAPON_DEAGLE: iHardInterval = AUTOCBUG_TICKS_DEAGLE;
|
||||
case WEAPON_SHOTGUN: iHardInterval = AUTOCBUG_TICKS_SHOTGUN;
|
||||
case WEAPON_RIFLE: iHardInterval = AUTOCBUG_TICKS_COUNTRY;
|
||||
case WEAPON_SNIPER: iHardInterval = AUTOCBUG_TICKS_SNIPER;
|
||||
}
|
||||
|
||||
if( iInterval < iHardInterval && iCompare > 1500 && fOwnPacketLoss < 0.8 ) {
|
||||
if( p_cbugWarns{ playerid }++ >= 2 ) {
|
||||
printf( "[autocbug detect] %d detected (wep %d, interval %d, compare %d, warns %d)", playerid, weaponid, iInterval, iCompare, p_cbugWarns{ playerid });
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_AUTOCBUG, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
p_cbugFireTicks[ playerid ] = iTicks;
|
||||
}
|
||||
}
|
106
gamemodes/irresistible/anticheat/flying.pwn
Normal file
106
gamemodes/irresistible/anticheat/flying.pwn
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
PROJECT <> SA:MP Anticheat Plug-in
|
||||
LICENSE <> See LICENSE in the top level directory.
|
||||
AUTHOR(S) <> Lorenc_ (zeelorenc@hotmail.com)
|
||||
PURPOSE <> Providing datastructures for the internal SA:MP Server.
|
||||
|
||||
|
||||
Copyright (C) 2014 SA:MP Anticheat Plug-in.
|
||||
|
||||
The Project is available on https://github.com/myudev/SAMPAC
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Variables ** */
|
||||
static const Float: aWaterPlaces[ 20 ] [ 4 ] =
|
||||
{
|
||||
{ 30.00, 2313.00, -1417.0, 23.000 }, { 15.00, 1280.00, -773.00, 1083.0 }, { 25.00, 2583.00, 2385.00, 15.000 }, { 20.00, 225.000, -1187.0, 74.000 },
|
||||
{ 50.00, 1973.00, -1198.0, 17.000 }, { 180.0, 1937.00, 1589.00, 9.0000 }, { 55.00, 2142.00, 1285.00, 8.0000 }, { 45.00, 2150.00, 1132.00, 8.0000 },
|
||||
{ 55.00, 2089.00, 1915.00, 10.000 }, { 32.00, 2531.00, 1567.00, 9.0000 }, { 21.00, 2582.00, 2385.00, 17.000 }, { 33.00, 1768.00, 2853.00, 10.000 },
|
||||
{ 47.00, -2721.0, -466.00, 4.0000 }, { 210.0, -671.00, -1898.0, 6.0000 }, { 45.00, 1240.00, -2381.0, 9.0000 }, { 50.00, 1969.00, -1200.0, 18.000 },
|
||||
{ 10.00, 513.000, -1105.0, 79.000 }, { 20.00, 193.000, -1230.0, 77.000 }, { 30.00, 1094.00, -672.00, 113.00 }, { 20.00, 1278.00, -805.00, 87.000 }
|
||||
};
|
||||
|
||||
static stock
|
||||
p_FlyHacksTick [ MAX_PLAYERS ],
|
||||
p_FlyHacksWarns [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_FlyHacksWarns{ playerid } = 3;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
static stock Float: ac_square( Float: value ) {
|
||||
return value * value;
|
||||
}
|
||||
|
||||
stock AC_CheckForFlyHacks( playerid, iTicks )
|
||||
{
|
||||
if( iTicks > p_FlyHacksTick[ playerid ] )
|
||||
{
|
||||
new
|
||||
pSurfingObject = GetPlayerSurfingObjectID( playerid ),
|
||||
pSurfingVehicle = GetPlayerSurfingVehicleID( playerid )
|
||||
;
|
||||
|
||||
if( pSurfingVehicle == INVALID_VEHICLE_ID && pSurfingObject == INVALID_OBJECT_ID )
|
||||
{
|
||||
new
|
||||
iAnimation = GetPlayerAnimationIndex( playerid );
|
||||
|
||||
if( iAnimation == 1538 || iAnimation == 1539 || iAnimation == 1543 )
|
||||
{
|
||||
if( !ac_IsPlayerInWater( playerid ) )
|
||||
{
|
||||
if( p_FlyHacksWarns{ playerid }++ >= 2 )
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_FLYHACKS, 0 ), p_FlyHacksWarns{ playerid } = 3;
|
||||
}
|
||||
else p_FlyHacksWarns{ playerid } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
p_FlyHacksTick[ playerid ] = iTicks + 1000;
|
||||
}
|
||||
}
|
||||
|
||||
stock ac_IsPlayerInWater( playerid )
|
||||
{
|
||||
static
|
||||
Float: X, Float: Y, Float: Z, i;
|
||||
|
||||
if( GetPlayerPos( playerid, X, Y, Z ) )
|
||||
{
|
||||
if( ac_IsPointInArea( X, Y, 2347.080, 521.70, 2372.65, 545.1971 ) || ac_IsPointInArea( X, Y, 2286.61, 521.70, 2301.45, 545.1971 ) )
|
||||
return false; // Kar Fix
|
||||
|
||||
if( ac_PointDistance( X, Y, -965.0, 2438.0 ) <= ac_square( 700.0 ) && Z < 44.0 )
|
||||
return true;
|
||||
|
||||
for( i = 0; i < sizeof( aWaterPlaces ); i++ )
|
||||
if( ac_PointDistance( X, Y, aWaterPlaces[ i ] [ 1 ], aWaterPlaces[ i ] [ 2 ] ) <= ac_square( aWaterPlaces[ i ] [ 0 ] ) && Z < aWaterPlaces[ i ] [ 3 ] )
|
||||
return true;
|
||||
|
||||
return Z < 1.9 ? !( ac_PointDistance( X, Y, 618.4129, 863.3164 ) < ac_square( 200.0 ) ) : false;
|
||||
}
|
||||
return false;
|
||||
}
|
601
gamemodes/irresistible/anticheat/hitpoints.pwn
Normal file
601
gamemodes/irresistible/anticheat/hitpoints.pwn
Normal file
@ -0,0 +1,601 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: anticheat/hitpoints.inc
|
||||
* Purpose: server sided damage system
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define AC_DEFAULT_TEAM ( 1337 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_PLAYER_HITPOINTS
|
||||
{
|
||||
Float: E_POINTS, E_UPDATE_TIME, E_UPDATE_FAIL,
|
||||
bool: E_SYNCED
|
||||
};
|
||||
|
||||
static const
|
||||
s_ValidDamageGiven[] = {
|
||||
1, // 0 - Fist
|
||||
1, // 1 - Brass knuckles
|
||||
1, // 2 - Golf club
|
||||
1, // 3 - Nitestick
|
||||
0, // 4 - Knife
|
||||
1, // 5 - Bat
|
||||
1, // 6 - Shovel
|
||||
1, // 7 - Pool cue
|
||||
1, // 8 - Katana
|
||||
1, // 9 - Chainsaw
|
||||
1, // 10 - Dildo
|
||||
1, // 11 - Dildo 2
|
||||
1, // 12 - Vibrator
|
||||
1, // 13 - Vibrator 2
|
||||
1, // 14 - Flowers
|
||||
1, // 15 - Cane
|
||||
0, // 16 - Grenade
|
||||
0, // 17 - Teargas
|
||||
0, // 18 - Molotov
|
||||
0, // 19 - Vehicle M4 (custom)
|
||||
0, // 20 - Vehicle minigun
|
||||
0, // 21
|
||||
1, // 22 - Colt 45
|
||||
1, // 23 - Silenced
|
||||
1, // 24 - Deagle
|
||||
1, // 25 - Shotgun
|
||||
1, // 26 - Sawed-off
|
||||
1, // 27 - Spas
|
||||
1, // 28 - UZI
|
||||
1, // 29 - MP5
|
||||
1, // 30 - AK47
|
||||
1, // 31 - M4
|
||||
1, // 32 - Tec9
|
||||
1, // 33 - Cuntgun
|
||||
1, // 34 - Sniper
|
||||
0, // 35 - Rocket launcher
|
||||
0, // 36 - Heatseeker
|
||||
0, // 37 - Flamethrower
|
||||
1, // 38 - Minigun
|
||||
0, // 39 - Satchel
|
||||
0, // 40 - Detonator
|
||||
1, // 41 - Spraycan
|
||||
1, // 42 - Fire extinguisher
|
||||
0, // 43 - Camera
|
||||
0, // 44 - Night vision
|
||||
0, // 45 - Infrared
|
||||
1, // 46 - Parachute
|
||||
0, // 47 - Fake pistol
|
||||
0, // 48 - Pistol whip (custom)
|
||||
0, // 49 - Vehicle
|
||||
0, // 50 - Helicopter blades
|
||||
0, // 51 - Explosion
|
||||
0, // 52 - Car park (custom)
|
||||
0, // 53 - Drowning
|
||||
0 // 54 - Splat
|
||||
},
|
||||
|
||||
Float: s_ValidMaxDamage[ ] = {
|
||||
6.6, // 0 - Fist
|
||||
6.6, // 1 - Brass knuckles
|
||||
6.6, // 2 - Golf club
|
||||
6.6, // 3 - Nitestick
|
||||
6.7, // 4 - Knife (varies with back stab)
|
||||
6.6, // 5 - Bat
|
||||
6.6, // 6 - Shovel
|
||||
6.6, // 7 - Pool cue
|
||||
6.6, // 8 - Katana
|
||||
27.1, // 9 - Chainsaw
|
||||
6.6, // 10 - Dildo
|
||||
6.6, // 11 - Dildo 2
|
||||
6.6, // 12 - Vibrator
|
||||
6.6, // 13 - Vibrator 2
|
||||
6.6, // 14 - Flowers
|
||||
6.6, // 15 - Cane
|
||||
82.5, // 16 - Grenade
|
||||
0.0, // 17 - Teargas
|
||||
0.1, // 18 - Molotov
|
||||
0.0, // 19 - Vehicle M4 (custom)
|
||||
0.0, // 20 - Vehicle minigun
|
||||
0.0, // 21
|
||||
8.25, // 22 - Colt 45
|
||||
13.2, // 23 - Silenced
|
||||
46.2, // 24 - Deagle
|
||||
49.5, // 25 - Shotgun
|
||||
49.5, // 26 - Sawed-off
|
||||
39.6, // 27 - Spas
|
||||
6.6, // 28 - UZI
|
||||
8.3, // 29 - MP5
|
||||
9.9, // 30 - AK47
|
||||
9.9, // 31 - M4
|
||||
6.6, // 32 - Tec9
|
||||
24.8, // 33 - Cuntgun
|
||||
61.9, // 34 - Sniper
|
||||
82.5, // 35 - Rocket launcher
|
||||
82.5, // 36 - Heatseeker
|
||||
0.1, // 37 - Flamethrower
|
||||
46.2, // 38 - Minigun
|
||||
0.0, // 39 - Satchel (apparently 20, not synced anyway)
|
||||
0.0, // 40 - Detonator
|
||||
0.4, // 41 - Spraycan
|
||||
0.4, // 42 - Fire extinguisher
|
||||
0.0, // 43 - Camera
|
||||
0.0, // 44 - Night vision
|
||||
0.0, // 45 - Infrared
|
||||
6.6 // 46 - Parachute
|
||||
},
|
||||
|
||||
Float: s_WeaponRange[ ] = {
|
||||
0.0, // 0 - Fist
|
||||
0.0, // 1 - Brass knuckles
|
||||
0.0, // 2 - Golf club
|
||||
0.0, // 3 - Nitestick
|
||||
0.0, // 4 - Knife
|
||||
0.0, // 5 - Bat
|
||||
0.0, // 6 - Shovel
|
||||
0.0, // 7 - Pool cue
|
||||
0.0, // 8 - Katana
|
||||
0.0, // 9 - Chainsaw
|
||||
0.0, // 10 - Dildo
|
||||
0.0, // 11 - Dildo 2
|
||||
0.0, // 12 - Vibrator
|
||||
0.0, // 13 - Vibrator 2
|
||||
0.0, // 14 - Flowers
|
||||
0.0, // 15 - Cane
|
||||
0.0, // 16 - Grenade
|
||||
0.0, // 17 - Teargas
|
||||
0.0, // 18 - Molotov
|
||||
90.0, // 19 - Vehicle M4 (custom)
|
||||
75.0, // 20 - Vehicle minigun (custom)
|
||||
0.0, // 21
|
||||
35.0, // 22 - Colt 45
|
||||
35.0, // 23 - Silenced
|
||||
35.0, // 24 - Deagle
|
||||
40.0, // 25 - Shotgun
|
||||
35.0, // 26 - Sawed-off
|
||||
40.0, // 27 - Spas
|
||||
35.0, // 28 - UZI
|
||||
45.0, // 29 - MP5
|
||||
70.0, // 30 - AK47
|
||||
90.0, // 31 - M4
|
||||
35.0, // 32 - Tec9
|
||||
100.0, // 33 - Cuntgun
|
||||
320.0, // 34 - Sniper
|
||||
0.0, // 35 - Rocket launcher
|
||||
0.0, // 36 - Heatseeker
|
||||
0.0, // 37 - Flamethrower
|
||||
75.0, // 38 - Minigun
|
||||
0.0, // 39 - Satchel (apparently 20, not synced anyway)
|
||||
0.0, // 40 - Detonator
|
||||
0.0, // 41 - Spraycan
|
||||
0.0, // 42 - Fire extinguisher
|
||||
0.0, // 43 - Camera
|
||||
0.0, // 44 - Night vision
|
||||
0.0, // 45 - Infrared
|
||||
0.0 // 46 - Parachute
|
||||
}
|
||||
;
|
||||
|
||||
static stock
|
||||
Float: p_PlayerHealth [ MAX_PLAYERS ] [ E_PLAYER_HITPOINTS ],
|
||||
Float: p_PlayerArmour [ MAX_PLAYERS ] [ E_PLAYER_HITPOINTS ],
|
||||
Float: p_LastDamageIssued [ MAX_PLAYERS ],
|
||||
p_LastTookDamage [ MAX_PLAYERS ],
|
||||
p_LastDamageIssuer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_LastWeaponIssuer [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerDamagePlayer ( playerid, damagedid, Float: amount, weaponid, bodypart );
|
||||
forward OnPlayerTakePlayerDamage ( playerid, issuerid, &Float: amount, weaponid, bodypart );
|
||||
forward OnPlayerDeathEx ( playerid, killerid, reason, Float: damage, bodypart );
|
||||
|
||||
// Function (AC_UpdateKillerData)
|
||||
|
||||
stock AC_UpdateDamageInformation( playerid, attackerid, weaponid )
|
||||
{
|
||||
p_LastTookDamage[ playerid ] = GetTickCount( );
|
||||
p_LastDamageIssuer[ playerid ] = attackerid;
|
||||
p_LastWeaponIssuer[ playerid ] = weaponid;
|
||||
}
|
||||
|
||||
// Function (AC_GetPlayerHealth)
|
||||
|
||||
stock Float: AC_GetPlayerHealth( playerid )
|
||||
return p_PlayerHealth[ playerid ] [ E_POINTS ];
|
||||
|
||||
// Function (AddPlayerHealth)
|
||||
|
||||
stock AC_AddPlayerHealth( playerid, Float:amount )
|
||||
{
|
||||
p_PlayerHealth[ playerid ] [ E_POINTS ] += amount;
|
||||
p_PlayerHealth[ playerid ] [ E_SYNCED ] = false;
|
||||
|
||||
return SetPlayerHealth( playerid, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
}
|
||||
|
||||
// Function Hook (SetPlayerHealth)
|
||||
|
||||
stock AC_SetPlayerHealth( playerid, Float:amount )
|
||||
{
|
||||
p_PlayerHealth[ playerid ] [ E_POINTS ] = amount;
|
||||
p_PlayerHealth[ playerid ] [ E_SYNCED ] = false;
|
||||
|
||||
if( amount <= 0.0 && AC_IsPlayerSpawned( playerid ) )
|
||||
{
|
||||
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) {
|
||||
p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 47;
|
||||
}
|
||||
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 );
|
||||
}
|
||||
return SetPlayerHealth( playerid, amount );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerHealth
|
||||
#undef SetPlayerHealth
|
||||
#else
|
||||
#define _ALS_SetPlayerHealth
|
||||
#endif
|
||||
#define SetPlayerHealth AC_SetPlayerHealth
|
||||
|
||||
// Function Hook (SetPlayerArmour)
|
||||
|
||||
stock AC_SetPlayerArmour( playerid, Float:amount )
|
||||
{
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = amount;
|
||||
p_PlayerArmour[ playerid ] [ E_SYNCED ] = false;
|
||||
return SetPlayerArmour( playerid, amount );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerArmour
|
||||
#undef SetPlayerArmour
|
||||
#else
|
||||
#define _ALS_SetPlayerArmour
|
||||
#endif
|
||||
#define SetPlayerArmour AC_SetPlayerArmour
|
||||
|
||||
// Function Hook (SetPlayerTeam)
|
||||
|
||||
stock AC_SetPlayerTeam( playerid, teamid )
|
||||
{
|
||||
if( teamid != AC_DEFAULT_TEAM ) {
|
||||
printf("[ACWarning] You cannot use SetPlayerTeam as you have hitpoint hack detection enabled (teamid %d, default %d).", teamid, AC_DEFAULT_TEAM );
|
||||
}
|
||||
return SetPlayerTeam( playerid, AC_DEFAULT_TEAM );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerTeam
|
||||
#undef SetPlayerTeam
|
||||
#else
|
||||
#define _ALS_SetPlayerArmour
|
||||
#endif
|
||||
#define SetPlayerTeam AC_SetPlayerTeam
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerConnect( playerid )
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS )
|
||||
{
|
||||
// Remove Vending Machines
|
||||
RemoveBuildingForPlayer( playerid, 1302, 0.0, 0.0, 0.0, 6000.0 );
|
||||
RemoveBuildingForPlayer( playerid, 1209, 0.0, 0.0, 0.0, 6000.0 );
|
||||
RemoveBuildingForPlayer( playerid, 955, 0.0, 0.0, 0.0, 6000.00 );
|
||||
RemoveBuildingForPlayer( playerid, 956, 0.0, 0.0, 0.0, 6000.00 );
|
||||
RemoveBuildingForPlayer( playerid, 1775, 0.0, 0.0, 0.0, 6000.0 );
|
||||
RemoveBuildingForPlayer( playerid, 1776, 0.0, 0.0, 0.0, 6000.0 );
|
||||
RemoveBuildingForPlayer( playerid, 1977, 0.0, 0.0, 0.0, 6000.0 );
|
||||
|
||||
// Reset variables
|
||||
p_PlayerHealth[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
p_PlayerArmour[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid )
|
||||
{
|
||||
// Health/Armour Hack
|
||||
p_PlayerHealth[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
p_PlayerHealth[ playerid ] [ E_POINTS ] = 100.0;
|
||||
|
||||
p_PlayerArmour[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = 0.0;
|
||||
|
||||
SetPlayerTeam( playerid, AC_DEFAULT_TEAM ); // Set everyone the same team
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid, bodypart )
|
||||
{
|
||||
new
|
||||
is_npc = IsPlayerNPC( issuerid );
|
||||
|
||||
p_LastTookDamage[ playerid ] = GetTickCount( );
|
||||
p_LastDamageIssuer[ playerid ] = issuerid;
|
||||
p_LastWeaponIssuer[ playerid ] = weaponid;
|
||||
p_LastDamageIssued[ playerid ] = amount;
|
||||
|
||||
//if( !( issuerid != INVALID_PLAYER_ID && IsPlayerInAnyVehicle( issuerid ) && GetPlayerVehicleSeat( issuerid ) == 0 && ( weaponid == WEAPON_M4 || weaponid == WEAPON_MINIGUN ) ) )
|
||||
// return 0;
|
||||
|
||||
// Allow hunter damage/sparrow
|
||||
if( !( issuerid != INVALID_PLAYER_ID && IsPlayerInAnyVehicle( issuerid ) && GetPlayerVehicleSeat( issuerid ) == 0 && ( weaponid == WEAPON_M4 || weaponid == WEAPON_MINIGUN ) ) && !is_npc )
|
||||
{
|
||||
// Ignore unreliable and invalid damage
|
||||
if( weaponid < 0 || weaponid >= sizeof( s_ValidDamageGiven ) || s_ValidDamageGiven[ weaponid ] )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
}
|
||||
|
||||
if( AC_IsPlayerSpawned( playerid ) )
|
||||
{
|
||||
if( issuerid != INVALID_PLAYER_ID && ! is_npc )
|
||||
{
|
||||
if( OnPlayerTakePlayerDamage( playerid, issuerid, amount, weaponid, bodypart ) )
|
||||
{
|
||||
new Float: tmp, Float: tmp_amount = amount;
|
||||
|
||||
if( p_PlayerArmour[ playerid ] [ E_POINTS ] )
|
||||
{
|
||||
if( ( tmp = p_PlayerArmour[ playerid ] [ E_POINTS ] - tmp_amount ) < 0.0 ) {
|
||||
tmp_amount -= p_PlayerArmour[ playerid ] [ E_POINTS ];
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = 0.0;
|
||||
} else {
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = tmp;
|
||||
tmp_amount = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
if( ( p_PlayerHealth[ playerid ] [ E_POINTS ] -= tmp_amount ) < 0.0 ) {
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, issuerid, weaponid, amount, bodypart );
|
||||
}
|
||||
|
||||
SetPlayerArmour( playerid, p_PlayerArmour[ playerid ] [ E_POINTS ] );
|
||||
SetPlayerHealth( playerid, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
|
||||
CallRemoteFunction( "OnPlayerDamagePlayer", "ddfdd", issuerid, playerid, amount, weaponid, bodypart );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new Float: tmp, Float: tmp_amount = amount;
|
||||
|
||||
if( !( weaponid == 53 || weaponid == 54 || weaponid == 50 ) && p_PlayerArmour[ playerid ] [ E_POINTS ] )
|
||||
{
|
||||
if( ( tmp = p_PlayerArmour[ playerid ] [ E_POINTS ] - tmp_amount ) < 0.0 ) {
|
||||
tmp_amount -= p_PlayerArmour[ playerid ] [ E_POINTS ];
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = 0.0;
|
||||
} else {
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = tmp;
|
||||
tmp_amount = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
// printf("OnPlayerTakeDamage( %d, %d, %f, %d, %d ) %f", playerid, issuerid, amount, weaponid, bodypart, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
if( ( p_PlayerHealth[ playerid ] [ E_POINTS ] -= tmp_amount ) <= ( weaponid == 37 ? 0.99999 : 0.0 ) ) {
|
||||
// find any possible killers prior
|
||||
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) {
|
||||
p_LastDamageIssuer[ playerid ] = issuerid, p_LastWeaponIssuer[ playerid ] = weaponid;
|
||||
}
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
if ( weaponid == 37 || weaponid == 51 ) SetPlayerHealth( playerid, -1 ); // Death bug fix
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], amount, bodypart );
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerGiveDamage( playerid, damagedid, Float: amount, weaponid, bodypart )
|
||||
{
|
||||
// Ignore unreliable and invalid damage
|
||||
if ( weaponid < 0 || weaponid >= sizeof( s_ValidDamageGiven ) || !s_ValidDamageGiven[ weaponid ] )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
if( weaponid < 0 || weaponid >= sizeof( s_ValidMaxDamage ) || amount > s_ValidMaxDamage[ weaponid ] + 2.0 ) // 2.0 safety margin
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
if( damagedid == INVALID_PLAYER_ID )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
if( IsPlayerInAnyVehicle( playerid ) && GetPlayerVehicleSeat( playerid ) == 0 && ( weaponid == WEAPON_M4 || weaponid == WEAPON_MINIGUN ) )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
if ( !IsPlayerNPC( damagedid ) )
|
||||
{
|
||||
if( ! AC_IsPlayerSpawned( damagedid ) )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
if( ( !IsPlayerStreamedIn( playerid, damagedid ) && ! ( GetTickCount( ) - AC_GetLastUpdateTime( playerid ) >= 2595 ) ) || !IsPlayerStreamedIn( damagedid, playerid ) )
|
||||
return Y_HOOKS_BREAK_RETURN_0;
|
||||
|
||||
//printf("OnPlayerGiveDamage( %d, %d, %f, %d, %d )", playerid, damagedid, amount, weaponid, bodypart );
|
||||
//p_LastTookDamage[ damagedid ] = GetTickCount( );
|
||||
//p_LastDamageIssuer[ damagedid ] = playerid;
|
||||
//p_LastWeaponIssuer[ damagedid ] = weaponid;
|
||||
//p_LastDamageIssued[ damagedid ] = amount;
|
||||
|
||||
if( OnPlayerTakePlayerDamage( damagedid, playerid, amount, weaponid, bodypart ) )
|
||||
{
|
||||
new
|
||||
Float: tmp,
|
||||
Float: distance = ac_GetDistanceBetweenPlayers( playerid, damagedid ), // Calc distance between players
|
||||
Float: tmp_amount = amount // this amount is extremely unreliable
|
||||
;
|
||||
//printf("Proposed dmg %f kinda %f (min: %f, max: %f, rng: %f)", amount, tmp_amount, GetWeaponMinRange( weaponid ), GetWeaponMaxRange( weaponid ), distance );
|
||||
|
||||
if( distance > s_WeaponRange[ weaponid ] + 2.0 )
|
||||
return Y_HOOKS_BREAK_RETURN_0; //printf(" INVALID RANGE %f (MAX %f)", distance, GetWeaponMaxRange( weaponid ) ), 0;
|
||||
|
||||
if( p_PlayerArmour[ damagedid ] [ E_POINTS ] )
|
||||
{
|
||||
if( ( tmp = p_PlayerArmour[ damagedid ] [ E_POINTS ] - tmp_amount ) < 0.0 ) {
|
||||
tmp_amount -= p_PlayerArmour[ damagedid ] [ E_POINTS ];
|
||||
p_PlayerArmour[ damagedid ] [ E_POINTS ] = 0.0;
|
||||
} else {
|
||||
p_PlayerArmour[ damagedid ] [ E_POINTS ] = tmp;
|
||||
tmp_amount = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
if( ( p_PlayerHealth[ damagedid ] [ E_POINTS ] -= tmp_amount ) < 0.0 ) {
|
||||
AC_SetPlayerSpawned( damagedid, false );
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", damagedid, playerid, weaponid, amount, bodypart );
|
||||
}
|
||||
|
||||
SetPlayerArmour( damagedid, p_PlayerArmour[ damagedid ] [ E_POINTS ] );
|
||||
SetPlayerHealth( damagedid, p_PlayerHealth[ damagedid ] [ E_POINTS ] );
|
||||
|
||||
CallRemoteFunction( "OnPlayerDamagePlayer", "ddfdd", playerid, damagedid, amount, weaponid, bodypart );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Functions (Player)
|
||||
stock AC_CheckForHealthHacks( playerid, iTicks )
|
||||
{
|
||||
new
|
||||
Float: currentHealth,
|
||||
Float: currentArmour
|
||||
;
|
||||
GetPlayerHealth( playerid, currentHealth );
|
||||
GetPlayerArmour( playerid, currentArmour );
|
||||
|
||||
// Lag Calculations
|
||||
new
|
||||
Float: fHitDamage = p_LastDamageIssued[ playerid ],
|
||||
Float: fArmourDamage,
|
||||
Float: fHealthDamage
|
||||
;
|
||||
|
||||
if( fHitDamage > currentArmour ) {
|
||||
fArmourDamage = currentArmour;
|
||||
fHealthDamage = fHitDamage - currentArmour;
|
||||
}
|
||||
else fArmourDamage = fHitDamage;
|
||||
|
||||
// Begin Health Hack Detection
|
||||
if( iTicks > p_PlayerHealth[ playerid ] [ E_UPDATE_TIME ] )
|
||||
{
|
||||
new currentHealthInt = floatround( currentHealth, floatround_floor );
|
||||
new healthShouldBeInt = floatround( p_PlayerHealth[ playerid ] [ E_POINTS ], floatround_floor );
|
||||
|
||||
if( currentHealthInt == healthShouldBeInt )
|
||||
p_PlayerHealth[ playerid ] [ E_SYNCED ] = true;
|
||||
|
||||
if( !p_PlayerHealth[ playerid ] [ E_SYNCED ] )
|
||||
{
|
||||
if( currentHealthInt > healthShouldBeInt )
|
||||
{
|
||||
switch( p_PlayerHealth[ playerid ] [ E_UPDATE_FAIL ]++ )
|
||||
{
|
||||
case 0 .. 9: SetPlayerHealth( playerid, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
case 10: SendClientMessage( playerid, 0xa9c4e4ff, "You have been kicked as you are desynced from the server. Please relog!" ), KickPlayerTimed( playerid ), printf("[health] Player %d was desynced thus kicked.", playerid);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_PlayerHealth[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
|
||||
if( healthShouldBeInt > currentHealthInt )
|
||||
p_PlayerHealth[ playerid ] [ E_POINTS ] = currentHealth;
|
||||
|
||||
if( currentHealthInt > healthShouldBeInt && currentHealthInt <= 255 && currentHealthInt > 0 )
|
||||
SetPlayerHealth( playerid, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
|
||||
currentHealthInt = floatround( currentHealth, floatround_floor );
|
||||
healthShouldBeInt = floatround( p_PlayerHealth[ playerid ] [ E_POINTS ], floatround_floor );
|
||||
|
||||
new dmgOne = floatround( currentHealthInt - fHealthDamage, floatround_floor );
|
||||
new dmgTwo = floatround( currentHealthInt - fHealthDamage, floatround_ceil );
|
||||
|
||||
if( !( currentHealthInt == healthShouldBeInt || dmgOne == healthShouldBeInt || dmgTwo == healthShouldBeInt ) )
|
||||
{
|
||||
SetPlayerHealth( playerid, p_PlayerHealth[ playerid ] [ E_POINTS ] );
|
||||
//printf("[health][%d] %d seems to health hack (server health: %d and client health: %d, health dmg: %f, armour dmg: %f).", playerid, playerid, healthShouldBeInt, currentHealthInt, fHealthDamage, fArmourDamage );
|
||||
}
|
||||
}
|
||||
p_PlayerHealth[ playerid ] [ E_UPDATE_TIME ] = iTicks + 1000;
|
||||
}
|
||||
|
||||
// Begin Armour Hack Detection
|
||||
if( iTicks > p_PlayerArmour[ playerid ] [ E_UPDATE_TIME ] )
|
||||
{
|
||||
new currentArmourInt = floatround( currentArmour, floatround_floor );
|
||||
new ArmourShouldBeInt = floatround( p_PlayerArmour[ playerid ] [ E_POINTS ], floatround_floor );
|
||||
|
||||
if( currentArmourInt == ArmourShouldBeInt )
|
||||
p_PlayerArmour[ playerid ] [ E_SYNCED ] = true;
|
||||
|
||||
if( !p_PlayerArmour[ playerid ] [ E_SYNCED ] )
|
||||
{
|
||||
if( currentArmourInt > ArmourShouldBeInt )
|
||||
{
|
||||
switch( p_PlayerArmour[ playerid ] [ E_UPDATE_FAIL ]++ )
|
||||
{
|
||||
case 0 .. 9: SetPlayerArmour( playerid, p_PlayerArmour[ playerid ] [ E_POINTS ] );
|
||||
case 10: SendClientMessage( playerid, 0xa9c4e4ff, "You have been kicked as you are desynced from the server. Please relog!" ), KickPlayerTimed( playerid ), printf("[armour] Player %d was desynced thus kicked.", playerid);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_PlayerArmour[ playerid ] [ E_UPDATE_FAIL ] = 0;
|
||||
|
||||
if( ArmourShouldBeInt > currentArmourInt )
|
||||
p_PlayerArmour[ playerid ] [ E_POINTS ] = currentArmour;
|
||||
|
||||
if( currentArmourInt > ArmourShouldBeInt && currentArmourInt <= 255 && currentArmourInt > 0 )
|
||||
SetPlayerArmour( playerid, p_PlayerArmour[ playerid ] [ E_POINTS ] );
|
||||
|
||||
currentArmourInt = floatround( currentArmour, floatround_floor );
|
||||
ArmourShouldBeInt = floatround( p_PlayerArmour[ playerid ] [ E_POINTS ], floatround_floor );
|
||||
|
||||
new dmgOne = floatround( currentArmourInt - fArmourDamage, floatround_floor );
|
||||
new dmgTwo = floatround( currentArmourInt - fArmourDamage, floatround_ceil );
|
||||
|
||||
if( !( currentArmourInt == ArmourShouldBeInt || dmgOne == ArmourShouldBeInt || dmgTwo == ArmourShouldBeInt ) )
|
||||
{
|
||||
SetPlayerArmour( playerid, p_PlayerArmour[ playerid ] [ E_POINTS ] );
|
||||
//printf("[armour] %d seems to armour hack (server armour: %d and client armour: %d, health dmg: %f, armour dmg: %f).", playerid, ArmourShouldBeInt, currentArmourInt, fHealthDamage, fArmourDamage );
|
||||
}
|
||||
}
|
||||
p_PlayerArmour[ playerid ] [ E_UPDATE_TIME ] = iTicks + 1000;
|
||||
}
|
||||
}
|
||||
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
{
|
||||
if ( !IsPlayerNPC( playerid ) )
|
||||
{
|
||||
// Reset spawned variable
|
||||
AC_SetPlayerSpawned( playerid, false );
|
||||
|
||||
// Died in Vehicle
|
||||
if ( GetPlayerVehicleID( playerid ) && AC_IsPlayerSpawned( playerid ) )
|
||||
{
|
||||
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 )
|
||||
p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 51;
|
||||
|
||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock ForcePlayerKill( playerid, killerid, weaponid )
|
||||
{
|
||||
p_LastTookDamage[ playerid ] = GetTickCount( );
|
||||
p_LastDamageIssuer[ playerid ] = killerid;
|
||||
p_LastWeaponIssuer[ playerid ] = weaponid;
|
||||
p_LastDamageIssued[ playerid ] = 100.0;
|
||||
|
||||
SetPlayerHealth( playerid, -1 );
|
||||
}
|
65
gamemodes/irresistible/anticheat/proaim.pwn
Normal file
65
gamemodes/irresistible/anticheat/proaim.pwn
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: anticheat/proaim.pwn
|
||||
* Purpose: silent aimbot detection
|
||||
*/
|
||||
|
||||
/* ** Macros ** */
|
||||
#define ac_GetDistanceBetweenPoints(%0,%1,%2,%3,%4,%6) \
|
||||
(VectorSize(%0-%3,%1-%4,%2-%6))
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
p_silentAimbotLastCalled [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Functions ** */
|
||||
stock AC_CheckForSilentAimbot( playerid, hittype, hitid )
|
||||
{
|
||||
static
|
||||
Float: fVictimX, Float: fVictimY, Float: fVictimZ,
|
||||
Float: fCameraX, Float: fCameraY, Float: fCameraZ,
|
||||
Float: fVectorX, Float: fVectorY, Float: fVectorZ,
|
||||
Float: fHitPosX, Float: fHitPosY, Float: fHitPosZ
|
||||
;
|
||||
|
||||
if( hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected( hitid ) && ! IsPlayerNPC( hitid ) )
|
||||
{
|
||||
GetPlayerPos( hitid, fVictimX, fVictimY, fVictimZ );
|
||||
GetPlayerCameraPos( playerid, fCameraX, fCameraY, fCameraZ );
|
||||
GetPlayerCameraFrontVector( playerid, fVectorX, fVectorY, fVectorZ );
|
||||
GetPlayerLastShotVectors( playerid, fHitPosX, fHitPosY, fHitPosZ, fHitPosX, fHitPosY, fHitPosZ );
|
||||
|
||||
//printf("%f = %f, %f = %f, %f = %f\n", fX + fVictimX, fHitPosX, fY + fVictimY, fHitPosY, fZ + fVictimZ, fHitPosZ );
|
||||
|
||||
fCameraX += 4.0 * fVectorX;
|
||||
fCameraY += 4.0 * fVectorY;
|
||||
fCameraZ += 4.0 * fVectorZ;
|
||||
|
||||
new Float: fCamera = ac_GetDistanceBetweenPoints( fHitPosX, fHitPosY, fHitPosZ, fCameraX, fCameraY, fCameraZ );
|
||||
new Float: fRadius = ac_GetDistanceBetweenPoints( fHitPosX, fHitPosY, fHitPosZ, fVictimX, fVictimY, fVictimZ );
|
||||
new Float: fPlayerDis = GetPlayerDistanceFromPoint( playerid, fVictimX, fVictimY, fVictimZ );
|
||||
|
||||
if( GetPlayerSurfingVehicleID( playerid ) == INVALID_VEHICLE_ID && GetPlayerSurfingVehicleID( hitid ) == INVALID_VEHICLE_ID && !IsPlayerInAnyVehicle( hitid ) )
|
||||
{
|
||||
new
|
||||
Float: fHitPacketLoss = NetStats_PacketLossPercent( hitid ),
|
||||
Float: fOwnPacketLoss = NetStats_PacketLossPercent( playerid ),
|
||||
iLastUpdateInterval = GetTickCount( ) - AC_GetLastUpdateTime( hitid ) // AFK Check
|
||||
;
|
||||
|
||||
if( fCamera < 1.20 && fPlayerDis > 4.0 && fPlayerDis < 300.0 && fRadius > 4.0 && fOwnPacketLoss < 0.8 && fHitPacketLoss < 0.8 && iLastUpdateInterval < 3000 ) {
|
||||
new
|
||||
iTicks = GetTickCount( );
|
||||
|
||||
if( iTicks - p_silentAimbotLastCalled[ playerid ] <= 5000 ) {
|
||||
printf("[PRO-AIM] Detected %d - last %dms", playerid, iTicks - p_silentAimbotLastCalled[ playerid ]);
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_PROAIM, 0 );
|
||||
}
|
||||
|
||||
p_silentAimbotLastCalled[ playerid ] = iTicks;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
gamemodes/irresistible/anticheat/remotejack.pwn
Normal file
57
gamemodes/irresistible/anticheat/remotejack.pwn
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by JernejL, Lorenc Pekaj
|
||||
* Module: anticheat/hitpoints.inc
|
||||
* Purpose: detects abnormal vehicle entering
|
||||
*/
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_PLAYER_REMOTEJACK
|
||||
{
|
||||
Float: E_LAST_X, Float: E_LAST_Y, Float: E_LAST_Z,
|
||||
E_LAST_VEH
|
||||
};
|
||||
|
||||
static stock
|
||||
p_remoteJackData [ MAX_PLAYERS ] [ E_PLAYER_REMOTEJACK ]
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
stock AC_RJ_PutPlayerInVehicle( playerid, vehicleid, seatid )
|
||||
{
|
||||
p_remoteJackData[ playerid ] [ E_LAST_VEH ] = vehicleid;
|
||||
return PutPlayerInVehicle( playerid, vehicleid, seatid );
|
||||
}
|
||||
|
||||
#if defined _ALS_PutPlayerInVehicle
|
||||
#undef PutPlayerInVehicle
|
||||
#else
|
||||
#define _ALS_PutPlayerInVehicle
|
||||
#endif
|
||||
#define PutPlayerInVehicle AC_RJ_PutPlayerInVehicle
|
||||
|
||||
/* ** Functions ** */
|
||||
stock AC_CheckPlayerRemoteJacking( playerid )
|
||||
{
|
||||
new iVehicle = GetPlayerVehicleID( playerid );
|
||||
|
||||
if( !IsPlayerInAnyVehicle( playerid ) )
|
||||
GetPlayerPos( playerid, p_remoteJackData[ playerid ] [ E_LAST_X ], p_remoteJackData[ playerid ] [ E_LAST_Y ], p_remoteJackData[ playerid ] [ E_LAST_Z ] );
|
||||
|
||||
if( ( iVehicle != p_remoteJackData[ playerid ] [ E_LAST_VEH ] ) && ( iVehicle != 0 ) && ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) )
|
||||
{
|
||||
new
|
||||
Float: fDistance = GetVehicleDistanceFromPoint( iVehicle, p_remoteJackData[ playerid ] [ E_LAST_X ], p_remoteJackData[ playerid ] [ E_LAST_Y ], p_remoteJackData[ playerid ] [ E_LAST_Z ] ),
|
||||
Float: fOffset = 10.0
|
||||
;
|
||||
|
||||
if( ( GetVehicleModel( iVehicle ) == 577 ) || ( GetVehicleModel( iVehicle ) == 592 )) fOffset = 25.0; // Andromanda | AT-400
|
||||
|
||||
if( fDistance > fOffset )
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_REMOTE_JACK, 0 );
|
||||
|
||||
GetPlayerPos( playerid, p_remoteJackData[ playerid ] [ E_LAST_X ], p_remoteJackData[ playerid ] [ E_LAST_Y ], p_remoteJackData[ playerid ] [ E_LAST_Z ] );
|
||||
p_remoteJackData[ playerid ] [ E_LAST_VEH ] = iVehicle;
|
||||
}
|
||||
return 1;
|
||||
}
|
302
gamemodes/irresistible/anticheat/weapon.pwn
Normal file
302
gamemodes/irresistible/anticheat/weapon.pwn
Normal file
@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: anticheat/weapon.inc
|
||||
* Purpose: server sided weapon system
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#if !defined MAX_CLASSES
|
||||
#define MAX_CLASSES ( 300 )
|
||||
#endif
|
||||
|
||||
#if !defined AC_MAX_WEAPONS
|
||||
#define AC_MAX_WEAPONS ( 55 )
|
||||
#endif
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_CLASS_DATA {
|
||||
E_WEAPONS[ 3 ]
|
||||
};
|
||||
|
||||
static stock
|
||||
mAvailableSpawns [ MAX_CLASSES ] [ E_CLASS_DATA ],
|
||||
bool: p_PlayerHasWeapon [ MAX_PLAYERS ] [ AC_MAX_WEAPONS char ],
|
||||
p_SelectedClassID [ MAX_PLAYERS ],
|
||||
p_PlayerWeaponUpdateTime [ MAX_PLAYERS ],
|
||||
p_CurrentArmedWeapon [ MAX_PLAYERS char ],
|
||||
Iterator: classes < MAX_CLASSES >
|
||||
;
|
||||
|
||||
/* ** Callback Hooks ** */
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
for ( new i = 0; i < AC_MAX_WEAPONS; i++ ) {
|
||||
p_PlayerHasWeapon[ playerid ] { i } = false;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid )
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS )
|
||||
{
|
||||
for ( new i = 0; i < 3; i++ )
|
||||
{
|
||||
new
|
||||
weaponid = mAvailableSpawns[ p_SelectedClassID[ playerid ] ] [ E_WEAPONS ] [ i ];
|
||||
|
||||
if( weaponid != -1 && weaponid < AC_MAX_WEAPONS ) {
|
||||
p_PlayerHasWeapon[ playerid ] { weaponid } = true;
|
||||
}
|
||||
}
|
||||
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerStateChange( playerid, newstate, oldstate ) // Weapon Hacks - credits to wups
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS )
|
||||
{
|
||||
if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER )
|
||||
{
|
||||
switch ( GetVehicleModel( GetPlayerVehicleID( playerid ) ) )
|
||||
{
|
||||
case 457:
|
||||
p_PlayerHasWeapon[ playerid ] { 2 } = true;
|
||||
|
||||
case 592, 577, 511, 512, 520, 593, 553, 476, 519, 460, 513, 548, 425, 417, 487, 488, 497, 563, 447, 469, 539:
|
||||
p_PlayerHasWeapon[ playerid ] { 46 } = true;
|
||||
|
||||
case 596, 597, 598, 599:
|
||||
p_PlayerHasWeapon[ playerid ] { 25 } = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerExitVehicle( playerid, vehicleid )
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS )
|
||||
{
|
||||
switch( GetVehicleModel( vehicleid ) ) // Weapon Hacks - credits to wups
|
||||
{
|
||||
case 457:
|
||||
p_PlayerHasWeapon[ playerid ] { 2 } = true;
|
||||
|
||||
case 592, 577, 511, 512, 520, 593, 553, 476, 519, 460, 513, 548, 425, 417, 487, 488, 497, 563, 447, 469, 539:
|
||||
p_PlayerHasWeapon[ playerid ] { 46 } = true;
|
||||
|
||||
case 596, 597, 598, 599:
|
||||
p_PlayerHasWeapon[ playerid ] { 25 } = true;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
{
|
||||
if( !IsPlayerNPC( playerid ) )
|
||||
{
|
||||
if ( ( newkeys & KEY_FIRE ) && AC_IsPlayerSpawned( playerid ) ) {
|
||||
new iWeapon = GetPlayerWeapon( playerid );
|
||||
new iTickCount = GetTickCount( );
|
||||
|
||||
if ( iTickCount > p_PlayerWeaponUpdateTime[ playerid ] && 0 <= iWeapon < AC_MAX_WEAPONS )
|
||||
{
|
||||
if( !p_PlayerHasWeapon[ playerid ] { iWeapon } && ( iWeapon != 0 && iWeapon != 40 ) && ! ( IsPlayerInAnyVehicle( playerid ) && p_CurrentArmedWeapon{ playerid } != iWeapon ) ) {
|
||||
CallLocalFunction( "OnPlayerCheatDetected", "ddd", playerid, CHEAT_TYPE_WEAPON, iWeapon );
|
||||
// printf("[weapon] %d seems to weapon hack (weapon id %d).", playerid, iWeapon );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerPickUpDynPickup( playerid, pickupid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS && GetGVarType( "ac_WeaponPickup", pickupid ) != GLOBAL_VARTYPE_NONE ) {
|
||||
p_PlayerHasWeapon[ playerid ] { GetGVarInt( "ac_WeaponPickup", pickupid ) } = true;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerRequestClass( playerid, classid ) {
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
p_SelectedClassID[ playerid ] = classid;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Function Hooks ** */
|
||||
// Function Hook (GivePlayerWeapon)
|
||||
|
||||
stock AC_GivePlayerWeapon( playerid, weaponid, ammo )
|
||||
{
|
||||
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
|
||||
|
||||
if( 0 <= weaponid < AC_MAX_WEAPONS ) {
|
||||
p_PlayerHasWeapon[ playerid ] { weaponid } = true;
|
||||
p_CurrentArmedWeapon{ playerid } = weaponid;
|
||||
}
|
||||
return GivePlayerWeapon( playerid, weaponid, ammo );
|
||||
}
|
||||
|
||||
#if defined _ALS_GivePlayerWeapon
|
||||
#undef GivePlayerWeapon
|
||||
#else
|
||||
#define _ALS_GivePlayerWeapon
|
||||
#endif
|
||||
#define GivePlayerWeapon AC_GivePlayerWeapon
|
||||
|
||||
// Function Hook (SetPlayerArmedWeapon)
|
||||
|
||||
stock AC_SetPlayerArmedWeapon( playerid, weaponid )
|
||||
{
|
||||
if ( 0 <= weaponid <= AC_MAX_WEAPONS && p_CurrentArmedWeapon{ playerid } != weaponid ) {
|
||||
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
|
||||
p_CurrentArmedWeapon{ playerid } = weaponid;
|
||||
}
|
||||
return SetPlayerArmedWeapon( playerid, weaponid );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerArmedWeapon
|
||||
#undef SetPlayerArmedWeapon
|
||||
#else
|
||||
#define _ALS_SetPlayerArmedWeapon
|
||||
#endif
|
||||
#define SetPlayerArmedWeapon AC_SetPlayerArmedWeapon
|
||||
|
||||
// Function Hook (ResetPlayerWeapons)
|
||||
|
||||
stock AC_ResetPlayerWeapons( playerid )
|
||||
{
|
||||
p_PlayerWeaponUpdateTime[ playerid ] = GetTickCount( ) + 2000;
|
||||
|
||||
for ( new i = 0; i < AC_MAX_WEAPONS; i++ )
|
||||
p_PlayerHasWeapon[ playerid ] { i } = false;
|
||||
|
||||
return ResetPlayerWeapons( playerid );
|
||||
}
|
||||
|
||||
#if defined _ALS_ResetPlayerWeapons
|
||||
#undef ResetPlayerWeapons
|
||||
#else
|
||||
#define _ALS_ResetPlayerWeapons
|
||||
#endif
|
||||
#define ResetPlayerWeapons AC_ResetPlayerWeapons
|
||||
|
||||
// Function Hook (SetSpawnInfo)
|
||||
|
||||
stock AC_SetSpawnInfo( playerid, team, skin, Float: x, Float: y, Float: z, Float: Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo )
|
||||
{
|
||||
if ( weapon1 != -1 && weapon1 < AC_MAX_WEAPONS ) p_PlayerHasWeapon[ playerid ] { weapon1 } = true;
|
||||
if ( weapon2 != -1 && weapon2 < AC_MAX_WEAPONS ) p_PlayerHasWeapon[ playerid ] { weapon2 } = true;
|
||||
if ( weapon3 != -1 && weapon3 < AC_MAX_WEAPONS ) p_PlayerHasWeapon[ playerid ] { weapon3 } = true;
|
||||
|
||||
return SetSpawnInfo( playerid, team, skin, x, y, z, Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetSpawnInfo
|
||||
#undef SetSpawnInfo
|
||||
#else
|
||||
#define _ALS_SetSpawnInfo
|
||||
#endif
|
||||
#define SetSpawnInfo AC_SetSpawnInfo
|
||||
|
||||
// Function Hook (AddPlayerClass)
|
||||
|
||||
stock AC_AddPlayerClass( skin, Float: x, Float: y, Float: z, Float: Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo )
|
||||
{
|
||||
new
|
||||
classid = Iter_Free(classes);
|
||||
|
||||
if( classid != -1 )
|
||||
{
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 0 ] = weapon1;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 0 ] = static_cast<int>(params[7]);
|
||||
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 1 ] = weapon2;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 1 ] = static_cast<int>(params[9]);
|
||||
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 2 ] = weapon3;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 2 ] = static_cast<int>(params[11]);
|
||||
|
||||
Iter_Add(classes, classid);
|
||||
}
|
||||
return AddPlayerClass( skin, x, y, z, Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo );
|
||||
}
|
||||
|
||||
#if defined _ALS_AddPlayerClass
|
||||
#undef AddPlayerClass
|
||||
#else
|
||||
#define _ALS_AddPlayerClass
|
||||
#endif
|
||||
#define AddPlayerClass AC_AddPlayerClass
|
||||
|
||||
// Function Hook (AddPlayerClass)
|
||||
|
||||
stock AC_AddPlayerClassEx( teamid, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo )
|
||||
{
|
||||
new
|
||||
classid = Iter_Free(classes);
|
||||
|
||||
if( classid != -1 )
|
||||
{
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 0 ] = weapon1;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 0 ] = static_cast<int>(params[7]);
|
||||
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 1 ] = weapon2;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 1 ] = static_cast<int>(params[9]);
|
||||
|
||||
mAvailableSpawns[ classid ] [ E_WEAPONS ] [ 2 ] = weapon3;
|
||||
//mAvailableSpawns[ classid ] [ E_WEAPONS_AMMO ] [ 2 ] = static_cast<int>(params[11]);
|
||||
|
||||
Iter_Add(classes, classid);
|
||||
}
|
||||
return AddPlayerClassEx( teamid, skin, x, y, z, Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo )
|
||||
}
|
||||
|
||||
#if defined _ALS_AddPlayerClassEx
|
||||
#undef AddPlayerClassEx
|
||||
#else
|
||||
#define _ALS_AddPlayerClassEx
|
||||
#endif
|
||||
#define AddPlayerClassEx AC_AddPlayerClassEx
|
||||
|
||||
// Function Hook (CreateDynamicPickup)
|
||||
|
||||
stock AC_CreateDynamicPickup( modelid, type, Float: x, Float: y, Float: z, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 100.0 )
|
||||
{
|
||||
new
|
||||
id = CreateDynamicPickup( modelid, type, x, y, z, worldid, interiorid, playerid, streamdistance );
|
||||
|
||||
if( type == 2 || type == 3 || type == 15 || type == 22 )
|
||||
{
|
||||
for( new i = 0; i < AC_MAX_WEAPONS; i ++ )
|
||||
if( GetWeaponModel( i ) == modelid )
|
||||
SetGVarInt( "ac_WeaponPickup", i, id );
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
#if defined _ALS_CreateDynamicPickup
|
||||
#undef CreateDynamicPickup
|
||||
#else
|
||||
#define _ALS_CreateDynamicPickup
|
||||
#endif
|
||||
#define CreateDynamicPickup AC_CreateDynamicPickup
|
369
gamemodes/irresistible/attachments.pwn
Normal file
369
gamemodes/irresistible/attachments.pwn
Normal file
@ -0,0 +1,369 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Gammix
|
||||
* Module: attachments.inc
|
||||
* Purpose:
|
||||
* - This include fixes the attachments bug, which is expierenced while zooming with snipers, camera, RPGs..
|
||||
* - The attached object info now can be retrieved from GetPlayerAttachedObject
|
||||
* - This include also restores player attachments on Spawn, so they will remain!
|
||||
* - Disconnect fix; Destroys the attachments on Disconnect.
|
||||
*/
|
||||
|
||||
/* ** Defines ** */
|
||||
#define att_modelid (0)
|
||||
#define att_bone (1)
|
||||
#define att_offset_x (2)
|
||||
#define att_offset_y (3)
|
||||
#define att_offset_z (4)
|
||||
#define att_rot_x (5)
|
||||
#define att_rot_y (6)
|
||||
#define att_rot_z (7)
|
||||
#define att_scale_x (8)
|
||||
#define att_scale_y (9)
|
||||
#define att_scale_z (10)
|
||||
#define att_color_1 (11)
|
||||
#define att_color_2 (12)
|
||||
#define att_used (13)
|
||||
|
||||
/* ** Variables ** */
|
||||
new g_AttachmentData[][45] =
|
||||
{
|
||||
"att_modelid",
|
||||
"att_bone",
|
||||
"att_offset_x",
|
||||
"att_offset_y",
|
||||
"att_offset_z",
|
||||
"att_rot_x",
|
||||
"att_rot_y",
|
||||
"att_rot_z",
|
||||
"att_scale_x",
|
||||
"att_scale_y",
|
||||
"att_scale_z",
|
||||
"att_color_1",
|
||||
"att_color_2",
|
||||
"att_used"
|
||||
};
|
||||
|
||||
/* ** Functions ** */
|
||||
stock static ATT_SetInt(playerid, index, type, val)
|
||||
{
|
||||
new
|
||||
s_String[45]
|
||||
;
|
||||
|
||||
format(s_String, sizeof(s_String), "%i_%s", index, g_AttachmentData[type]);
|
||||
|
||||
return SetPVarInt(playerid, s_String, val);
|
||||
}
|
||||
|
||||
stock static ATT_GetInt(playerid, index, type)
|
||||
{
|
||||
new
|
||||
s_String[45]
|
||||
;
|
||||
|
||||
format(s_String, sizeof(s_String), "%i_%s", index, g_AttachmentData[type]);
|
||||
|
||||
return GetPVarInt(playerid, s_String);
|
||||
}
|
||||
|
||||
stock static ATT_SetFloat(playerid, index, type, Float:val)
|
||||
{
|
||||
new
|
||||
s_String[45]
|
||||
;
|
||||
|
||||
format(s_String, sizeof(s_String), "%i_%s", index, g_AttachmentData[type]);
|
||||
|
||||
return SetPVarFloat(playerid, s_String, val);
|
||||
}
|
||||
|
||||
stock static Float:ATT_GetFloat(playerid, index, type)
|
||||
{
|
||||
new
|
||||
s_String[45]
|
||||
;
|
||||
|
||||
format(s_String, sizeof(s_String), "%i_%s", index, g_AttachmentData[type]);
|
||||
|
||||
return GetPVarFloat(playerid, s_String);
|
||||
}
|
||||
|
||||
/* ** Hooks ** */
|
||||
public OnPlayerSpawn(playerid)
|
||||
{
|
||||
for(new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
|
||||
{
|
||||
if(ATT_GetInt(playerid, i, att_used))
|
||||
{
|
||||
SetPlayerAttachedObject( playerid,
|
||||
i,
|
||||
ATT_GetInt(playerid, i, att_modelid),
|
||||
ATT_GetInt(playerid, i, att_bone),
|
||||
ATT_GetFloat(playerid, i, att_offset_x),
|
||||
ATT_GetFloat(playerid, i, att_offset_y),
|
||||
ATT_GetFloat(playerid, i, att_offset_z),
|
||||
ATT_GetFloat(playerid, i, att_rot_x),
|
||||
ATT_GetFloat(playerid, i, att_rot_y),
|
||||
ATT_GetFloat(playerid, i, att_rot_z),
|
||||
ATT_GetFloat(playerid, i, att_scale_x),
|
||||
ATT_GetFloat(playerid, i, att_scale_y),
|
||||
ATT_GetFloat(playerid, i, att_scale_z),
|
||||
ATT_GetInt(playerid, i, att_color_1),
|
||||
ATT_GetInt(playerid, i, att_color_2)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined ATT_OnPlayerSpawn
|
||||
return ATT_OnPlayerSpawn(playerid);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#if defined _ALS_OnPlayerSpawn
|
||||
#undef OnPlayerSpawn
|
||||
#else
|
||||
#define _ALS_OnPlayerSpawn
|
||||
#endif
|
||||
#define OnPlayerSpawn ATT_OnPlayerSpawn
|
||||
#if defined ATT_OnPlayerSpawn
|
||||
forward ATT_OnPlayerSpawn(playerid);
|
||||
#endif
|
||||
|
||||
public OnPlayerConnect(playerid)
|
||||
{
|
||||
for(new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
|
||||
{
|
||||
ATT_SetInt(playerid, i, att_used, false);
|
||||
}
|
||||
|
||||
#if defined ATT_OnPlayerConnect
|
||||
return ATT_OnPlayerConnect(playerid);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#if defined _ALS_OnPlayerConnect
|
||||
#undef OnPlayerConnect
|
||||
#else
|
||||
#define _ALS_OnPlayerConnect
|
||||
#endif
|
||||
#define OnPlayerConnect ATT_OnPlayerConnect
|
||||
#if defined ATT_OnPlayerConnect
|
||||
forward ATT_OnPlayerConnect(playerid);
|
||||
#endif
|
||||
|
||||
public OnPlayerDisconnect(playerid, reason)
|
||||
{
|
||||
for(new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
|
||||
{
|
||||
ATT_SetInt(playerid, i, att_used, false);
|
||||
|
||||
if(IsPlayerAttachedObjectSlotUsed(playerid, i))
|
||||
{
|
||||
RemovePlayerAttachedObject(playerid, i);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined ATT_OnPlayerDisconnect
|
||||
return ATT_OnPlayerDisconnect(playerid, reason);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#if defined _ALS_OnPlayerDisconnect
|
||||
#undef OnPlayerDisconnect
|
||||
#else
|
||||
#define _ALS_OnPlayerDisconnect
|
||||
#endif
|
||||
#define OnPlayerDisconnect ATT_OnPlayerDisconnect
|
||||
#if defined ATT_OnPlayerDisconnect
|
||||
forward ATT_OnPlayerDisconnect(playerid, reason);
|
||||
#endif
|
||||
|
||||
#if ! defined HOLDING
|
||||
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
|
||||
#endif
|
||||
|
||||
#if ! defined RELEASED
|
||||
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
|
||||
#endif
|
||||
|
||||
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
|
||||
{
|
||||
if ( ! IsPlayerNPC( playerid ) )
|
||||
{
|
||||
if (HOLDING(128))
|
||||
{
|
||||
switch (GetPlayerWeapon(playerid))
|
||||
{
|
||||
case WEAPON_SNIPER, WEAPON_ROCKETLAUNCHER, WEAPON_HEATSEEKER, WEAPON_CAMERA:
|
||||
{
|
||||
for (new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
|
||||
{
|
||||
if (IsPlayerAttachedObjectSlotUsed(playerid, i) &&
|
||||
ATT_GetInt(playerid, i, att_used))
|
||||
{
|
||||
RemovePlayerAttachedObject(playerid, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(RELEASED(128))
|
||||
{
|
||||
for (new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++)
|
||||
{
|
||||
if (! IsPlayerAttachedObjectSlotUsed(playerid, i) &&
|
||||
ATT_GetInt(playerid, i, att_used))
|
||||
{
|
||||
SetPlayerAttachedObject( playerid,
|
||||
i,
|
||||
ATT_GetInt(playerid, i, att_modelid),
|
||||
ATT_GetInt(playerid, i, att_bone),
|
||||
ATT_GetFloat(playerid, i, att_offset_x),
|
||||
ATT_GetFloat(playerid, i, att_offset_y),
|
||||
ATT_GetFloat(playerid, i, att_offset_z),
|
||||
ATT_GetFloat(playerid, i, att_rot_x),
|
||||
ATT_GetFloat(playerid, i, att_rot_y),
|
||||
ATT_GetFloat(playerid, i, att_rot_z),
|
||||
ATT_GetFloat(playerid, i, att_scale_x),
|
||||
ATT_GetFloat(playerid, i, att_scale_y),
|
||||
ATT_GetFloat(playerid, i, att_scale_z),
|
||||
ATT_GetInt(playerid, i, att_color_1),
|
||||
ATT_GetInt(playerid, i, att_color_2)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined ATT_OnPlayerKeyStateChange
|
||||
return ATT_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#if defined _ALS_OnPlayerKeyStateChange
|
||||
#undef OnPlayerKeyStateChange
|
||||
#else
|
||||
#define _ALS_OnPlayerKeyStateChange
|
||||
#endif
|
||||
#define OnPlayerKeyStateChange ATT_OnPlayerKeyStateChange
|
||||
#if defined ATT_OnPlayerKeyStateChange
|
||||
forward ATT_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
|
||||
#endif
|
||||
|
||||
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
|
||||
{
|
||||
ATT_SetInt(playerid, index, att_modelid, modelid);
|
||||
ATT_SetInt(playerid, index, att_bone, boneid);
|
||||
ATT_SetFloat(playerid, index, att_offset_x, fOffsetX);
|
||||
ATT_SetFloat(playerid, index, att_offset_y, fOffsetY);
|
||||
ATT_SetFloat(playerid, index, att_offset_z, fOffsetZ);
|
||||
ATT_SetFloat(playerid, index, att_rot_x, fRotX);
|
||||
ATT_SetFloat(playerid, index, att_rot_y, fRotY);
|
||||
ATT_SetFloat(playerid, index, att_rot_z, fRotZ);
|
||||
ATT_SetFloat(playerid, index, att_scale_x, fScaleX);
|
||||
ATT_SetFloat(playerid, index, att_scale_y, fScaleY);
|
||||
ATT_SetFloat(playerid, index, att_scale_z, fScaleZ);
|
||||
|
||||
#if defined ATT_OnPlayerEditAttachedObject
|
||||
return ATT_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#if defined _ALS_OnPlayerEditAttachedObject
|
||||
#undef OnPlayerEditAttachedObject
|
||||
#else
|
||||
#define _ALS_OnPlayerEditAttachedObject
|
||||
#endif
|
||||
#define OnPlayerEditAttachedObject ATT_OnPlayerEditAttachedObject
|
||||
#if defined ATT_OnPlayerEditAttachedObject
|
||||
forward ATT_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
|
||||
#endif
|
||||
|
||||
stock ATT_SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0)
|
||||
{
|
||||
if(SetPlayerAttachedObject(playerid, index, modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ, materialcolor1, materialcolor2))
|
||||
{
|
||||
ATT_SetInt(playerid, index, att_modelid, modelid);
|
||||
ATT_SetInt(playerid, index, att_bone, bone);
|
||||
ATT_SetFloat(playerid, index, att_offset_x, fOffsetX);
|
||||
ATT_SetFloat(playerid, index, att_offset_y, fOffsetY);
|
||||
ATT_SetFloat(playerid, index, att_offset_z, fOffsetZ);
|
||||
ATT_SetFloat(playerid, index, att_rot_x, fRotX);
|
||||
ATT_SetFloat(playerid, index, att_rot_y, fRotY);
|
||||
ATT_SetFloat(playerid, index, att_rot_z, fRotZ);
|
||||
ATT_SetFloat(playerid, index, att_scale_x, fScaleX);
|
||||
ATT_SetFloat(playerid, index, att_scale_y, fScaleY);
|
||||
ATT_SetFloat(playerid, index, att_scale_z, fScaleZ);
|
||||
ATT_SetInt(playerid, index, att_color_1, materialcolor1);
|
||||
ATT_SetInt(playerid, index, att_color_2, materialcolor2);
|
||||
|
||||
ATT_SetInt(playerid, index, att_used, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#if defined _ALS_SetPlayerAttachedObject
|
||||
#undef SetPlayerAttachedObject
|
||||
#else
|
||||
#define _ALS_SetPlayerAttachedObject
|
||||
#endif
|
||||
#define SetPlayerAttachedObject ATT_SetPlayerAttachedObject
|
||||
|
||||
stock GetPlayerAttachedObject(playerid, index, &modelid, &bone, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fScaleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2)
|
||||
{
|
||||
if(gAttachment[playerid][index][att_used])
|
||||
{
|
||||
modelid = ATT_GetInt(playerid, i, att_modelid);
|
||||
bone = ATT_GetInt(playerid, i, att_bone);
|
||||
fOffsetX = ATT_GetFloat(playerid, i, att_offset_x);
|
||||
fOffsetY = ATT_GetFloat(playerid, i, att_offset_y);
|
||||
fOffsetZ = ATT_GetFloat(playerid, i, att_offset_z);
|
||||
fRotX = ATT_GetFloat(playerid, i, att_rot_x);
|
||||
fRotY = ATT_GetFloat(playerid, i, att_rot_y);
|
||||
fRotZ = ATT_GetFloat(playerid, i, att_rot_z);
|
||||
fScaleX = ATT_GetFloat(playerid, i, att_scale_x);
|
||||
fScaleY = ATT_GetFloat(playerid, i, att_scale_y);
|
||||
fScaleZ = ATT_GetFloat(playerid, i, att_scale_z);
|
||||
materialcolor1 = ATT_GetInt(playerid, i, att_color_1);
|
||||
materialcolor2 = ATT_GetInt(playerid, i, att_color_2);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
stock ATT_RemovePlayerAttachedObject(playerid, index)
|
||||
{
|
||||
if(RemovePlayerAttachedObject(playerid, index))
|
||||
{
|
||||
ATT_SetInt(playerid, index, att_used, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#if defined _ALS_RemovePlayerAttachedObject
|
||||
#undef RemovePlayerAttachedObject
|
||||
#else
|
||||
#define _ALS_RemovePlayerAttachedObject
|
||||
#endif
|
||||
#define RemovePlayerAttachedObject ATT_RemovePlayerAttachedObject
|
||||
|
||||
#undef att_modelid
|
||||
#undef att_bone
|
||||
#undef att_offset_x
|
||||
#undef att_offset_y
|
||||
#undef att_offset_z
|
||||
#undef att_rot_x
|
||||
#undef att_rot_y
|
||||
#undef att_rot_z
|
||||
#undef att_scale_x
|
||||
#undef att_scale_y
|
||||
#undef att_scale_z
|
||||
#undef att_color_1
|
||||
#undef att_color_2
|
||||
#undef att_used
|
17
gamemodes/irresistible/cnr/_cnr.pwn
Normal file
17
gamemodes/irresistible/cnr/_cnr.pwn
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
|
||||
/* ** Variables ** */
|
||||
|
||||
/* ** Hooks ** */
|
||||
|
||||
/* ** Functions ** */
|
19
gamemodes/irresistible/cnr/cities.pwn
Normal file
19
gamemodes/irresistible/cnr/cities.pwn
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cities.inc
|
||||
* Purpose: definitions of cities
|
||||
*/
|
||||
|
||||
/* ** Configuration ** */
|
||||
#define ENABLE_CITY_LV true
|
||||
#define ENABLE_CITY_LS true
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_CITIES 3
|
||||
|
||||
#define CITY_SF 0
|
||||
#define CITY_LV 1
|
||||
#define CITY_LS 2
|
||||
#define CITY_DESERTS 3
|
||||
#define CITY_COUNTRY 4
|
32
gamemodes/irresistible/cnr/classes.pwn
Normal file
32
gamemodes/irresistible/cnr/classes.pwn
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Functions ** */
|
||||
#define GetPlayerClass(%0) (p_Class[%0])
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define CLASS_CIVILIAN ( 0 )
|
||||
#define CLASS_POLICE ( 1 )
|
||||
#define CLASS_FIREMAN ( 2 )
|
||||
#define CLASS_MEDIC ( 3 )
|
||||
|
||||
/* ** Variables ** */
|
||||
stock const CLASS_NAMES [ ] [ ] = { "Civilian", "Police", "FBI", "Army", "CIA", "Paramedic", "Fireman" };
|
||||
stock const CLASS_COLORS [ ] = { 0xC0C0C0FF, 0x3E7EFFFF, 0x0035FFFF, 0x954BFFFF, 0x191970FF, 0x4DFF4DFF, 0xA83434FF };
|
||||
|
||||
stock CLASS_CIVILIAN_RANGE [ 2 ];
|
||||
stock CLASS_POLICE_RANGE [ 2 ];
|
||||
stock CLASS_FBI_RANGE [ 2 ];
|
||||
stock CLASS_CIA_RANGE [ 2 ];
|
||||
stock CLASS_FIRE_RANGE [ 2 ];
|
||||
stock CLASS_MEDIC_RANGE [ 2 ];
|
||||
stock CLASS_ARMY_RANGE;
|
||||
|
||||
new p_Class [ MAX_PLAYERS ];
|
185
gamemodes/irresistible/cnr/dialog_ids.pwn
Normal file
185
gamemodes/irresistible/cnr/dialog_ids.pwn
Normal file
@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: dialog_ids.inc
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_REGISTER 1000
|
||||
#define DIALOG_LOGIN 1001
|
||||
#define DIALOG_JOB 1002
|
||||
#define DIALOG_BOMB_SHOP 1003
|
||||
#define DIALOG_NULL 1004
|
||||
#define DIALOG_BANNED 1005
|
||||
#define DIALOG_BANK_MENU 1006
|
||||
#define DIALOG_BANK_WITHDRAW 1007
|
||||
#define DIALOG_BANK_DEPOSIT 1008
|
||||
#define DIALOG_BANK_INFO 1009
|
||||
#define DIALOG_SHOP_MENU 1010
|
||||
#define DIALOG_HOUSES 1011
|
||||
#define DIALOG_CITY_HALL 1012
|
||||
#define DIALOG_HOSPITAL 1013
|
||||
#define DIALOG_HOUSE_CONFIG 1014
|
||||
#define DIALOG_HOUSE_TITLE 1015
|
||||
#define DIALOG_HOUSE_INTERIORS 1016
|
||||
#define DIALOG_IC_MARKET 1017
|
||||
#define DIALOG_VEHICLE_SPAWN 1018
|
||||
#define DIALOG_ARENAS 1019
|
||||
#define DIALOG_BOUGHT_VEH 1020
|
||||
#define DIALOG_PERKS 1021
|
||||
#define DIALOG_PERKS_P 1022
|
||||
#define DIALOG_VIP 1023
|
||||
#define DIALOG_PERKS_V 1024
|
||||
#define DIALOG_DONATED 1025
|
||||
#define DIALOG_VEHICLE_LOCATE 1026
|
||||
#define DIALOG_GANG_COLOR 1027
|
||||
#define DIALOG_GANG_COLOR_INPUT 1028
|
||||
#define DIALOG_RADIO 1029
|
||||
#define DIALOG_XPMARKET 1030
|
||||
#define DIALOG_PAINTBALL 1031
|
||||
#define DIALOG_GPS 1032
|
||||
#define DIALOG_VIP_LOCKER 1033
|
||||
#define DIALOG_AMMU 1034
|
||||
#define DIALOG_GARAGE_INTERIORS 1035
|
||||
#define DIALOG_GARAGE_INT_CONFIRM 1036
|
||||
#define DIALOG_GANG_LIST 1037
|
||||
#define DIALOG_LUMBERJACK 1038
|
||||
#define DIALOG_FIGHTSTYLE 1039
|
||||
#define DIALOG_TOYS_MAIN 1040
|
||||
#define DIALOG_TOYS 1041
|
||||
#define DIALOG_TOYS_BONE 1042
|
||||
#define DIALOG_VIP_WEP 1043
|
||||
#define DIALOG_VIP_WEP_SELECT 1044
|
||||
#define DIALOG_GANG_LIST_RESPONSE 1045
|
||||
#define DIALOG_CMDS 1046
|
||||
#define DIALOG_CMDS_REDIRECT 1047
|
||||
#define DIALOG_STATS 1048
|
||||
#define DIALOG_STATS_REDIRECT 1049
|
||||
#define DIALOG_VEHDEALER 1050
|
||||
#define DIALOG_CP_MENU 1051
|
||||
#define DIALOG_AMMU_BUY 1052
|
||||
#define DIALOG_APARTMENTS 1053
|
||||
#define DIALOG_APARTMENTS_BUY 1054
|
||||
#define DIALOG_FLAT_CONFIG 1055
|
||||
#define DIALOG_FLAT_CONTROL 1056
|
||||
#define DIALOG_FLAT_TITLE 1057
|
||||
#define DIALOG_BUSINESS_TERMINAL 1058
|
||||
#define DIALOG_WEAPON_DEAL 1059
|
||||
#define DIALOG_WEAPON_DEAL_BUY 1060
|
||||
#define DIALOG_HOUSE_PW 1061
|
||||
#define DIALOG_HOUSE_SET_PW 1062
|
||||
#define DIALOG_HOUSE_WEAPONS 1063
|
||||
#define DIALOG_HOUSE_WEAPONS_ADD 1064
|
||||
#define DIALOG_BUSINESS_BUY 1065
|
||||
#define DIALOG_FURNITURE 1066
|
||||
#define DIALOG_FURNITURE_LIST 1067
|
||||
#define DIALOG_FURNITURE_OPTION 1068
|
||||
#define DIALOG_FURNITURE_ROTATION 1069
|
||||
#define DIALOG_FURNITURE_MAN_SEL 1070
|
||||
#define DIALOG_ONLINE_JOB 1071
|
||||
#define DIALOG_ONLINE_JOB_R 1072
|
||||
#define DIALOG_FURNITURE_CATEGORY 1073
|
||||
#define DIALOG_SPAWN 1074
|
||||
#define DIALOG_TRUNCATE_FURNITURE 1075
|
||||
#define DIALOG_VEHDEALER_BUY 1076
|
||||
#define DIALOG_VEHDEALER_OPTIONS 1077
|
||||
#define DIALOG_HELP 1078
|
||||
#define DIALOG_HELP_CATEGORY 1079
|
||||
#define DIALOG_HELP_THREAD 1080
|
||||
#define DIALOG_HELP_BACK 1081
|
||||
#define DIALOG_RADIO_CUSTOM 1082
|
||||
#define DIALOG_GPS_CITY 1083
|
||||
#define DIALOG_SPAWN_CITY 1084
|
||||
#define DIALOG_GATE 1085
|
||||
#define DIALOG_GATE_EDIT 1086
|
||||
#define DIALOG_GATE_OWNER 1087
|
||||
#define DIALOG_GATE_OWNER_EDIT 1088
|
||||
#define DIALOG_PAINTBALL_EDIT 1089
|
||||
#define DIALOG_PAINTBALL_EDIT_VAL 1090
|
||||
#define DIALOG_PAINTBALL_ARENAS 1091
|
||||
#define DIALOG_PAINTBALL_WEP 1092
|
||||
#define DIALOG_PAINTBALL_PW 1093
|
||||
#define DIALOG_DONATED_PLATBRONZE 1094
|
||||
#define DIALOG_SHOP_AMOUNT 1095
|
||||
#define DIALOG_PAINTBALL_REFILL 1096
|
||||
#define DIALOG_HOUSE_INT_CONFIRM 1098
|
||||
#define DIALOG_TOYS_ITEMS 1099
|
||||
#define DIALOG_TOYS_EDIT 1100
|
||||
#define DIALOG_TOYS_BONE_EDIT 1101
|
||||
#define DIALOG_TOYS_BUY 1102
|
||||
#define DIALOG_TOYS_ITEMS_BUY 1103
|
||||
#define DIALOG_UNBAN_CLASS 1104
|
||||
#define DIALOG_GANG_BANK_WITHDRAW 1105
|
||||
#define DIALOG_GANG_BANK_DEPOSIT 1106
|
||||
#define DIALOG_GANG_BANK_INFO 1107
|
||||
#define DIALOG_YOU_SURE_APART 1108
|
||||
#define DIALOG_YOU_SURE_VIP 1109
|
||||
#define DIALOG_CHANGENAME 1110
|
||||
#define DIALOG_GANG_LIST_OPTIONS 1111
|
||||
#define DIALOG_GANG_LIST_MEMBERS 1112
|
||||
#define DIALOG_COMPONENTS_CATEGORY 1113
|
||||
#define DIALOG_COMPONENTS 1114
|
||||
#define DIALOG_COMPONENT_EDIT 1115
|
||||
#define DIALOG_COMPONENT_EDIT_MENU 1116
|
||||
#define DIALOG_COMPONENT_MENU 1117
|
||||
#define DIALOG_DONATED_DIAGOLD 1118
|
||||
#define DIALOG_LATEST_DONOR 1119
|
||||
#define DIALOG_FINISHED_DONATING 1120
|
||||
#define DIALOG_MODIFY_HITSOUND 1121
|
||||
#define DIALOG_VIP_NOTE 1122
|
||||
#define DIALOG_REGISTER_QUIT 1123
|
||||
#define DIALOG_LOGIN_QUIT 1124
|
||||
#define DIALOG_WEAPON_LOCKER 1125
|
||||
#define DIALOG_WEAPON_LOCKER_BUY 1126
|
||||
#define DIALOG_FEEDBACK 1127
|
||||
#define DIALOG_IC_MARKET_2 1128
|
||||
#define DIALOG_BUSINESS_CAR 1129
|
||||
#define DIALOG_BUSINESS_HELI 1130
|
||||
#define DIALOG_ACC_GUARD 1131
|
||||
#define DIALOG_ACC_GUARD_EMAIL 1132
|
||||
#define DIALOG_ACC_GUARD_MODE 1133
|
||||
#define DIALOG_ACC_GUARD_CONFIRM 1134
|
||||
#define DIALOG_ACC_GUARD_DEL_CANCEL 1135
|
||||
#define DIALOG_RACE 1136
|
||||
#define DIALOG_RACE_MODE 1137
|
||||
#define DIALOG_RACE_FEE 1138
|
||||
#define DIALOG_RACE_POS 1139
|
||||
#define DIALOG_RACE_DISTANCE 1140
|
||||
#define DIALOG_RACE_KICK 1141
|
||||
#define DIALOG_RACE_DEST 1142
|
||||
#define DIALOG_RACE_PRESELECT 1143
|
||||
#define DIALOG_RACE_CUSTOM_DEST 1144
|
||||
#define DIALOG_BUSINESS_SELL 1145
|
||||
#define DIALOG_BUSINESS_NAME 1146
|
||||
#define DIALOG_BUSINESS_ADD_MEMBER 1147
|
||||
#define DIALOG_BUSINESS_MEMBERS 1148
|
||||
#define DIALOG_BUSINESS_WITHDRAW 1149
|
||||
#define DIALOG_BUSINESS_UPGRADES 1150
|
||||
#define DIALOG_BUSINESSES 1151
|
||||
#define DIALOG_CASINO_REWARDS 1152
|
||||
#define DIALOG_AIRPORT 1153
|
||||
#define DIALOG_CASINO_BAR 1154
|
||||
#define DIALOG_ACC_EMAIL 1155
|
||||
#define DIALOG_BUSINESS_SECURITY 1156
|
||||
#define DIALOG_FACILITY_SPAWN 1157
|
||||
#define DIALOG_IC_MARKET_3 1158
|
||||
#define DIALOG_BUY_VIP 1159
|
||||
#define DIALOG_TOYS_COLOR 1160
|
||||
#define DIALOG_HIGHSCORES 1161
|
||||
#define DIALOG_HIGHSCORES_BACK 1162
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
// make a confirmation/cancellation sound between dialogs
|
||||
if ( response ) PlayerPlaySound( playerid, 1083, 0.0, 0.0, 0.0 ); // Confirmation sound
|
||||
else PlayerPlaySound( playerid, 1084, 0.0, 0.0, 0.0 ); // Cancellation sound
|
||||
|
||||
// replace % with # in dialogs
|
||||
if ( strlen( inputtext ) ) strreplacechar( inputtext, '%', '#' ); // The percentage injection crasher (critical)
|
||||
return 1;
|
||||
}
|
46
gamemodes/irresistible/cnr/global.pwn
Normal file
46
gamemodes/irresistible/cnr/global.pwn
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cnr\global.pwn
|
||||
* Purpose: all global related variables (cnr)
|
||||
*/
|
||||
|
||||
/* ** Variables ** */
|
||||
new
|
||||
g_redeemVipWait = 0,
|
||||
g_TrolleyVehicles [ 5 ],
|
||||
engine, lights, doors, bonnet, boot, objective, alarm, panels, tires,
|
||||
g_RestoreRobberiesBribes = 0,
|
||||
g_ServerUptime = 0,
|
||||
rl_ServerUpdate = 0xFF,
|
||||
rl_ZoneUpdate = 0xFF,
|
||||
rl_AutoVehicleRespawner = 0xFF,
|
||||
bool: g_adminSpawnedCar [ MAX_VEHICLES char ],
|
||||
g_WorldClockSeconds = 0,
|
||||
g_WorldDayCount = 0,
|
||||
g_WorldWeather = 10,
|
||||
g_LogsInStock = 0,
|
||||
g_PingLimit = 1024,
|
||||
g_circleall_CD = false,
|
||||
g_randomMessageTick = 0,
|
||||
log__Text [ 6 ][ 90 ],
|
||||
szReportsLog [ 8 ][ 128 ],
|
||||
szQuestionsLog [ 8 ][ 128 ],
|
||||
bool: g_CommandLogging = false,
|
||||
bool: g_DialogLogging = false,
|
||||
szRules [ 3300 ],
|
||||
g_BannedDrivebyWeapons [ ] =
|
||||
{
|
||||
24, 26, 27, 34, 33
|
||||
},
|
||||
bool: g_Debugging = false,
|
||||
bool: g_Driveby = false,
|
||||
bool: g_VipPrivateMsging = false,
|
||||
bool: g_HappyHour = false,
|
||||
Float: g_HappyHourRate = 0.0,
|
||||
g_iTime = 0,
|
||||
g_VehicleLastAttacker [ MAX_VEHICLES ] = { INVALID_PLAYER_ID, ... },
|
||||
g_VehicleLastAttacked [ MAX_VEHICLES ],
|
||||
g_TopDonorWall = INVALID_OBJECT_ID,
|
||||
g_AlcatrazArea = -1
|
||||
;
|
246
gamemodes/irresistible/cnr/player.pwn
Normal file
246
gamemodes/irresistible/cnr/player.pwn
Normal file
@ -0,0 +1,246 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cnr\player.pwn
|
||||
* Purpose: all player related variables (cnr)
|
||||
*/
|
||||
|
||||
/* ** Variables ** */
|
||||
new
|
||||
bool: p_Spawned [ MAX_PLAYERS char ],
|
||||
bool: p_PlayerLogged [ MAX_PLAYERS char ],
|
||||
p_AccountID [ MAX_PLAYERS ],
|
||||
p_AdminLevel [ MAX_PLAYERS ],
|
||||
p_Job [ MAX_PLAYERS char ],
|
||||
p_VIPJob [ MAX_PLAYERS char ],
|
||||
bool: p_JobSet [ MAX_PLAYERS char ],
|
||||
p_JailTime [ MAX_PLAYERS ],
|
||||
p_AdminJailed [ MAX_PLAYERS char ],
|
||||
p_JailTimer [ MAX_PLAYERS ],
|
||||
bool: p_Jailed [ MAX_PLAYERS char ],
|
||||
p_WantedLevel [ MAX_PLAYERS ],
|
||||
bool: p_Tazed [ MAX_PLAYERS char ],
|
||||
p_LastVehicle [ MAX_PLAYERS ] = { INVALID_VEHICLE_ID, ... },
|
||||
bool: p_Cuffed [ MAX_PLAYERS char ],
|
||||
p_CuffAbuseTimer [ MAX_PLAYERS ],
|
||||
p_Cash [ MAX_PLAYERS ],
|
||||
p_AntiRobSpam [ MAX_PLAYERS ],
|
||||
p_AntiRapeSpam [ MAX_PLAYERS ],
|
||||
bool: p_Tied [ MAX_PLAYERS char ],
|
||||
p_Ropes [ MAX_PLAYERS ],
|
||||
bool: p_Kidnapped [ MAX_PLAYERS char ],
|
||||
bool: p_ToggledViewPM [ MAX_PLAYERS char ],
|
||||
p_TicketTimestamp [ MAX_PLAYERS ],
|
||||
p_TicketIssuer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CheckpointEnterTick [ MAX_PLAYERS ],
|
||||
bool: p_pausedToLoad [ MAX_PLAYERS char ],
|
||||
bool: p_CantUseReport [ MAX_PLAYERS char ],
|
||||
p_pausedToLoadTimer [ MAX_PLAYERS ],
|
||||
p_BankMoney [ MAX_PLAYERS ],
|
||||
p_OwnedHouses [ MAX_PLAYERS ],
|
||||
p_OwnedVehicles [ MAX_PLAYERS ],
|
||||
p_OwnedBusinesses [ MAX_PLAYERS ],
|
||||
p_TrackingTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_ContractedAmount [ MAX_PLAYERS ],
|
||||
p_MetalMelter [ MAX_PLAYERS ],
|
||||
p_Kills [ MAX_PLAYERS ],
|
||||
p_Deaths [ MAX_PLAYERS ],
|
||||
p_VIPLevel [ MAX_PLAYERS ],
|
||||
p_XP [ MAX_PLAYERS ],
|
||||
p_CureDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CureTick [ MAX_PLAYERS ],
|
||||
p_HealDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_HealTick [ MAX_PLAYERS ],
|
||||
bool: p_Spectating [ MAX_PLAYERS char ],
|
||||
bool: p_Muted [ MAX_PLAYERS char ],
|
||||
bool: p_InfectedHIV [ MAX_PLAYERS char ],
|
||||
p_InHouse [ MAX_PLAYERS ],
|
||||
p_ExperienceHideTimer [ MAX_PLAYERS ],
|
||||
p_AntiTextSpam [ MAX_PLAYERS ],
|
||||
bool: p_BlockedPM [ MAX_PLAYERS ] [ MAX_PLAYERS ],
|
||||
bool: p_inFBI [ MAX_PLAYERS char ],
|
||||
bool: p_inArmy [ MAX_PLAYERS char ],
|
||||
p_MutedTime [ MAX_PLAYERS ],
|
||||
p_AntiCommandSpam [ MAX_PLAYERS ],
|
||||
p_PmResponder [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
bool: justConnected [ MAX_PLAYERS char ],
|
||||
p_BailOfferer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_DamageTDTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
Text3D: p_InfoLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_InfoLabelString [ MAX_PLAYERS ] [ 32 ],
|
||||
bool: p_inMovieMode [ MAX_PLAYERS char ],
|
||||
bool: p_inCIA [ MAX_PLAYERS char ],
|
||||
p_AntiEmpSpam [ MAX_PLAYERS ],
|
||||
bool: p_inPaintBall [ MAX_PLAYERS char ],
|
||||
p_Scissors [ MAX_PLAYERS ],
|
||||
// p_TaxTime [ MAX_PLAYERS ],
|
||||
bool: p_GPSToggled [ MAX_PLAYERS char ],
|
||||
p_GPSTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
p_GPSLocation [ MAX_PLAYERS ],
|
||||
p_GPSObject [ MAX_PLAYERS ] = { INVALID_OBJECT_ID, ... },
|
||||
p_VIPArmourRedeem [ MAX_PLAYERS ],
|
||||
p_VIPWeaponRedeem [ MAX_PLAYERS ],
|
||||
p_VIPExpiretime [ MAX_PLAYERS ],
|
||||
p_LastSkin [ MAX_PLAYERS ],
|
||||
bool: p_MoneyBag [ MAX_PLAYERS char ],
|
||||
p_CopBanned [ MAX_PLAYERS char ],
|
||||
p_AntiEMP [ MAX_PLAYERS ],
|
||||
p_FireDistanceTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
p_Warns [ MAX_PLAYERS ],
|
||||
p_Wood [ MAX_PLAYERS ],
|
||||
p_LumberjackDeliver [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_LumberjackReturn [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_LumberjackTimeElapsed [ MAX_PLAYERS ],
|
||||
bool: p_StartedLumberjack [ MAX_PLAYERS char ],
|
||||
p_Uptime [ MAX_PLAYERS ],
|
||||
p_AchievementTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
bool: p_SecureWallet [ MAX_PLAYERS char ],
|
||||
p_WeedGrams [ MAX_PLAYERS ],
|
||||
p_WeedDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_WeedTick [ MAX_PLAYERS ],
|
||||
p_WeedSellingGrams [ MAX_PLAYERS ],
|
||||
p_Arrests [ MAX_PLAYERS ],
|
||||
bool: p_AidsVaccine [ MAX_PLAYERS char ],
|
||||
bool: p_CantUseAsk [ MAX_PLAYERS char ],
|
||||
bool: p_AdminLog [ MAX_PLAYERS char ],
|
||||
LastDeath [ MAX_PLAYERS ],
|
||||
DeathSpam [ MAX_PLAYERS char ],
|
||||
bool: p_beingSpectated [ MAX_PLAYERS ],
|
||||
p_whomSpectating [ MAX_PLAYERS ],
|
||||
bool: p_InAnimation [ MAX_PLAYERS char ],
|
||||
p_AntiSaveStatsSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFixSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechNosSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechEmpSpam [ MAX_PLAYERS ],
|
||||
bool: p_GivingBlowjob [ MAX_PLAYERS char ],
|
||||
bool: p_GettingBlowjob [ MAX_PLAYERS char ],
|
||||
p_AntiBlowJobSpam [ MAX_PLAYERS ],
|
||||
p_EntranceTickcount [ MAX_PLAYERS ],
|
||||
p_VIPWep1 [ MAX_PLAYERS char ],
|
||||
p_VIPWep2 [ MAX_PLAYERS char ],
|
||||
p_VIPWep3 [ MAX_PLAYERS char ],
|
||||
p_VIPWep_Modify [ MAX_PLAYERS char ],
|
||||
p_BobbyPins [ MAX_PLAYERS ],
|
||||
p_IncorrectLogins [ MAX_PLAYERS char ],
|
||||
p_Robberies [ MAX_PLAYERS ],
|
||||
p_ViewingStats [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CarWarpTime [ MAX_PLAYERS ],
|
||||
p_CarWarpVehicleID [ MAX_PLAYERS ],
|
||||
p_AntiTextSpamCount [ MAX_PLAYERS char ],
|
||||
Float: p_PlayerBuggerX [ MAX_PLAYERS ],
|
||||
Float: p_PlayerBuggerY [ MAX_PLAYERS ],
|
||||
Float: p_PlayerBuggerZ [ MAX_PLAYERS ],
|
||||
p_DamageSpamTime [ MAX_PLAYERS ],
|
||||
p_DamageSpamCount [ MAX_PLAYERS char ],
|
||||
p_PingImmunity [ MAX_PLAYERS char ],
|
||||
p_Fires [ MAX_PLAYERS ],
|
||||
p_ApartmentEnter [ MAX_PLAYERS char ],
|
||||
p_AntiTieSpam [ MAX_PLAYERS ],
|
||||
p_RansomPlacer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_RansomAmount [ MAX_PLAYERS ],
|
||||
p_LastDrovenPoliceVeh [ MAX_PLAYERS ] = { INVALID_VEHICLE_ID, ... },
|
||||
Text3D: p_SpawnKillLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_AntiSpawnKill [ MAX_PLAYERS ],
|
||||
bool: p_AntiSpawnKillEnabled [ MAX_PLAYERS char ],
|
||||
p_HitsComplete [ MAX_PLAYERS ],
|
||||
/*p_CopTutorial [ MAX_PLAYERS char ],
|
||||
p_CopTutorialProgress [ MAX_PLAYERS char ],
|
||||
p_CopTutorialTick [ MAX_PLAYERS ],*/
|
||||
p_WeaponDealTick [ MAX_PLAYERS ],
|
||||
p_WeaponDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_WeaponDealMenu [ MAX_PLAYERS char ],
|
||||
p_WeaponLockerMenu [ MAX_PLAYERS char ],
|
||||
bool: p_WeaponDealing [ MAX_PLAYERS char ],
|
||||
p_BlowjobOfferer [ MAX_PLAYERS ],
|
||||
p_BlowjobDealTick [ MAX_PLAYERS ],
|
||||
p_LastEnteredEntrance [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_ViewingGangTalk [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_SearchedCountTick [ MAX_PLAYERS ],
|
||||
p_SellingWeedTick [ MAX_PLAYERS ],
|
||||
p_AntiKidnapSpam [ MAX_PLAYERS ],
|
||||
//p_JoinTimestamp [ MAX_PLAYERS ],
|
||||
p_PasswordedHouse [ MAX_PLAYERS ],
|
||||
p_HouseWeaponAddSlot [ MAX_PLAYERS char ],
|
||||
Text3D: p_AdminLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
bool: p_AdminOnDuty [ MAX_PLAYERS char ],
|
||||
p_FurnitureCategory [ MAX_PLAYERS char ],
|
||||
p_FurnitureRotAxis [ MAX_PLAYERS char ],
|
||||
Float: p_ProgressStatus [ MAX_PLAYERS ],
|
||||
bool: p_ProgressStarted [ MAX_PLAYERS char ],
|
||||
p_HouseCrackingPW [ MAX_PLAYERS ],
|
||||
p_PawnStoreExport [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_Burglaries [ MAX_PLAYERS ],
|
||||
p_ArmyBanned [ MAX_PLAYERS char ],
|
||||
//Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
//bool: p_Detained [ MAX_PLAYERS char ],
|
||||
//p_DetainedBy [ MAX_PLAYERS ],
|
||||
p_BailTimestamp [ MAX_PLAYERS ],
|
||||
p_AFKTime [ MAX_PLAYERS ],
|
||||
bool: p_ClassSelection [ MAX_PLAYERS char ],
|
||||
p_MiningExport [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
Text3D: p_WeedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
LastPickupTimestamp [ MAX_PLAYERS ],
|
||||
PreviousPickupID [ MAX_PLAYERS ],
|
||||
//p_LastAnimIndex [ MAX_PLAYERS ],
|
||||
p_SpawningCity [ MAX_PLAYERS char ],
|
||||
p_UsingRobberySafe [ MAX_PLAYERS ] = { -1, ... },
|
||||
bool: p_CancelProgress [ MAX_PLAYERS char ],
|
||||
p_LumberjackMapIcon [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_PawnStoreMapIcon [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_SpectateWeapons [ MAX_PLAYERS ] [ 13 ] [ 2 ],
|
||||
bool: p_LeftCuffed [ MAX_PLAYERS char ],
|
||||
p_LabelColor [ MAX_PLAYERS ] = { COLOR_GREY, ... },
|
||||
p_RapidFireTickCount [ MAX_PLAYERS ],
|
||||
p_RapidFireShots [ MAX_PLAYERS char ],
|
||||
p_BulletInvulnerbility [ MAX_PLAYERS ],
|
||||
p_ProgressUpdateTimer [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_DeathMessage [ MAX_PLAYERS ] [ 32 ],
|
||||
p_ViewingInterior [ MAX_PLAYERS char ],
|
||||
p_MethYielded [ MAX_PLAYERS ],
|
||||
p_CarsJacked [ MAX_PLAYERS ],
|
||||
p_BankBlown [ MAX_PLAYERS ],
|
||||
p_JailsBlown [ MAX_PLAYERS ],
|
||||
p_AntiExportCarSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFlipSpam [ MAX_PLAYERS ],
|
||||
bool: p_inAlcatraz [ MAX_PLAYERS char ],
|
||||
Float: p_LastPickupPos [ MAX_PLAYERS ] [ 3 ],
|
||||
Text3D: p_TiedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_TiedBy [ MAX_PLAYERS ],
|
||||
p_BlowjobPrice [ MAX_PLAYERS ],
|
||||
p_DesyncTime [ MAX_PLAYERS ],
|
||||
p_AnswerDelay [ MAX_PLAYERS ],
|
||||
p_LastPlayerState [ MAX_PLAYERS char ],
|
||||
p_RespondDelay [ MAX_PLAYERS ],
|
||||
p_VisibleOnRadar [ MAX_PLAYERS ],
|
||||
p_InGarage [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_WorkCooldown [ MAX_PLAYERS ],
|
||||
p_AntiSpammyTS [ MAX_PLAYERS ],
|
||||
p_TruckedCargo [ MAX_PLAYERS ],
|
||||
p_KidnapImmunity [ MAX_PLAYERS ],
|
||||
p_GangSplitProfits [ MAX_PLAYERS ],
|
||||
Float: p_IrresistiblePoints [ MAX_PLAYERS ],
|
||||
p_SafeHelperTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_HouseOfferer [ MAX_PLAYERS ],
|
||||
p_HouseOfferTicks [ MAX_PLAYERS ],
|
||||
p_HouseSellingID [ MAX_PLAYERS ],
|
||||
p_HouseSellingPrice [ MAX_PLAYERS ],
|
||||
p_RansomTimestamp [ MAX_PLAYERS ],
|
||||
p_QuitToAvoidTimestamp [ MAX_PLAYERS ],
|
||||
p_TimeTiedAt [ MAX_PLAYERS ],
|
||||
p_CopRefillTimestamp [ MAX_PLAYERS ],
|
||||
p_AdminCommandPause [ MAX_PLAYERS ],
|
||||
p_WeaponKills [ MAX_PLAYERS ] [ MAX_WEAPONS ],
|
||||
p_forcedAnticheat [ MAX_PLAYERS ],
|
||||
p_TiedAtTimestamp [ MAX_PLAYERS ],
|
||||
bool: p_AutoSpin [ MAX_PLAYERS char ],
|
||||
p_InBusiness [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_VehicleBringCooldown [ MAX_PLAYERS ],
|
||||
p_Fireworks [ MAX_PLAYERS ],
|
||||
p_ExplosiveBullets [ MAX_PLAYERS ],
|
||||
bool: p_AddedEmail [ MAX_PLAYERS char ],
|
||||
p_SpawningKey [ MAX_PLAYERS ] [ 4 ],
|
||||
p_SpawningIndex [ MAX_PLAYERS ],
|
||||
p_TazingImmunity [ MAX_PLAYERS ],
|
||||
p_PlayerAltBind [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_PlayerAltBindTick [ MAX_PLAYERS ]
|
||||
;
|
13
gamemodes/irresistible/cnr/static/_cnr_static.pwn
Normal file
13
gamemodes/irresistible/cnr/static/_cnr_static.pwn
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cnr\static\_cnr_static.pwn
|
||||
* Purpose: encloses all static objects/vehicles/actors/entities (cnr)
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include "irresistible\cnr\static\actors.pwn"
|
||||
#include "irresistible\cnr\static\server_vehicles.pwn"
|
||||
#include "irresistible\cnr\static\removed_buildings.pwn"
|
||||
#include "irresistible\cnr\static\server_objects.pwn"
|
||||
#include "irresistible\cnr\static\player_objects.pwn"
|
87
gamemodes/irresistible/cnr/static/actors.pwn
Normal file
87
gamemodes/irresistible/cnr/static/actors.pwn
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: actors.inc
|
||||
* Purpose: hosts all actor related data
|
||||
*/
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_ACTOR_DATA
|
||||
{
|
||||
E_SKIN, Float: E_X, Float: E_Y, Float: E_Z, Float: E_RZ,
|
||||
E_ANIM_LIB[ 32 ], E_ANIM_NAME[ 32 ], E_WORLD
|
||||
};
|
||||
|
||||
new
|
||||
g_actorData[ ] [ E_ACTOR_DATA ] =
|
||||
{
|
||||
// Class selection
|
||||
{ 201, 236.283996, 86.777999, 1005.039978, 90.000000, "camera", "picstnd_take", 0 },
|
||||
|
||||
// SF Bank
|
||||
// Guards
|
||||
{ 71, -1440.9655, 835.5352, 984.7126, 269.2035, "COP_AMBIENT", "Coplook_loop", 23 },
|
||||
{ 71, -1440.9685, 826.6669, 984.7126, 265.4997, "COP_AMBIENT", "Coplook_loop", 23 },
|
||||
{ 71, -1424.5790, 851.7675, 984.7126, 180.9785, "COP_AMBIENT", "Coplook_loop", 23 },
|
||||
{ 71, -1401.6161, 851.1558, 984.7126, 127.2859, "COP_AMBIENT", "Coplook_loop", 23 },
|
||||
{ 71, -1416.0955, 809.6740, 984.7126, 354.1741, "COP_AMBIENT", "Coplook_loop", 23 },
|
||||
{ 141, -1431.4342, 863.4650, 984.7126, 181.0019, "PED", "null", 23 },
|
||||
{ 17, -1430.0829, 863.4651, 984.7126, 181.3152, "PED", "null", 23 },
|
||||
{ 187, -1435.4611, 863.4647, 984.7126, 180.3752, "PED", "null", 23 },
|
||||
{ 148, -1436.8112, 863.4647, 984.7126, 180.3752, "PED", "null", 23 },
|
||||
{ 150, -1442.2074, 863.4650, 984.7126, 180.0619, "PED", "null", 23 },
|
||||
{ 212, -1443.6598, 821.4652, 984.7126, 91.59120, "PED", "phone_talk", 23 },
|
||||
{ 223, -1443.6616, 815.0886, 984.7126, 89.08450, "PED", "phone_talk", 23 },
|
||||
{ 147, -1428.3524, 801.6654, 985.6592, 305.9136, "BEACH", "bather", 23 },
|
||||
|
||||
// SF-PD
|
||||
{ 300, -1701.1313, 688.9130, 24.890, 82.99340, "COP_AMBIENT", "Coplook_loop", 0 },
|
||||
{ 301, -1617.1761, 685.5781, 7.1875, 91.40680, "COP_AMBIENT", "Coplook_loop", 0 },
|
||||
{ 307, -1572.4314, 657.5108, 7.1875, 269.4698, "COP_AMBIENT", "Coplook_loop", 0 },
|
||||
|
||||
// Supa Save
|
||||
{ 211, -2405.9412, 767.1729, 1056.7056, 181.1096, "PED", "null", 1 },
|
||||
{ 217, -2401.9216, 767.1737, 1056.7056, 180.4829, "PED", "null", 1 },
|
||||
{ 211, -2397.9246, 767.1732, 1056.7056, 179.5429, "PED", "null", 1 },
|
||||
{ 217, -2393.9060, 767.1729, 1056.7056, 177.6629, "PED", "null", 1 },
|
||||
{ 211, -2389.9084, 767.1729, 1056.7056, 179.2296, "PED", "null", 1 },
|
||||
{ 217, -2432.8936, 767.1730, 1056.7056, 179.2296, "PED", "null", 1 },
|
||||
{ 211, -2436.9250, 767.1729, 1056.7056, 180.1696, "PED", "null", 1 },
|
||||
{ 217, -2440.9246, 767.1728, 1056.7056, 181.1096, "PED", "null", 1 },
|
||||
{ 211, -2444.9470, 767.1730, 1056.7056, 179.8563, "PED", "null", 1 },
|
||||
{ 217, -2448.9636, 767.1729, 1056.7056, 179.8563, "PED", "null", 1 },
|
||||
|
||||
// Jizzy's
|
||||
{ 256, -2654.1667, 1410.6729, 907.3886, 181.1924, "STRIP", "strip_A", 18 },
|
||||
{ 257, -2671.1641, 1410.0186, 907.5703, 2.927600, "STRIP", "strip_C", 18 },
|
||||
{ 87, -2675.1821, 1410.0433, 907.5703, 29.1581, "STRIP", "strip_b", 18 },
|
||||
{ 244, -2677.6951, 1413.1705, 907.5763, 238.443, "STRIP", "strip_F", 18 },
|
||||
{ 246, -2676.9360, 1408.1617, 907.5703, 93.0787, "STRIP", "strip_D", 18 },
|
||||
{ 256, -2676.9358, 1404.9027, 907.5703, 84.9319, "STRIP", "strip_E", 18 },
|
||||
{ 87, -2677.1584, 1416.1370, 907.5712, 134.102, "STRIP", "strip_G", 18 },
|
||||
{ 244, -2670.4622, 1427.9211, 907.3604, 86.9676, "STRIP", "strip_E", 18 },
|
||||
{ 258, -2671.5706, 1413.3748, 906.4609, 193.0993, "RIOT", "RIOT_shout", 18 },
|
||||
{ 259, -2668.7529, 1413.0908, 906.4609, 137.5257, "RIOT", "RIOT_shout", 18 },
|
||||
{ 296, -2675.0781, 1429.7128, 906.4609, 226.2898, "BLOWJOBZ", "BJ_STAND_LOOP_P", 18 },
|
||||
{ 244, -2674.5938, 1429.1975, 906.4609, 48.86200, "BLOWJOBZ", "BJ_STAND_LOOP_W", 18 },
|
||||
{ 24, -2675.8835, 1427.9740, 906.9243, 180.2610, "BEACH", "bather", 18 },
|
||||
{ 221, -2656.4712, 1413.2327, 906.2734, 232.1765, "PAULNMAC", "wank_loop", 18 },
|
||||
|
||||
// Hobo
|
||||
{ 137, -1519.9003, 678.79800, 7.459900, 14.7968, "BEACH", "ParkSit_M_loop", 0 }
|
||||
}
|
||||
;
|
||||
|
||||
stock initializeActors( )
|
||||
{
|
||||
for( new i = 0; i < sizeof( g_actorData ); i++ )
|
||||
{
|
||||
new
|
||||
actorid = CreateDynamicActor( g_actorData[ i ] [ E_SKIN ], g_actorData[ i ] [ E_X ], g_actorData[ i ] [ E_Y ], g_actorData[ i ] [ E_Z ], g_actorData[ i ] [ E_RZ ] );
|
||||
|
||||
SetDynamicActorInvulnerable( actorid, true );
|
||||
SetDynamicActorVirtualWorld( actorid, g_actorData[ i ] [ E_WORLD ] );
|
||||
ApplyDynamicActorAnimation( actorid, g_actorData[ i ] [ E_ANIM_LIB ], g_actorData[ i ] [ E_ANIM_NAME ], 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( actorid, g_actorData[ i ] [ E_ANIM_LIB ], g_actorData[ i ] [ E_ANIM_NAME ], 4.1, 1, 1, 1, 1, 0 );
|
||||
}
|
||||
}
|
15416
gamemodes/irresistible/cnr/static/player_objects.pwn
Normal file
15416
gamemodes/irresistible/cnr/static/player_objects.pwn
Normal file
File diff suppressed because it is too large
Load Diff
344
gamemodes/irresistible/cnr/static/removed_buildings.pwn
Normal file
344
gamemodes/irresistible/cnr/static/removed_buildings.pwn
Normal file
@ -0,0 +1,344 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: static_cnr\removed_buildings.inc
|
||||
* Purpose: removed buildings data
|
||||
*/
|
||||
|
||||
stock removeExcessiveBuildings( playerid )
|
||||
{
|
||||
RemoveBuildingForPlayer( playerid, 10149, -1696.0245, 1034.0981, 45.2109, 15.0 );
|
||||
RemoveBuildingForPlayer( playerid, 10553, -2336.9297, -105.2891, 37.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10394, -2336.9297, -105.2891, 37.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 708, -1975.5234, -130.6484, 29.5313, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10938, -1909.5547, 497.21880, 25.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11144, -1909.5547, 497.21880, 25.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11163, -2110.8281, -27.35940, 36.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11092, -2110.8281, -27.35940, 36.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11102, -2102.9297, -16.05470, 36.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11372, -2076.4375, -107.9297, 36.9688, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11014, -2076.4375, -107.9297, 36.9688, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10158, -1954.2422, 1358.3672, 18.2031, 0.25 ); // Apartments.
|
||||
RemoveBuildingForPlayer( playerid, 9950, -1954.2422, 1358.3672, 18.2031, 0.25 ); // Apartments.
|
||||
RemoveBuildingForPlayer( playerid, 2744, 1721.6172, -1655.6641, 21.6641, 0.25 ); // V.I.P Lounge
|
||||
RemoveBuildingForPlayer( playerid, 627, -2569.0781, 323.3125, 11.3594, 0.25 ); // Garden House
|
||||
RemoveBuildingForPlayer( playerid, 626, -2575.1094, 323.3203, 11.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 626, -2578.0703, 323.1016, 11.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 626, -2579.6250, 323.3125, 11.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 626, -2576.5859, 323.2109, 11.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 627, -2567.4219, 323.7031, 11.3594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 626, -2573.6328, 323.4297, 11.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 638, -2579.9219, 328.2422, 10.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 638, -2578.9141, 328.2344, 10.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 638, -2577.9141, 328.2344, 10.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 638, -2576.9063, 328.2266, 10.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 638, -2575.8984, 328.2266, 10.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1480, -2570.2109, 331.2734, 10.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 627, -2567.8594, 331.3125, 11.3594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1480, -2572.2109, 332.0391, 10.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1480, -2574.3906, 332.5391, 10.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 628, -2577.1875, 333.4375, 11.5547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 628, -2579.5156, 331.7813, 11.5547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 628, -2579.4688, 334.2578, 11.5547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 640, -2561.4063, 305.1484, 15.6406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1418, -2559.7656, 302.2500, 15.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2556.7656, 304.8047, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2557.8047, 304.7344, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2554.9922, 304.8984, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2555.0859, 305.8984, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2555.0781, 307.0469, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2555.9141, 304.8672, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1418, -2556.2578, 301.9375, 15.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1479, -2563.6016, 327.3750, 10.9375, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1458, -2560.3750, 323.2031, 15.1719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1479, -2560.4609, 314.8828, 16.3438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 640, -2561.2031, 328.8125, 15.6406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 640, -2555.1172, 315.7734, 15.6406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 741, -2554.9531, 308.0313, 15.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 640, -2555.1094, 310.0469, 15.6406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 625, -2553.7969, 325.4063, 15.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 625, -2554.2266, 325.7422, 15.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 625, -2553.7578, 328.8828, 15.8359, 0.25 ); //Garden Finish
|
||||
RemoveBuildingForPlayer( playerid, 673, -2643.5547, 200.3984, 3.0625, 0.25 ); // Gunstore near Garden House objects
|
||||
RemoveBuildingForPlayer( playerid, 774, -2643.8750, 204.0000, 3.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1446, -2646.0547, 205.3125, 4.1328, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1446, -2639.0000, 207.6953, 4.1328, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1446, -2643.6875, 207.6953, 4.1328, 0.25 ); // Gunstore near Garden House objects finish
|
||||
RemoveBuildingForPlayer( playerid, 10605, -2550.1719, 54.5625, 14.3906, 0.25 ); // The Lost
|
||||
RemoveBuildingForPlayer( playerid, 10447, -2550.1719, 54.5625, 14.3906, 0.25 ); // The Lost
|
||||
RemoveBuildingForPlayer( playerid, 9861, -2724.3281, 1230.4375, 30.6953, 0.25 ); // Mining
|
||||
RemoveBuildingForPlayer( playerid, 9864, -2724.3281, 1230.4375, 30.6953, 0.25 ); // Mining
|
||||
RemoveBuildingForPlayer( playerid, 10182, -1786.8125, 1209.4219, 25.8359, 0.25 ); // Niels' garage
|
||||
RemoveBuildingForPlayer( playerid, 3036, -2179.353, 661.232, 50.214, 1.0 ); // Chinatown gate
|
||||
RemoveBuildingForPlayer( playerid, 16094, 191.1406, 1870.0391, 21.4766, 0.25 ); // Area 51
|
||||
RemoveBuildingForPlayer( playerid, 9019, 2096.2031, 1286.0391, 11.4609, 0.25 ); // LV Tower
|
||||
RemoveBuildingForPlayer( playerid, 14856, 198.4688, 168.6797, 1003.8984, 0.25 ); // LV-PD Jail
|
||||
RemoveBuildingForPlayer( playerid, 14847, 246.2344, 117.8047, 1005.6094, 0.25 ); // SF-PD Jail
|
||||
RemoveBuildingForPlayer( playerid, 2118, 960.8672, -45.6484, 1000.5234, 0.25 ); // Brothel - bugged table
|
||||
RemoveBuildingForPlayer( playerid, 2024, 960.2500, -58.0625, 1000.3984, 0.25 ); // Brothel - bugged table
|
||||
RemoveBuildingForPlayer( playerid, 1694, -2115.4453, 526.9141, 86.8594, 0.25 ); // Useless Antenna (La Costra Nosta Arntz)
|
||||
RemoveBuildingForPlayer( playerid, 11391, -2056.2031, 158.5469, 29.0938, 0.25 ); // Train Station Garage
|
||||
RemoveBuildingForPlayer( playerid, 11389, -2048.1172, 166.7188, 30.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11390, -2048.1797, 166.7188, 32.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11392, -2047.7578, 168.1406, 27.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11394, -2048.1641, 168.3125, 31.7344, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11393, -2043.5156, 161.3438, 29.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11388, -2048.1797, 166.7188, 34.5156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11416, -2038.9297, 178.8047, 29.9375, 0.25 ); // End of Train Station Garage
|
||||
RemoveBuildingForPlayer( playerid, 11223, -2049.1719, 250.3203, 33.0781, 0.25 ); // Lorenc Bank
|
||||
RemoveBuildingForPlayer( playerid, 11226, -2049.1719, 250.3203, 29.3750, 0.25 ); // Lorenc Bank
|
||||
RemoveBuildingForPlayer( playerid, 11043, -2194.3828, -96.2266, 46.0625, 0.25 ); // Niels' Garage
|
||||
RemoveBuildingForPlayer( playerid, 11047, -2195.2969, -126.4063, 47.4141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10994, -2195.2969, -126.4063, 47.4141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10998, -2194.3828, -96.2266, 46.0625, 0.25 ); // End of Niels' Garage
|
||||
RemoveBuildingForPlayer( playerid, 708, -2405.2109, -108.7266, 34.6328, 0.25 ); // Lumberjack
|
||||
RemoveBuildingForPlayer( playerid, 708, -2386.6719, -85.6484, 34.6328, 0.25 ); // Lumberjack
|
||||
RemoveBuildingForPlayer( playerid, 669, -2398.8047, -83.6563, 34.6172, 0.25 ); // Lumberjack
|
||||
RemoveBuildingForPlayer( playerid, 14843, 266.3516, 81.1953, 1001.2813, 0.25 ); // LSPD
|
||||
RemoveBuildingForPlayer( playerid, 730, 516.2109, -1326.3984, 14.7031, 0.25 ); // Grotti
|
||||
RemoveBuildingForPlayer( playerid, 1266, 520.3516, -1307.0547, 29.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1261, 561.7422, -1256.1094, 22.0703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1268, 561.7813, -1262.3438, 30.6563, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 620, 507.5625, -1315.8594, 13.6250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 6357, 505.0547, -1269.9375, 28.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1260, 520.3438, -1307.0625, 29.6797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1267, 561.7422, -1256.1094, 22.0703, 0.25 ); // Grotti End
|
||||
RemoveBuildingForPlayer( playerid, 9671, -2719.0156, 861.2109, 72.1563, 0.25 ); // Paradiso home
|
||||
RemoveBuildingForPlayer( playerid, 9510, -2719.0156, 861.2109, 72.1563, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1337, -2718.1719, 872.1094, 70.3438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1337, -2720.5547, 872.3906, 70.3438, 0.25 ); // End paradiso home
|
||||
RemoveBuildingForPlayer( playerid, 1419, -2659.1797, 887.3750, 79.4063, 50.0 ); // Paradiso fencing
|
||||
RemoveBuildingForPlayer( playerid, 9939, -1951.6875, 660.0234, 89.5078, 0.25 ); // Zombotech lab
|
||||
RemoveBuildingForPlayer( playerid, 10027, -1951.6875, 660.0234, 89.5078, 0.25 ); // Zombotech lab
|
||||
RemoveBuildingForPlayer( playerid, 10258, -1688.1094, 1036.2734, 46.2031, 0.25 ); // Niels Garage Start
|
||||
RemoveBuildingForPlayer( playerid, 10148, -1688.1094, 1036.2734, 46.2031, 0.25 ); // Niels Garage Finish
|
||||
RemoveBuildingForPlayer( playerid, 2324, 0.0, 0.0, 0.0, 6666.0 ); // Gambling
|
||||
RemoveBuildingForPlayer( playerid, 2325, 0.0, 0.0, 0.0, 6666.0 );
|
||||
RemoveBuildingForPlayer( playerid, 2326, 0.0, 0.0, 0.0, 6666.0 );
|
||||
RemoveBuildingForPlayer( playerid, 2327, 0.0, 0.0, 0.0, 6666.0 );
|
||||
RemoveBuildingForPlayer( playerid, 2347, 0.0, 0.0, 0.0, 6666.0 );
|
||||
RemoveBuildingForPlayer( playerid, 2348, 0.0, 0.0, 0.0, 6666.0 );
|
||||
RemoveBuildingForPlayer( playerid, 2349, 0.0, 0.0, 0.0, 6666.0 ); // Gambling
|
||||
RemoveBuildingForPlayer( playerid, 10558, -2730.4688, 72.3203, 5.3516, 0.25 ); // Unused garage door
|
||||
RemoveBuildingForPlayer( playerid, 10150, -2162.0313, 654.6563, 53.3750, 0.25 ); // Unused garage door
|
||||
RemoveBuildingForPlayer( playerid, 1227, -2717.9219, 77.9219, 4.0781, 5.0 ); // Bins at garage
|
||||
RemoveBuildingForPlayer( playerid, 4080, 1787.1328, -1565.6797, 11.9688, 0.25 ); // Remove Static Buildings
|
||||
RemoveBuildingForPlayer( playerid, 4000, 1787.1328, -1565.6797, 11.9688, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 5767, 1160.9609, -1180.5781, 70.4141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 5964, 1160.9609, -1180.5781, 70.4141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10850, -1875.0234, -65.3281, 15.0625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 10919, -1875.0234, -65.3281, 15.0625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 11289, -1839.3281, -106.4531, 11.146, 0.25 ); // From remove Static Buildings
|
||||
RemoveBuildingForPlayer( playerid, 1411, -1846.8516, -193.1797, 18.8516, 50.0 ); // Dope HQ
|
||||
RemoveBuildingForPlayer( playerid, 985, 2497.4063, 2777.0703, 11.5313, 0.25 ); // K.A.C.C. Gates
|
||||
RemoveBuildingForPlayer( playerid, 986, 2497.4063, 2769.1094, 11.5313, 0.25 ); // K.A.C.C. Gates
|
||||
RemoveBuildingForPlayer( playerid, 8544, 2844.2500, 874.7188, 15.4453, 0.25 ); // Gal HQ LV
|
||||
RemoveBuildingForPlayer( playerid, 8549, 2836.0938, 928.2813, 11.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8737, 2814.3438, 993.8438, 13.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8738, 2867.9766, 976.5078, 14.7422, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8739, 2844.2500, 874.7188, 15.4453, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8960, 2787.0000, 953.4375, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8961, 2797.6250, 885.4531, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8962, 2797.6250, 865.4063, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8963, 2885.5313, 919.2266, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2806.2109, 838.6094, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2866.0313, 838.6094, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1365, 2801.0703, 858.1016, 10.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2782.6641, 851.7656, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1358, 2808.7969, 857.2031, 10.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1343, 2821.8750, 858.1875, 10.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1365, 2848.4844, 857.1797, 10.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1343, 2836.9531, 858.1953, 10.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1344, 2879.0859, 858.1563, 10.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1358, 2863.7891, 857.2031, 10.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2889.7344, 851.7656, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2782.6641, 899.2813, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2800.9453, 879.3047, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2800.9453, 876.6406, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8886, 2797.6250, 865.4063, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8885, 2797.6250, 885.4531, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2887.3047, 874.5781, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2889.6172, 895.2109, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2782.6641, 929.2969, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 3458, 2818.4609, 928.6484, 11.2422, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8883, 2885.5313, 919.2266, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8884, 2787.0000, 953.4375, 13.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1231, 2801.9219, 933.8281, 12.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1231, 2812.2266, 933.8281, 12.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1231, 2823.4609, 933.8281, 12.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 3458, 2818.4609, 938.7188, 11.2422, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1231, 2834.5078, 933.8281, 12.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1365, 2849.5391, 945.0156, 10.7813, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2858.2734, 944.9766, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1343, 2863.4688, 946.0156, 10.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1344, 2879.6484, 945.9688, 10.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2889.7266, 943.2656, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2782.6641, 986.6719, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1358, 2796.8438, 977.6953, 10.8047, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1365, 2796.6016, 984.8203, 10.7813, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2796.5469, 996.7578, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2796.5469, 1000.3516, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2806.2109, 1017.9375, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8546, 2814.3438, 993.8438, 13.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2844.0000, 967.4063, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2844.0000, 964.7422, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2846.4688, 986.8516, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1219, 2846.4688, 980.0391, 9.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 8545, 2867.9766, 976.5078, 14.7422, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2866.0313, 1017.9375, 23.9297, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1278, 2889.7266, 986.6719, 23.9297, 0.25 ); // End of Gal HQ LV
|
||||
RemoveBuildingForPlayer( playerid, 3059, 2521.5229, -1272.8842, 34.893, 50.0 ); // Niels LS
|
||||
RemoveBuildingForPlayer(playerid, 3876, -1748.6250, 620.5703, 103.9297, 0.25); // Robox
|
||||
RemoveBuildingForPlayer(playerid, 3876, -1748.6250, 627.2734, 103.9297, 0.25); // Robox
|
||||
RemoveBuildingForPlayer(playerid, 1412, -2491.1172, -175.3516, 25.8281, 30.0); // Garcia House Gate
|
||||
RemoveBuildingForPlayer(playerid, 7163, 2549.3906, 2018.9844, 12.7734, 0.25); // Ahmmy LV Cafe
|
||||
RemoveBuildingForPlayer(playerid, 6922, 2549.3906, 2018.9844, 12.7734, 0.25); // Ahmmy LV Cafe
|
||||
RemoveBuildingForPlayer(playerid, 2779, -21.8125, -57.7656, 1002.5859, 0.25); // gas station fix
|
||||
RemoveBuildingForPlayer(playerid, 2872, -20.5234, -57.7734, 1002.5859, 0.25); // gas station fix
|
||||
RemoveBuildingForPlayer( playerid, 792, -2035.648681, 473.131896, 35.172294, 25.000 ); // facility trees (dope casino)
|
||||
RemoveBuildingForPlayer(playerid, 9919, -1667.7734, 884.2266, 71.6250, 0.25); // VT Facility
|
||||
RemoveBuildingForPlayer(playerid, 9937, -1667.7734, 884.2266, 71.6250, 0.25); // VT Facility LOD ^
|
||||
|
||||
// Wolfganja (Diamond Donor)
|
||||
RemoveBuildingForPlayer(playerid, 1280, -2911.4219, 422.3516, 4.2891, 60.0);
|
||||
RemoveBuildingForPlayer(playerid, 1232, -2916.6172, 419.7344, 6.5000, 125.0);
|
||||
RemoveBuildingForPlayer(playerid, 1283, -2857.5859, 459.6719, 6.4688, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1226, -2855.6641, 475.5234, 7.0703, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 9842, -2920.5703, 461.7969, -61.3906, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 9829, -2920.5703, 461.7969, -61.3906, 0.25);
|
||||
|
||||
// Kidz Killer Clan HQ
|
||||
RemoveBuildingForPlayer(playerid, 1396, -1723.5781, 188.9219, 27.0313, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1397, -1728.9141, 188.9063, 22.5156, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10774, -1739.2109, 166.7109, 5.6875, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1376, -1728.9141, 188.9063, 22.5156, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1386, -1728.9141, 188.9063, 35.7422, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1377, -1754.3906, 188.9219, 29.8203, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1378, -1723.5781, 188.9219, 27.0313, 0.25);
|
||||
|
||||
// CHUKYCDM LS
|
||||
RemoveBuildingForPlayer(playerid, 1219, 1284.1797, -1239.6406, 12.9141, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1227, 1322.1875, -1235.8828, 13.4375, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1412, 1327.4297, -1239.9844, 13.9375, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1412, 1327.4297, -1234.7422, 13.9375, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1219, 1332.8359, -1241.7188, 13.4141, 0.25);
|
||||
|
||||
// Crypton Base
|
||||
RemoveBuildingForPlayer(playerid, 626, 1243.5078, -1640.4609, 28.4219, 100.0);
|
||||
|
||||
// iTRiiPY Base [OP]
|
||||
RemoveBuildingForPlayer(playerid, 11024, -2076.2734, 359.3203, 44.5938, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 3868, -2022.0859, 347.1328, 49.1563, 125.0);
|
||||
RemoveBuildingForPlayer(playerid, 3867, -2049.7344, 336.8672, 49.1563, 125.0);
|
||||
RemoveBuildingForPlayer(playerid, 10946, -2076.6563, 354.3672, 35.7891, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 11403, -2076.6563, 354.3672, 35.7891, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10949, -2076.2734, 359.3203, 44.5938, 0.25);
|
||||
|
||||
// Wang Cars
|
||||
RemoveBuildingForPlayer(playerid, 1615, -1966.8984, 252.1484, 43.6563, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1616, -1940.5703, 250.8281, 45.3828, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 625, -1960.8438, 277.5859, 35.3672, 50.0);
|
||||
RemoveBuildingForPlayer(playerid, 632, -1949.1953, 276.1719, 40.5000, 50.0);
|
||||
|
||||
// Faze Cafe LS
|
||||
RemoveBuildingForPlayer(playerid, 712, 2100.8125, -1764.3750, 21.3906, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 620, 2105.0859, -1765.6094, 10.8047, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1226, 2114.7188, -1785.1797, 16.3984, 0.25);
|
||||
|
||||
// Zach Warehouse
|
||||
RemoveBuildingForPlayer(playerid, 17350, -54.9922, -1130.7266, 4.5781, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 17072, -54.9922, -1130.7266, 4.5781, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 17073, -56.1250, -1130.1719, 4.4922, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1415, -68.3516, -1104.9922, 0.2188, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1462, -60.3594, -1116.9375, 0.2578, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1438, -63.6719, -1125.6953, 0.0469, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1438, -63.4141, -1115.4141, 0.0469, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 1415, -63.8125, -1106.4219, 0.2188, 0.25);
|
||||
|
||||
// VIP Lounge Big House
|
||||
RemoveBuildingForPlayer(playerid, 10280, -2051.6563, 998.6094, 64.3281, 0.25);
|
||||
|
||||
// Remove pier 69 tables
|
||||
RemoveBuildingForPlayer(playerid, 1281, -1640.3264, 1415.3242, 7.1875, 40.0);
|
||||
|
||||
// Remove all roulette tables
|
||||
RemoveBuildingForPlayer(playerid, 1978, 2241.4453, 1619.6094, 1006.2266, 10000.0);
|
||||
RemoveBuildingForPlayer(playerid, 2188, 2241.3125, 1602.7500, 1006.1563, 10000.0);
|
||||
|
||||
// Remove all poker machines
|
||||
RemoveBuildingForPlayer(playerid, 2786, 2259.2188, 1596.4844, 1006.0156, 10000.0);
|
||||
RemoveBuildingForPlayer(playerid, 2785, 2258.2578, 1596.4766, 1006.0156, 10000.0);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1941.5234, 1006.3828, 993.4141, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1940.3906, 1014.2031, 993.4141, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1940.3906, 1021.4141, 993.4141, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1968.0938, 1006.3594, 993.4063, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1968.0938, 1013.9844, 993.4063, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1968.0938, 1021.6797, 993.4063, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1941.2188, 1029.2969, 993.4141, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 2098, 1968.0938, 1029.5391, 993.4063, 0.25);
|
||||
|
||||
// TDK HQ
|
||||
RemoveBuildingForPlayer(playerid, 6937, 2572.2422, 2703.9609, 19.0234, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7038, 2527.8203, 2703.9609, 10.8203, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7169, 2514.5859, 2822.9531, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7170, 2706.4531, 2762.9141, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7201, 2615.5000, 2740.6719, 85.7188, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7102, 2514.5859, 2822.9531, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 3474, 2523.9688, 2818.4922, 16.7422, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 6929, 2572.2422, 2703.9609, 19.0234, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7172, 2546.0313, 2828.7344, 11.5391, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7040, 2594.3750, 2680.0234, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7229, 2629.2188, 2742.9922, 14.8906, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7104, 2706.4531, 2762.9141, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 961, 2564.9922, 2822.7500, 10.2109, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 960, 2564.9922, 2822.7500, 10.2031, 100.0);
|
||||
|
||||
// Hydrogen Trees
|
||||
RemoveBuildingForPlayer(playerid, 727, -1823.8359, 1323.6484, 6.1953, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 727, -1784.4141, 1323.5625, 6.1953, 0.25);
|
||||
|
||||
// TDK HQ
|
||||
RemoveBuildingForPlayer(playerid, 6937, 2572.2422, 2703.9609, 19.0234, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7038, 2527.8203, 2703.9609, 10.8203, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7169, 2514.5859, 2822.9531, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7170, 2706.4531, 2762.9141, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7201, 2615.5000, 2740.6719, 85.7188, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7102, 2514.5859, 2822.9531, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 3474, 2523.9688, 2818.4922, 16.7422, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 6929, 2572.2422, 2703.9609, 19.0234, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7172, 2546.0313, 2828.7344, 11.5391, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7040, 2594.3750, 2680.0234, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7229, 2629.2188, 2742.9922, 14.8906, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 7104, 2706.4531, 2762.9141, 13.2500, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 961, 2564.9922, 2822.7500, 10.2109, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 960, 2564.9922, 2822.7500, 10.2031, 100.0);
|
||||
|
||||
// Sponyy Vehicle Dealership Hotdog
|
||||
RemoveBuildingForPlayer(playerid, 1341, -2385.4119,-583.8800,132.1354, 5.0);
|
||||
|
||||
// Gal Remove Building
|
||||
RemoveBuildingForPlayer(playerid, 11428, -730.7109, 1544.4922, 43.1719, 0.25);
|
||||
|
||||
// Cake City Home
|
||||
RemoveBuildingForPlayer(playerid, 9968, -1683.1406, 786.0938, 38.8203, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10057, -1669.2188, 723.4688, 57.5469, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10049, -1683.1406, 786.0938, 38.8203, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10040, -1765.7422, 799.9453, 53.2266, 0.25);
|
||||
|
||||
// Zach's Drug Business
|
||||
RemoveBuildingForPlayer(playerid, 5171, 2124.9453, -2275.4531, 20.1406, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 3577, 2131.3281, -2274.6484, 16.0156, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 3631, 2149.1406, -2266.9063, 12.8750, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 5260, 2161.3438, -2264.9141, 14.0156, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 3633, 2142.9141, -2256.3359, 13.9297, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 3632, 2144.2969, -2258.1484, 13.9297, 100.0);
|
||||
RemoveBuildingForPlayer(playerid, 5262, 2152.7109, -2256.7813, 15.2109, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 5261, 2152.2578, -2239.4609, 14.5000, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 5269, 2146.3750, -2248.7969, 14.6172, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 5132, 2163.2891, -2251.6094, 14.1406, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 5259, 2168.8438, -2246.7813, 13.9375, 0.25);
|
||||
|
||||
// Hydrogen City Hall Map
|
||||
RemoveBuildingForPlayer(playerid, 10522, -2637.4141, 376.0391, 15.8984, 0.25);
|
||||
RemoveBuildingForPlayer(playerid, 10381, -2637.4141, 376.0391, 15.8984, 0.25);
|
||||
}
|
5308
gamemodes/irresistible/cnr/static/server_objects.pwn
Normal file
5308
gamemodes/irresistible/cnr/static/server_objects.pwn
Normal file
File diff suppressed because it is too large
Load Diff
1319
gamemodes/irresistible/cnr/static/server_vehicles.pwn
Normal file
1319
gamemodes/irresistible/cnr/static/server_vehicles.pwn
Normal file
File diff suppressed because it is too large
Load Diff
546
gamemodes/irresistible/cnr/vip.pwn
Normal file
546
gamemodes/irresistible/cnr/vip.pwn
Normal file
@ -0,0 +1,546 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: vip.inc
|
||||
* Purpose: vip associated information
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Macros ** */
|
||||
#define GetPlayerIrresistibleCoins(%0) \
|
||||
(p_IrresistibleCoins[%0])
|
||||
|
||||
#define GivePlayerIrresistibleCoins(%0,%1) \
|
||||
(p_IrresistibleCoins[%0] += %1)
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_EXTRA_SLOTS 5
|
||||
|
||||
#define ICM_PAGE_DEFAULT ( 0 )
|
||||
#define ICM_PAGE_CASHCARD ( 1 )
|
||||
#define ICM_PAGE_ASSETS ( 2 )
|
||||
#define ICM_PAGE_UPGRADE ( 3 )
|
||||
|
||||
#define VIP_REGULAR ( 1 )
|
||||
#define VIP_BRONZE ( 2 )
|
||||
#define VIP_GOLD ( 3 )
|
||||
#define VIP_PLATINUM ( 4 )
|
||||
#define VIP_DIAMOND ( 5 )
|
||||
|
||||
#define ICM_COKE_BIZ ( 0 )
|
||||
#define ICM_METH_BIZ ( 1 )
|
||||
#define ICM_WEED_BIZ ( 2 )
|
||||
#define ICM_HOUSE ( 3 )
|
||||
#define ICM_VEHICLE ( 4 )
|
||||
#define ICM_GATE ( 5 )
|
||||
#define ICM_GARAGE ( 6 )
|
||||
#define ICM_NAME ( 7 )
|
||||
#define ICM_VEH_SLOT ( 8 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_IC_MARKET_DATA
|
||||
{
|
||||
E_ID, E_NAME[ 19 ], Float: E_PRICE,
|
||||
bool: E_MULTI_BUY,
|
||||
};
|
||||
|
||||
new
|
||||
g_irresistibleVipItems [ ] [ E_IC_MARKET_DATA ] =
|
||||
{
|
||||
{ VIP_GOLD, "Gold V.I.P", 2000.0 },
|
||||
{ VIP_BRONZE, "Bronze V.I.P", 1000.0 },
|
||||
{ VIP_REGULAR, "Regular V.I.P", 500.0 }
|
||||
},
|
||||
g_irreisistibleCashCards [ ] [ E_IC_MARKET_DATA ] =
|
||||
{
|
||||
{ 1250000, "Tiger Shark", 250.0 },
|
||||
{ 2750000, "Bull Shark", 500.0 },
|
||||
{ 6000000, "Great White Shark", 1000.0 },
|
||||
{ 10000000, "Whale Shark", 1500.0 },
|
||||
{ 20000000, "Megalodon Shark", 2500.0 }
|
||||
},
|
||||
g_irresistibleMarketItems [ ] [ E_IC_MARKET_DATA ] =
|
||||
{
|
||||
{ ICM_COKE_BIZ, "Gang Facility", 5000.0 },
|
||||
{ ICM_COKE_BIZ, "Bunker Business", 4500.0 },
|
||||
{ ICM_COKE_BIZ, "Coke Business", 1500.0 },
|
||||
{ ICM_METH_BIZ, "Meth Business", 700.0 },
|
||||
{ ICM_VEHICLE, "Vehicle", 500.0 },
|
||||
{ ICM_HOUSE, "House", 500.0 },
|
||||
{ ICM_WEED_BIZ, "Weed Business", 500.0 },
|
||||
{ ICM_GATE, "Custom Gate", 350.0 },
|
||||
{ ICM_GARAGE, "Garage", 250.0 },
|
||||
{ ICM_VEH_SLOT, "Extra Vehicle Slot", 350.0 },
|
||||
{ ICM_NAME, "Change Your Name", 50.0 }
|
||||
},
|
||||
p_CoinMarketPage [ MAX_PLAYERS char ],
|
||||
p_CoinMarketSelectedItem [ MAX_PLAYERS char ],
|
||||
|
||||
Float: p_IrresistibleCoins [ MAX_PLAYERS ],
|
||||
p_ExtraAssetSlots [ MAX_PLAYERS char ]
|
||||
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_IC_MARKET && response )
|
||||
{
|
||||
new current_vip = GetPlayerVIPLevel( playerid );
|
||||
new Float: days_left = float( GetPlayerVIPDuration( playerid ) ) / 86400.0;
|
||||
|
||||
if ( listitem == sizeof( g_irresistibleVipItems ) )
|
||||
{
|
||||
if ( current_vip >= VIP_REGULAR && current_vip < VIP_GOLD && days_left >= 3.0 )
|
||||
{
|
||||
new
|
||||
iCoinRequirement = floatround( g_irresistibleVipItems[ sizeof( g_irresistibleVipItems ) - current_vip ] [ E_PRICE ] * GetGVarFloat( "vip_discount" ) * ( days_left / 30.0 ), floatround_ceil );
|
||||
|
||||
p_CoinMarketPage{ playerid } = ICM_PAGE_UPGRADE;
|
||||
return ShowPlayerDialog( playerid, DIALOG_YOU_SURE_VIP, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Irresistible Coin -{FFFFFF} Confirmation", sprintf( ""COL_WHITE"Are you sure that you want to spend %s IC?", number_format( iCoinRequirement, .prefix = '\0', .decimals = 2 ) ), "Yes", "No" );
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError( playerid, "Upgrading your V.I.P is currently unavailable." );
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
}
|
||||
else if ( listitem == sizeof( g_irresistibleVipItems ) + 1 ) {
|
||||
return ShowPlayerCoinMarketDialog( playerid, ICM_PAGE_CASHCARD );
|
||||
}
|
||||
else if ( listitem > sizeof( g_irresistibleVipItems ) + 1 ) {
|
||||
return ShowPlayerCoinMarketDialog( playerid, ICM_PAGE_ASSETS );
|
||||
}
|
||||
else {
|
||||
new Float: iCoinRequirement = g_irresistibleVipItems[ listitem ] [ E_PRICE ] * GetGVarFloat( "vip_discount" );
|
||||
new selected_vip = g_irresistibleVipItems[ listitem ] [ E_ID ];
|
||||
|
||||
if ( current_vip > VIP_GOLD ) {
|
||||
current_vip = VIP_GOLD;
|
||||
}
|
||||
|
||||
if ( current_vip != 0 && current_vip != selected_vip ) {
|
||||
if ( current_vip > selected_vip ) {
|
||||
SendError( playerid, "You must wait until your V.I.P is expired in order to downgrade it." );
|
||||
} else {
|
||||
SendError( playerid, "You must upgrade your current V.I.P level first." );
|
||||
}
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
|
||||
p_CoinMarketPage{ playerid } = ICM_PAGE_DEFAULT;
|
||||
p_CoinMarketSelectedItem{ playerid } = listitem;
|
||||
return ShowPlayerDialog( playerid, DIALOG_YOU_SURE_VIP, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Irresistible Coin -{FFFFFF} Confirmation", sprintf( ""COL_WHITE"Are you sure that you want to spend %s IC?", number_format( iCoinRequirement, .prefix = '\0', .decimals = 2 ) ), "Yes", "No" );
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_IC_MARKET_2 || dialogid == DIALOG_IC_MARKET_3 )
|
||||
{
|
||||
if ( ! response )
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
|
||||
new Float: iCoinRequirement = GetGVarFloat( "vip_discount" );
|
||||
|
||||
// assets
|
||||
if ( dialogid == DIALOG_IC_MARKET_2 ) {
|
||||
iCoinRequirement *= g_irresistibleMarketItems[ listitem ] [ E_PRICE ];
|
||||
}
|
||||
// cash cards
|
||||
else if ( dialogid == DIALOG_IC_MARKET_3 ) {
|
||||
iCoinRequirement *= g_irreisistibleCashCards[ listitem ] [ E_PRICE ];
|
||||
}
|
||||
|
||||
p_CoinMarketPage{ playerid } = ( dialogid == DIALOG_IC_MARKET_3 ) ? ICM_PAGE_CASHCARD : ICM_PAGE_ASSETS;
|
||||
p_CoinMarketSelectedItem{ playerid } = listitem;
|
||||
return ShowPlayerDialog( playerid, DIALOG_YOU_SURE_VIP, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Irresistible Coin -{FFFFFF} Confirmation", sprintf( ""COL_WHITE"Are you sure that you want to spend %s IC?", number_format( iCoinRequirement, .prefix = '\0', .decimals = 2 ) ), "Yes", "No" );
|
||||
}
|
||||
else if ( dialogid == DIALOG_YOU_SURE_VIP )
|
||||
{
|
||||
if ( !response )
|
||||
return ShowPlayerCoinMarketDialog( playerid, p_CoinMarketPage{ playerid } );
|
||||
|
||||
new current_vip = GetPlayerVIPLevel( playerid );
|
||||
new Float: player_coins = GetPlayerIrresistibleCoins( playerid );
|
||||
new Float: days_left = float( GetPlayerVIPDuration( playerid ) ) / 86400.0;
|
||||
|
||||
// restore listitem of whatever player selected
|
||||
listitem = p_CoinMarketSelectedItem{ playerid };
|
||||
|
||||
// upgrade player vip
|
||||
if ( p_CoinMarketPage{ playerid } == ICM_PAGE_UPGRADE )
|
||||
{
|
||||
if ( current_vip >= VIP_REGULAR && current_vip < VIP_GOLD && days_left >= 3.0 )
|
||||
{
|
||||
new new_vip_item = sizeof( g_irresistibleVipItems ) - current_vip;
|
||||
new Float: iCoinRequirement = floatround( g_irresistibleVipItems[ new_vip_item ] [ E_PRICE ] * GetGVarFloat( "vip_discount" ) * ( days_left / 30.0 ), floatround_ceil );
|
||||
|
||||
if ( player_coins < iCoinRequirement ) {
|
||||
SendError( playerid, "You need around %s coins before you can upgrade your V.I.P!", number_format( iCoinRequirement - player_coins, .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, p_CoinMarketPage{ playerid } );
|
||||
}
|
||||
|
||||
// lower = higher the rank from the array
|
||||
new_vip_item --;
|
||||
|
||||
if ( 0 <= new_vip_item < sizeof( g_irresistibleVipItems ) )
|
||||
{
|
||||
// set level no interval, deduct and notify
|
||||
SetPlayerVipLevel( playerid, g_irresistibleVipItems[ new_vip_item ] [ E_ID ], .interval = 0 );
|
||||
GivePlayerIrresistibleCoins( playerid, -iCoinRequirement );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GOLD"[VIP PACKAGE]"COL_WHITE" You have upgraded to %s for %s Irresistible Coins!", g_irresistibleVipItems[ new_vip_item ] [ E_NAME ], number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError( playerid, "There seemed to be an error while upgrading your V.I.P, please contact Lorenc." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError( playerid, "Upgrading your V.I.P is currently unavailable." );
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
}
|
||||
|
||||
// default page
|
||||
else if ( p_CoinMarketPage{ playerid } == ICM_PAGE_DEFAULT )
|
||||
{
|
||||
new Float: iCoinRequirement = g_irresistibleVipItems[ listitem ] [ E_PRICE ] * GetGVarFloat( "vip_discount" );
|
||||
new selected_vip = g_irresistibleVipItems[ listitem ] [ E_ID ];
|
||||
|
||||
if ( current_vip > VIP_GOLD ) {
|
||||
current_vip = VIP_GOLD;
|
||||
}
|
||||
|
||||
if ( current_vip != 0 && current_vip != selected_vip ) {
|
||||
if ( current_vip > selected_vip ) {
|
||||
SendError( playerid, "You must wait until your V.I.P is expired in order to downgrade it." );
|
||||
} else {
|
||||
SendError( playerid, "You must upgrade your current V.I.P level first." );
|
||||
}
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
|
||||
if ( player_coins < iCoinRequirement ) {
|
||||
SendError( playerid, "You need around %s coins before you can get this V.I.P!", number_format( iCoinRequirement - player_coins, .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, p_CoinMarketPage{ playerid } );
|
||||
}
|
||||
|
||||
// Deduct IC
|
||||
GivePlayerIrresistibleCoins( playerid, -iCoinRequirement );
|
||||
|
||||
// Set VIP Level
|
||||
SetPlayerVipLevel( playerid, selected_vip );
|
||||
|
||||
// Send message
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GOLD"[VIP PACKAGE]"COL_WHITE" You have redeemed %s V.I.P for %s Irresistible Coins! Congratulations! :D", VIPToString( selected_vip ), number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
|
||||
// Redirect player
|
||||
ShowPlayerVipRedeemedDialog( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
// buy cash cards
|
||||
else if ( p_CoinMarketPage{ playerid } == ICM_PAGE_CASHCARD )
|
||||
{
|
||||
new Float: iCoinRequirement = g_irreisistibleCashCards[ listitem ] [ E_PRICE ] * GetGVarFloat( "vip_discount" );
|
||||
|
||||
if ( player_coins < iCoinRequirement ) {
|
||||
SendError( playerid, "You need around %s coins before you can get this!", number_format( iCoinRequirement - player_coins, .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, p_CoinMarketPage{ playerid } );
|
||||
}
|
||||
|
||||
new cash_amount = g_irreisistibleCashCards[ listitem ] [ E_ID ];
|
||||
|
||||
GivePlayerCash( playerid, cash_amount );
|
||||
GivePlayerIrresistibleCoins( playerid, -iCoinRequirement );
|
||||
SendServerMessage( playerid, "You have ordered a "COL_GREEN"%s Cash Card (%s)"COL_WHITE" for %s Irresistible Coins!", g_irreisistibleCashCards[ listitem ] [ E_NAME ], number_format( cash_amount ), number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
ShowPlayerHelpDialog( playerid, 10000, "You have bought a ~g~%s~w~ %s Cash Card!", number_format( cash_amount ), g_irreisistibleCashCards[ listitem ] [ E_NAME ] );
|
||||
}
|
||||
|
||||
// all other market items
|
||||
else
|
||||
{
|
||||
new Float: iCoinRequirement = g_irresistibleMarketItems[ listitem ] [ E_PRICE ] * GetGVarFloat( "vip_discount" );
|
||||
|
||||
if ( player_coins < iCoinRequirement ) {
|
||||
SendError( playerid, "You need around %s coins before you can get this!", number_format( iCoinRequirement - player_coins, .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, p_CoinMarketPage{ playerid } );
|
||||
}
|
||||
|
||||
new selectedItemID = g_irresistibleMarketItems[ listitem ] [ E_ID ];
|
||||
|
||||
// show new name dialog before charging
|
||||
if ( selectedItemID == ICM_NAME ) {
|
||||
ShowPlayerDialog( playerid, DIALOG_CHANGENAME, DIALOG_STYLE_INPUT, "Change your name", ""COL_WHITE"What would you like your new name to be? And also, double check!", "Change", "Back" );
|
||||
}
|
||||
else if ( selectedItemID == ICM_VEH_SLOT ) {
|
||||
if ( p_ExtraAssetSlots{ playerid } >= MAX_EXTRA_SLOTS ) {
|
||||
SendError( playerid, "You have reached the limit of additional slots (limit " #MAX_EXTRA_SLOTS ")." );
|
||||
return ShowPlayerCoinMarketDialog( playerid, ICM_PAGE_ASSETS );
|
||||
}
|
||||
|
||||
p_ExtraAssetSlots{ playerid } ++;
|
||||
GivePlayerIrresistibleCoins( playerid, -iCoinRequirement );
|
||||
SendServerMessage( playerid, "You have redeemed an "COL_GOLD"vehicle slot"COL_WHITE" for %s Irresistible Coins!", number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
AddPlayerNote( playerid, -1, sprintf( "Bought veh extra slot, has %d extra", p_ExtraAssetSlots{ playerid } ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
GivePlayerIrresistibleCoins( playerid, -iCoinRequirement );
|
||||
AddPlayerNote( playerid, -1, sprintf( ""COL_GOLD"%s" #COL_WHITE, g_irresistibleMarketItems[ listitem ] [ E_NAME ] ) );
|
||||
SendClientMessageToAdmins( -1, ""COL_PINK"[DONOR NEEDS HELP]"COL_GREY" %s(%d) needs a %s. (/viewnotes)", ReturnPlayerName( playerid ), playerid, g_irresistibleMarketItems[ listitem ] [ E_NAME ] );
|
||||
SendServerMessage( playerid, "You have ordered a "COL_GOLD"%s"COL_WHITE" for %s Irresistible Coins!", g_irresistibleMarketItems[ listitem ] [ E_NAME ], number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
SendServerMessage( playerid, "Online admins have been notified of your purchase. Use "COL_GREY"/notes"COL_WHITE" to track your orders and to remind online admins." );
|
||||
ShowPlayerHelpDialog( playerid, 10000, "You can use ~y~/notes~w~ to track your orders.~n~~n~Also, admins can be called using this command." );
|
||||
}
|
||||
|
||||
/*case 8:
|
||||
{
|
||||
if ( ( iCoinRequirement = 100.0 * GetGVarFloat( "vip_discount" ) ) <= p_IrresistibleCoins[ playerid ] )
|
||||
{
|
||||
new
|
||||
ownerid = INVALID_PLAYER_ID,
|
||||
vehicleid = GetPlayerVehicleID( playerid ),
|
||||
buyableid = getVehicleSlotFromID( vehicleid, ownerid ),
|
||||
modelid = GetVehicleModel( vehicleid )
|
||||
;
|
||||
|
||||
if ( !vehicleid ) SendError( playerid, "You need to be in a vehicle to use this command." );
|
||||
else if ( buyableid == -1 ) SendError( playerid, "This vehicle isn't a buyable vehicle." );
|
||||
else if ( playerid != ownerid ) SendError( playerid, "You are not the owner of this vehicle." );
|
||||
else if ( IsBoatVehicle( modelid ) || IsAirVehicle( modelid ) ) SendError( playerid, "You cannot apply gold rims to this type of vehicle." );
|
||||
else
|
||||
{
|
||||
if ( AddVehicleComponent( vehicleid, 1080 ) )
|
||||
{
|
||||
if ( UpdateBuyableVehicleMods( playerid, buyableid ) )
|
||||
{
|
||||
new
|
||||
szMods[ MAX_CAR_MODS * 10 ];
|
||||
|
||||
for( new i; i < MAX_CAR_MODS; i++ )
|
||||
format( szMods, sizeof( szMods ), "%s%d.", szMods, g_vehicleModifications[ playerid ] [ buyableid ] [ i ] );
|
||||
|
||||
format( szBigString, sizeof( szBigString ), "UPDATE `VEHICLES` SET `MODS`='%s' WHERE `ID`=%d", szMods, g_vehicleData[ playerid ] [ buyableid ] [ E_SQL_ID ] );
|
||||
mysql_single_query( szBigString );
|
||||
}
|
||||
|
||||
p_IrresistibleCoins[ playerid ] -= iCoinRequirement;
|
||||
SendServerMessage( playerid, "You have redeemed "COL_GOLD"Gold Rims"COL_WHITE" on your vehicle for %s Irresistible Coins!", number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
|
||||
// Receipt
|
||||
AddPlayerNote( playerid, -1, sprintf( "Bought gold rims on vehicle #%d", g_vehicleData[ playerid ] [ buyableid ] [ E_SQL_ID ] ) );
|
||||
}
|
||||
else SendError( playerid, "We were unable to place gold rims on this vehicle (0xF92D)." );
|
||||
}
|
||||
return ShowPlayerCoinMarketDialog( playerid, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
SendError( playerid, "You need around %s coins before you can get this!", number_format( iCoinRequirement - p_IrresistibleCoins[ playerid ], .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, true );
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_CHANGENAME )
|
||||
{
|
||||
if ( !response )
|
||||
return ShowPlayerCoinMarketDialog( playerid, ICM_PAGE_ASSETS );
|
||||
|
||||
new selected_item = p_CoinMarketSelectedItem{ playerid };
|
||||
|
||||
if ( ! ( 0 <= selected_item < sizeof( g_irresistibleMarketItems ) && g_irresistibleMarketItems[ selected_item ] [ E_ID ] == ICM_NAME ) ) {
|
||||
return SendError( playerid, "Invalid option selected, please try again." );
|
||||
}
|
||||
|
||||
new Float: iCoinRequirement = g_irresistibleMarketItems[ selected_item ] [ E_PRICE ] * GetGVarFloat( "vip_discount" );
|
||||
new Float: player_coins = GetPlayerIrresistibleCoins( playerid );
|
||||
|
||||
if ( player_coins < iCoinRequirement ) {
|
||||
SendError( playerid, "You need around %s coins before you can get this!", number_format( iCoinRequirement - player_coins, .prefix = '\0', .decimals = 2 ) );
|
||||
return ShowPlayerCoinMarketDialog( playerid, ICM_PAGE_ASSETS );
|
||||
}
|
||||
|
||||
new szName[ 20 ];
|
||||
|
||||
if ( sscanf( inputtext, "s[20]", szName ) ) SendError( playerid, "The name you have input is considered invalid." );
|
||||
else if ( !isValidPlayerName( szName ) ) SendError( playerid, "This name consists of invalid characters." );
|
||||
else {
|
||||
return mysql_function_query( dbHandle, sprintf( "SELECT `NAME` FROM `BANS` WHERE `NAME`='%s'", mysql_escape( szName ) ), true, "OnNewNameCheckBanned", "dfs", playerid, iCoinRequirement, szName );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_CHANGENAME, DIALOG_STYLE_INPUT, "Change your name", ""COL_WHITE"What would you like your new name to be? And also, double check!", "Change", "Back" );
|
||||
}
|
||||
else if ( dialogid == DIALOG_BUY_VIP && response )
|
||||
{
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:donate( playerid, params[ ] ) return cmd_vip( playerid, params );
|
||||
CMD:vip( playerid, params[ ] )
|
||||
{
|
||||
static
|
||||
vip_description[ 1100 ];
|
||||
|
||||
if ( vip_description[ 0 ] == '\0' ) {
|
||||
vip_description = " \t"COL_WHITE"Regular VIP\t"COL_BRONZE"Bronze VIP\t"COL_GOLD"Gold V.I.P\n";
|
||||
strcat( vip_description, ""COL_GREEN"Price (USD)\t"COL_WHITE"$5.00 /mo\t"COL_BRONZE"$10.00 /mo\t"COL_GOLD"$20.00 /mo\n" );
|
||||
strcat( vip_description, "Total house slots\t5\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total garage slots*\t5\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total business slots\t5\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total vehicle slots\t5\t10\t20\n" );
|
||||
strcat( vip_description, "Weapons on spawn\t1\t2\t3\n" );
|
||||
strcat( vip_description, "Armour on spawn\t0%\t100%\t100%\n" );
|
||||
strcat( vip_description, "Coin generation increase\t0%\t10%\t25%\n" );
|
||||
strcat( vip_description, "Ability to transfer coins P2P\tN\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to use two jobs (/vipjob)\tN\tN\tY\n" );
|
||||
strcat( vip_description, "Tax reduction\t0%\t0%\t50%\n" );
|
||||
strcat( vip_description, "Inactive asset protection\t14\t14\t30\n" );
|
||||
strcat( vip_description, "Total Vehicle component editing slots\t4\t6\t10\n" );
|
||||
strcat( vip_description, "Furniture slots available\t30\t40\t50\n" );
|
||||
strcat( vip_description, "V.I.P Lounge Weapon Redeeming Cooldown\t5 min\t1 min\tnone\n" );
|
||||
strcat( vip_description, "V.I.P Tag On Forum\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P chat\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P lounge\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Can spawn with a specific skin\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P toys\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Access to custom gang colors (/gangcolor)\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Access to extra house weapon storage slots\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Can play custom radio URLs (/radio)\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to adjust your label's color (/labelcolor)\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Can show a message to people you kill (/deathmsg)\tY\tY\tY\n" );
|
||||
strcat( vip_description, "Can adjust the sound of your hitmarker (/hitmarker)\tY\tY\tY" );
|
||||
}
|
||||
ShowPlayerDialog( playerid, DIALOG_BUY_VIP, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Donate for V.I.P", vip_description, "Buy Now", "Close" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock ShowPlayerCoinMarketDialog( playerid, page = ICM_PAGE_DEFAULT )
|
||||
{
|
||||
// if ( p_accountSecurityData[ playerid ] [ E_ID ] && ! p_accountSecurityData[ playerid ] [ E_VERIFIED ] && p_accountSecurityData[ playerid ] [ E_MODE ] != SECURITY_MODE_DISABLED )
|
||||
// return SendError( playerid, "You must be verified in order to use this feature. "COL_YELLOW"(use /verify)" );
|
||||
|
||||
new Float: discount = GetGVarFloat( "vip_discount" );
|
||||
new szMarket[ 512 ] = ""COL_GREY"Item Name\t"COL_GREY"Coins Needed\n";
|
||||
|
||||
if ( page == ICM_PAGE_DEFAULT )
|
||||
{
|
||||
new current_vip = GetPlayerVIPLevel( playerid );
|
||||
new Float: days_left = float( GetPlayerVIPDuration( playerid ) ) / 86400.0;
|
||||
|
||||
if ( current_vip > VIP_GOLD ) {
|
||||
current_vip = VIP_GOLD;
|
||||
}
|
||||
|
||||
for( new i = 0; i < sizeof( g_irresistibleVipItems ); i++ )
|
||||
{
|
||||
new Float: iCoinRequirement = g_irresistibleVipItems[ i ] [ E_PRICE ] * discount;
|
||||
|
||||
if ( current_vip != 0 && current_vip != g_irresistibleVipItems[ i ] [ E_ID ] ) {
|
||||
format( szMarket, sizeof( szMarket ), "%s{333333}%s\t{333333}%s\n", szMarket, g_irresistibleVipItems[ i ] [ E_NAME ], number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
} else {
|
||||
format( szMarket, sizeof( szMarket ), "%s%s\t"COL_GOLD"%s\n", szMarket, g_irresistibleVipItems[ i ] [ E_NAME ], number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
// upgrade vip
|
||||
if ( current_vip >= VIP_REGULAR && current_vip < VIP_GOLD && days_left >= 3.0 )
|
||||
{
|
||||
new iCoinRequirement = floatround( g_irresistibleVipItems[ sizeof( g_irresistibleVipItems ) - current_vip ] [ E_PRICE ] * discount * ( days_left / 30.0 ), floatround_ceil );
|
||||
format( szMarket, sizeof( szMarket ), "%sUpgrade V.I.P\t"COL_GOLD"%s\n", szMarket, number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
}
|
||||
else strcat( szMarket, "{333333}Upgrade V.I.P\t{333333}Unavailable\n" );
|
||||
|
||||
// thats it
|
||||
strcat( szMarket, ""COL_GREEN"Buy shark cards...\t"COL_GREEN">>>\n" );
|
||||
strcat( szMarket, ""COL_GREY"See other items...\t"COL_GREY">>>" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -{FFFFFF} Market", szMarket, "Select", "" );
|
||||
}
|
||||
else if ( page == ICM_PAGE_CASHCARD )
|
||||
{
|
||||
szMarket = ""COL_GREY"Cash Card\t"COL_GREY"Amount ($)\t"COL_GREY"Coins Needed\n";
|
||||
|
||||
for( new i = 0; i < sizeof( g_irreisistibleCashCards ); i++ )
|
||||
{
|
||||
new iCoinRequirement = floatround( g_irreisistibleCashCards[ i ] [ E_PRICE ] * discount );
|
||||
format( szMarket, sizeof( szMarket ), "%s%s\t"COL_GREEN"%s\t"COL_GOLD"%s\n", szMarket, g_irreisistibleCashCards[ i ] [ E_NAME ], number_format( g_irreisistibleCashCards[ i ] [ E_ID ] ), number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_3, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -{FFFFFF} Cash Cards", szMarket, "Select", "Back" );
|
||||
}
|
||||
else
|
||||
{
|
||||
for( new i = 0; i < sizeof( g_irresistibleMarketItems ); i++ )
|
||||
{
|
||||
new
|
||||
iCoinRequirement = floatround( g_irresistibleMarketItems[ i ] [ E_PRICE ] * discount );
|
||||
|
||||
format( szMarket, sizeof( szMarket ), "%s%s\t"COL_GOLD"%s\n", szMarket, g_irresistibleMarketItems[ i ] [ E_NAME ], number_format( iCoinRequirement, .prefix = '\0', .decimals = 0 ) );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_2, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -{FFFFFF} Asset Market", szMarket, "Select", "Back" );
|
||||
}
|
||||
}
|
||||
|
||||
stock GetPlayerHouseSlots( playerid )
|
||||
{
|
||||
new vip_level = GetPlayerVIPLevel( playerid );
|
||||
new slots = 3;
|
||||
|
||||
switch( vip_level )
|
||||
{
|
||||
case VIP_GOLD, VIP_PLATINUM, VIP_DIAMOND:
|
||||
slots = 255; // 99 infinite
|
||||
|
||||
case VIP_BRONZE:
|
||||
slots = 10;
|
||||
|
||||
case VIP_REGULAR:
|
||||
slots = 5;
|
||||
}
|
||||
return slots; // + p_ExtraAssetSlots{ playerid };
|
||||
}
|
||||
|
||||
stock GetPlayerBusinessSlots( playerid ) return GetPlayerHouseSlots( playerid );
|
||||
stock GetPlayerGarageSlots( playerid ) return GetPlayerHouseSlots( playerid );
|
||||
|
||||
stock GetPlayerVehicleSlots( playerid )
|
||||
{
|
||||
static const
|
||||
slots[ 4 ] = { 3, 5, 10, 20 };
|
||||
|
||||
new vip_level = GetPlayerVIPLevel( playerid );
|
||||
|
||||
return slots[ ( vip_level > VIP_GOLD ? VIP_GOLD : vip_level ) ] + p_ExtraAssetSlots{ playerid };
|
||||
}
|
||||
|
||||
stock GetPlayerPimpVehicleSlots( playerid )
|
||||
{
|
||||
static const
|
||||
slots[ 4 ] = { 3, 4, 6, 10 };
|
||||
|
||||
new vip_level = GetPlayerVIPLevel( playerid );
|
||||
|
||||
return slots[ ( vip_level > VIP_GOLD ? VIP_GOLD : vip_level ) ];
|
||||
}
|
||||
|
||||
stock VIPToString( viplvl )
|
||||
{
|
||||
static
|
||||
string[ 16 ];
|
||||
|
||||
switch( viplvl )
|
||||
{
|
||||
case VIP_DIAMOND: string = "Legacy Diamond";
|
||||
case VIP_PLATINUM: string = "Legacy Platinum";
|
||||
case VIP_GOLD: string = "Gold";
|
||||
case VIP_BRONZE: string = "Bronze";
|
||||
case VIP_REGULAR: string = "Regular";
|
||||
default: string = "N/A";
|
||||
}
|
||||
return string;
|
||||
}
|
143
gamemodes/irresistible/config/colors.pwn
Normal file
143
gamemodes/irresistible/config/colors.pwn
Normal file
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Simon Campbell, edited by Lorenc Pekaj
|
||||
* Module: colours.inc
|
||||
* Purpose: colors and its functions
|
||||
*/
|
||||
|
||||
/* ** Colours ** */
|
||||
#define COL_GREEN "{6EF83C}"
|
||||
#define COL_LGREEN "{91FA6B}"
|
||||
#define COL_RED "{F81414}"
|
||||
#define COL_BLUE "{00C0FF}"
|
||||
#define COL_LRED "{FFA1A1}"
|
||||
#define COL_GOLD "{FFDC2E}"
|
||||
#define COL_PLATINUM "{E0E0E0}"
|
||||
#define COL_DIAMOND "{4EE2EC}"
|
||||
#define COL_GREY "{C0C0C0}"
|
||||
#define COL_PINK "{FF0770}"
|
||||
#define COL_WHITE "{FFFFFF}"
|
||||
#define COL_ORANGE "{FF7500}"
|
||||
#define COL_GANG "{009999}"
|
||||
#define COL_YELLOW "{FFFF00}"
|
||||
#define COL_BLACK "{333333}"
|
||||
#define COL_BRONZE "{CD7F32}"
|
||||
#define COLOR_GANGZONE 0x00000080
|
||||
#define COLOR_RDMZONES 0x00CC0010
|
||||
#define COLOR_GREEN 0x00CC00FF
|
||||
#define COLOR_RED 0xFF0000FF
|
||||
#define COLOR_BLUE 0x00C0FFFF
|
||||
#define COLOR_YELLOW 0xFFFF00FF
|
||||
#define COLOR_ORANGE 0xEE9911FF
|
||||
#define COLOR_POLICE 0x3E7EFF70
|
||||
#define COLOR_GREY 0xC0C0C0FF
|
||||
#define COLOR_WHITE 0xFFFFFFFF
|
||||
#define COLOR_PINK 0xFF0770FF
|
||||
#define COLOR_GOLD 0xFFDC2EFF
|
||||
#define COLOR_DEFAULT 0xFFFFFF70
|
||||
#define COLOR_WANTED2 0xFFEC41E2
|
||||
#define COLOR_WANTED6 0xFF9233FF
|
||||
#define COLOR_WANTED12 0xF83245FF
|
||||
#define COLOR_FBI 0x0035FF70
|
||||
#define COLOR_ARMY 0x954BFF70
|
||||
#define COLOR_CIA 0x19197000
|
||||
#define COLOR_FIREMAN 0xA8343470
|
||||
#define COLOR_MEDIC 0x00FF8070
|
||||
#define COLOR_CONNECT 0x22BB22AA
|
||||
#define COLOR_DISCONNECT 0xC0C0C0AA
|
||||
#define COLOR_TIMEOUT 0x990099AA
|
||||
#define COLOR_KICK 0xFFCC00AA
|
||||
|
||||
/* ** Functions ** */
|
||||
stock setRed( color, red ) // Set the red intensity on a colour.
|
||||
{
|
||||
if ( red > 0xFF )
|
||||
red = 0xFF;
|
||||
else if ( red < 0x00 )
|
||||
red = 0x00;
|
||||
|
||||
return ( color & 0x00FFFFFF ) | ( red << 24 );
|
||||
}
|
||||
|
||||
stock setGreen( color, green ) // Set the green intensity on a colour.
|
||||
{
|
||||
if ( green > 0xFF )
|
||||
green = 0xFF;
|
||||
else if ( green < 0x00 )
|
||||
green = 0x00;
|
||||
|
||||
return ( color & 0xFF00FFFF ) | ( green << 16 );
|
||||
}
|
||||
|
||||
stock setBlue( color, blue ) // Set the blue intensity on a colour.
|
||||
{
|
||||
if ( blue > 0xFF )
|
||||
blue = 0xFF;
|
||||
else if ( blue < 0x00 )
|
||||
blue = 0x00;
|
||||
|
||||
return ( color & 0xFFFF00FF ) | ( blue << 8 );
|
||||
}
|
||||
|
||||
stock setAlpha( color, alpha ) // Set the alpha intensity on a colour.
|
||||
{
|
||||
if ( alpha > 0xFF )
|
||||
alpha = 0xFF;
|
||||
else if ( alpha < 0x00 )
|
||||
alpha = 0x00;
|
||||
|
||||
return ( color & 0xFFFFFF00 ) | alpha;
|
||||
}
|
||||
|
||||
stock stripRed( color ) // Remove all red from a colour.
|
||||
return ( color ) & 0x00FFFFFF;
|
||||
|
||||
stock stripGreen( color ) // Remove all green from a colour.
|
||||
return ( color ) & 0xFF00FFFF;
|
||||
|
||||
stock stripBlue( color ) // Remove all blue from a colour.
|
||||
return ( color ) & 0xFFFF00FF;
|
||||
|
||||
stock stripAlpha( color ) // Remove all alpha from a colour.
|
||||
return ( color ) & 0xFFFFFF00;
|
||||
|
||||
stock fillRed( color ) // Fill all red in a colour.
|
||||
return ( color ) | 0xFF000000;
|
||||
|
||||
stock fillGreen( color ) // Fill all green in a colour.
|
||||
return ( color ) | 0x00FF0000;
|
||||
|
||||
stock fillBlue( color ) // Fill all blue in a colour.
|
||||
return ( color ) | 0x0000FF00;
|
||||
|
||||
stock fillAlpha( color ) // Fill all alpha in a colour.
|
||||
return ( color ) | 0x000000FF;
|
||||
|
||||
stock getRed( color ) // Get the intensity of red in a colour.
|
||||
return ( color >> 24 ) & 0x000000FF;
|
||||
|
||||
stock getGreen( color ) // Get the intensity of green in a colour.
|
||||
return ( color >> 16 ) & 0x000000FF;
|
||||
|
||||
stock getBlue( color ) // Get the intensity of blue in a colour.
|
||||
return ( color >> 8 ) & 0x000000FF;
|
||||
|
||||
stock getAlpha( color ) // Get the intensity of alpha in a colour.
|
||||
return ( color ) & 0x000000FF;
|
||||
|
||||
stock makeColor( red=0, green=0, blue=0, alpha=0 ) // Make a colour with the specified intensities.
|
||||
return ( setAlpha( setBlue( setGreen( setRed( 0x00000000, red ), green ), blue ), alpha ) );
|
||||
|
||||
stock setColor( color, red = -1, green = -1, blue = -1, alpha = -1 ) // Set the properties of a colour.
|
||||
{
|
||||
if ( red != -1 )
|
||||
color = setRed ( color, red );
|
||||
if ( green != -1 )
|
||||
color = setGreen ( color, green );
|
||||
if ( blue != -1 )
|
||||
color = setBlue ( color, blue );
|
||||
if ( alpha != -1 )
|
||||
color = setAlpha ( color, alpha );
|
||||
|
||||
return color;
|
||||
}
|
61
gamemodes/irresistible/config/database.pwn.sample
Normal file
61
gamemodes/irresistible/config/database.pwn.sample
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: settings.inc
|
||||
* Purpose: defines general server settings
|
||||
*/
|
||||
|
||||
// DUMP: mysqldump -u service -p{password} sa-mp > ~/dump01.sql
|
||||
// LOAD: zcat dump_2018-06-09.sql.gz | mysql -u service -p"{password}" sa-mp
|
||||
|
||||
/* ** MySQL Settings ** */
|
||||
#if !defined DEBUG_MODE
|
||||
#define MYSQL_HOST ""
|
||||
#define MYSQL_USER ""
|
||||
#define MYSQL_PASS ""
|
||||
#define MYSQL_DATABASE ""
|
||||
#else
|
||||
#define MYSQL_HOST "127.0.0.1"
|
||||
#define MYSQL_USER "root"
|
||||
#define MYSQL_PASS ""
|
||||
#define MYSQL_DATABASE "sa-mp"
|
||||
#endif
|
||||
|
||||
/* ** Error Checking ** */
|
||||
#if defined FILTERSCRIPT
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Variables ** */
|
||||
stock dbHandle;
|
||||
stock bool: serverLocked = false;
|
||||
|
||||
/* ** Variables ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// Attempt to connect to database
|
||||
if ( mysql_errno( ( dbHandle = mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASS ) ) ) ) {
|
||||
print( "[MYSQL]: Couldn't connect to MySQL database." ), serverLocked = true;
|
||||
} else {
|
||||
print( "[MYSQL]: Connection to database is successful." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnGameModeExit( )
|
||||
{
|
||||
mysql_close( );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid )
|
||||
{
|
||||
if ( serverLocked ) {
|
||||
SendClientMessage( playerid, 0xa9c4e4ff, "The server is locked due to false server configuration. Please wait for the operator." );
|
||||
return KickPlayerTimed( playerid ), 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
116
gamemodes/irresistible/features/ammunation.pwn
Normal file
116
gamemodes/irresistible/features/ammunation.pwn
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MENU_ASSAULT ( 0 )
|
||||
#define MENU_MELEE ( 1 )
|
||||
#define MENU_SUB_SMGS ( 2 )
|
||||
#define MENU_PISTOLS ( 3 )
|
||||
#define MENU_RIFLES ( 4 )
|
||||
#define MENU_SHOTGUNS ( 5 )
|
||||
#define MENU_THROWN ( 6 )
|
||||
#define MENU_ARMOR ( 7 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_WEAPONS_DATA
|
||||
{
|
||||
E_MENU, E_NAME[ 32 ], E_WEPID,
|
||||
E_AMMO, E_PRICE
|
||||
};
|
||||
|
||||
new
|
||||
g_AmmunitionCategory[ ] [ ] =
|
||||
{
|
||||
{ "Assault" }, { "Melee" }, { "Submachine Guns" }, { "Pistols" },
|
||||
{ "Rifles" }, { "Shotguns" }, { "Thrown" }, { "Special" }
|
||||
},
|
||||
g_AmmunationWeapons[ ][ E_WEAPONS_DATA ] =
|
||||
{
|
||||
{ MENU_MELEE, "Flowers", 14, 1, 75 },
|
||||
{ MENU_MELEE, "Shovel", 6, 1, 100 },
|
||||
{ MENU_MELEE, "Pool Cue", 7, 1, 125 },
|
||||
{ MENU_MELEE, "Golf Club", 2, 1, 125 },
|
||||
{ MENU_MELEE, "Baseball Bat", 5, 1, 180 },
|
||||
{ MENU_MELEE, "Brass Knuckles", 1, 1, 200 },
|
||||
{ MENU_MELEE, "Parachute", 46, 1, 200 },
|
||||
{ MENU_MELEE, "Camera", 43, 1, 250 },
|
||||
{ MENU_MELEE, "Knife", 4, 1, 300 },
|
||||
{ MENU_MELEE, "Katana", 8, 1, 600 },
|
||||
{ MENU_MELEE, "Chainsaw", 9, 1, 750 },
|
||||
|
||||
{ MENU_PISTOLS, "9mm Pistol", 22, 180, 200 },
|
||||
{ MENU_PISTOLS, "Silenced 9mm", 23, 180, 400 },
|
||||
{ MENU_PISTOLS, "Desert Eagle", 24, 100, 1250 },
|
||||
|
||||
{ MENU_SHOTGUNS, "Shotgun", 25, 75, 600 },
|
||||
{ MENU_SHOTGUNS, "Sawn-off Shotgun", 26, 100, 1200 },
|
||||
{ MENU_SHOTGUNS, "Combat Shotgun", 27, 100, 1800 },
|
||||
|
||||
{ MENU_SUB_SMGS, "MP5", 29, 100, 500 },
|
||||
{ MENU_SUB_SMGS, "Tec 9", 32, 100, 600 },
|
||||
{ MENU_SUB_SMGS, "Mac 10", 28, 100, 700 },
|
||||
|
||||
{ MENU_ASSAULT, "AK47", 30, 100, 800 },
|
||||
{ MENU_ASSAULT, "M4", 31, 100, 1000 },
|
||||
|
||||
{ MENU_RIFLES, "Rifle", 33, 100, 300 },
|
||||
{ MENU_RIFLES, "Sniper", 34, 75, 1000 },
|
||||
|
||||
{ MENU_THROWN, "Teargas", 17, 5, 500 },
|
||||
{ MENU_THROWN, "Grenade", 16, 1, 1200 },
|
||||
{ MENU_THROWN, "Molotov Cocktail", 18, 4, 1400 },
|
||||
|
||||
{ MENU_ARMOR, "Armor", 101, 100, 12500 },
|
||||
{ MENU_ARMOR, "RPG", 35, 1, 10000 }
|
||||
},
|
||||
p_AmmunationMenu [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Functions ** */
|
||||
stock RedirectAmmunation( playerid, listitem, custom_title[ ] = "{FFFFFF}Ammu-Nation", custom_dialogid = DIALOG_AMMU_BUY, Float: custom_multplier = 1.0, ammo_multiplier = 1 )
|
||||
{
|
||||
new
|
||||
szString[ 420 ];
|
||||
|
||||
if ( listitem == MENU_ARMOR ) szString = ""COL_WHITE"Item\t"COL_WHITE"Price\n";
|
||||
else szString = ""COL_WHITE"Weapon\t"COL_WHITE"Ammo\t"COL_WHITE"Price\n";
|
||||
|
||||
for( new i; i < sizeof( g_AmmunationWeapons ); i++ ) if ( g_AmmunationWeapons[ i ] [ E_MENU ] == listitem )
|
||||
{
|
||||
if ( listitem != MENU_ARMOR ) { // Other multipliers will not specify ammo
|
||||
format( szString, sizeof( szString ), "%s%s\t%d\t", szString, g_AmmunationWeapons[ i ] [ E_NAME ], listitem == MENU_MELEE ? 1 : ( g_AmmunationWeapons[ i ] [ E_AMMO ] * ammo_multiplier ) );
|
||||
} else {
|
||||
format( szString, sizeof( szString ), "%s%s\t", szString, g_AmmunationWeapons[ i ] [ E_NAME ] );
|
||||
}
|
||||
|
||||
// check for free or not
|
||||
if ( custom_multplier > 0.0 ) {
|
||||
format( szString, sizeof( szString ), "%s"COL_GOLD"%s\n", szString, number_format( floatround( g_AmmunationWeapons[ i ] [ E_PRICE ] * custom_multplier ) ) );
|
||||
} else {
|
||||
strcat( szString, ""COL_GOLD"FREE\n" );
|
||||
}
|
||||
}
|
||||
ShowPlayerDialog( playerid, custom_dialogid, DIALOG_STYLE_TABLIST_HEADERS, custom_title, szString, "Purchase", "Back" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock ShowAmmunationMenu( playerid, custom_title[ ] = "{FFFFFF}Ammu-Nation", custom_dialogid = DIALOG_AMMU )
|
||||
{
|
||||
static
|
||||
szString[ 70 ];
|
||||
|
||||
if ( !szString[ 0 ] )
|
||||
{
|
||||
for( new i = 0; i < sizeof( g_AmmunitionCategory ); i++ ) {
|
||||
format( szString, sizeof( szString ), "%s%s\n", szString, g_AmmunitionCategory[ i ] );
|
||||
}
|
||||
}
|
||||
return ShowPlayerDialog( playerid, custom_dialogid, DIALOG_STYLE_LIST, custom_title, szString, "Select", "Cancel" );
|
||||
}
|
112
gamemodes/irresistible/features/cash_cards.pwn
Normal file
112
gamemodes/irresistible/features/cash_cards.pwn
Normal file
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cash_cards.inc
|
||||
* Purpose: enables players to redeem cash cards
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
#define DIALOG_CASH_CARD 28373
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:redeemcashcard( playerid, params[ ] ) return cmd_cashcard( playerid, params );
|
||||
CMD:cashcard( playerid, params[ ] )
|
||||
{
|
||||
if ( ! IsPlayerEmailVerified( playerid ) ) return SendError( playerid, "This feature is accessible only to players that have an "COL_GREY"/email"COL_WHITE" on their account." );
|
||||
ShowPlayerDialog( playerid, DIALOG_CASH_CARD, DIALOG_STYLE_INPUT, ""COL_GREEN"Redeem Cash Card", ""COL_WHITE"Redeem your cash card by entering the code down below:", "Redeem", "Cancel" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_CASH_CARD )
|
||||
{
|
||||
new
|
||||
cash_card[ 32 ];
|
||||
|
||||
if ( sscanf( inputtext, "s[32]", cash_card ) )
|
||||
{
|
||||
SendError( playerid, "Your cash card must be between 1 and 32 characters." );
|
||||
ShowPlayerDialog( playerid, DIALOG_CASH_CARD, DIALOG_STYLE_INPUT, ""COL_GREEN"Redeem Cash Card", ""COL_WHITE"Redeem your cash card by entering the code down below:\n\n"COL_RED"Your cash card code must be between 1 and 32 characters.", "Redeem", "Cancel" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
// search database
|
||||
mysql_format( dbHandle, szBigString, sizeof( szBigString ), "SELECT * FROM `CASH_CARDS` WHERE `CODE` = '%e'", cash_card );
|
||||
mysql_function_query( dbHandle, szBigString, true, "OnCheckCashCard", "d", playerid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
thread OnCheckCashCard( playerid )
|
||||
{
|
||||
new
|
||||
rows;
|
||||
|
||||
cache_get_data( rows, tmpVariable );
|
||||
|
||||
if ( ! rows )
|
||||
return SendError( playerid, "This cash card does not exist." ), 1;
|
||||
|
||||
new max_uses = cache_get_field_content_int( 0, "MAX_USES", dbHandle );
|
||||
new uses = cache_get_field_content_int( 0, "USES", dbHandle );
|
||||
|
||||
if ( uses >= max_uses )
|
||||
return SendError( playerid, "This cash card cannot be redeemed anymore as it had a limit of %d uses.", max_uses ), 1;
|
||||
|
||||
new expire_time = cache_get_field_content_int( 0, "EXPIRE_TIME", dbHandle );
|
||||
|
||||
if ( expire_time != 0 && GetServerTime( ) > expire_time )
|
||||
return SendError( playerid, "This cash card cannot be redeemed anymore as it has expired." ), 1;
|
||||
|
||||
new card_id = cache_get_field_content_int( 0, "ID", dbHandle );
|
||||
new card_value = cache_get_field_content_int( 0, "VALUE", dbHandle );
|
||||
|
||||
mysql_format( dbHandle, szBigString, sizeof( szBigString ), "SELECT * FROM `CASH_CARDS_REDEEMED` WHERE `USER_ID`=%d AND `CASH_CARD_ID`=%d", GetPlayerAccountID( playerid ), card_id );
|
||||
mysql_function_query( dbHandle, szBigString, true, "OnPlayerRedeemCashCard", "ddd", playerid, card_id, card_value );
|
||||
return 1;
|
||||
}
|
||||
|
||||
thread OnPlayerRedeemCashCard( playerid, card_id, card_value )
|
||||
{
|
||||
new
|
||||
rows;
|
||||
|
||||
cache_get_data( rows, tmpVariable );
|
||||
|
||||
if ( rows )
|
||||
return SendError( playerid, "You have already redeemed this cash card before." );
|
||||
|
||||
// alert and give cash
|
||||
GivePlayerCash( playerid, card_value );
|
||||
SendClientMessageToAllFormatted( COLOR_GREY, "[SERVER]"COL_WHITE" %s(%d) has redeemed a "COL_GOLD"%s"COL_WHITE" cash card.", ReturnPlayerName( playerid ), playerid, number_format( card_value ) );
|
||||
|
||||
// insert into database
|
||||
mysql_single_query( sprintf( "UPDATE `CASH_CARDS` SET `USES` = `USES` + 1 WHERE `ID`=%d", card_id ) );
|
||||
mysql_single_query( sprintf( "INSERT INTO `CASH_CARDS_REDEEMED`(`USER_ID`,`CASH_CARD_ID`) VALUES (%d,%d)", GetPlayerAccountID( playerid ), card_id ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Migrations ** */
|
||||
/*
|
||||
DROP TABLE `CASH_CARDS`;
|
||||
DROP TABLE `CASH_CARDS_REDEEMED`;
|
||||
CREATE TABLE IF NOT EXISTS `CASH_CARDS` (
|
||||
`ID` int(11) primary key auto_increment,
|
||||
`USER_ID` int(11) unsigned default 1,
|
||||
`CODE` varchar(32) not null,
|
||||
`VALUE` int(11) not null,
|
||||
`MAX_USES` int(11),
|
||||
`USES` int(11) default 0,
|
||||
`EXPIRE_TIME` int(11) default 0
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `CASH_CARDS_REDEEMED` (
|
||||
`ID` int(11) primary key auto_increment,
|
||||
`USER_ID` int(11),
|
||||
`CASH_CARD_ID` int(11),
|
||||
`REDEEMED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
*/
|
298
gamemodes/irresistible/features/crowdfund.pwn
Normal file
298
gamemodes/irresistible/features/crowdfund.pwn
Normal file
@ -0,0 +1,298 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_CROWDFUNDS 10 // dont bother editing
|
||||
|
||||
#define DIALOG_CROWDFUNDS 9383
|
||||
#define DIALOG_CROWDFUND_OPTIONS 9384
|
||||
#define DIALOG_CROWDFUND_INFO 9385
|
||||
#define DIALOG_CROWDFUND_DONATE 9386
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_CROWDFUNDS && response )
|
||||
{
|
||||
new crowdfund_ids_string[ MAX_CROWDFUNDS * 3 ];
|
||||
new crowdfunds_ids[ MAX_CROWDFUNDS ];
|
||||
|
||||
GetPVarString( playerid, "crowdfunds_shown", crowdfund_ids_string, sizeof( crowdfund_ids_string ) );
|
||||
|
||||
if ( sscanf( crowdfund_ids_string, "a<i>[" # MAX_CROWDFUNDS "]", crowdfunds_ids ) ) {
|
||||
return SendError( playerid, "There was an error reading the crowdfunds, try again later." );
|
||||
}
|
||||
|
||||
for ( new i = 0, x = 0; i < sizeof( crowdfunds_ids ); i ++ ) if ( crowdfunds_ids[ i ] != 0 )
|
||||
{
|
||||
if ( x == listitem )
|
||||
{
|
||||
SetPVarInt( playerid, "viewing_crowdfund", crowdfunds_ids[ i ] );
|
||||
break;
|
||||
}
|
||||
x ++;
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_OPTIONS, DIALOG_STYLE_LIST, ""COL_GOLD"Feature Crowdfunding", "View Crowdfund Details\nView Crowdfund Patreons\n"COL_GOLD"Contribute To Crowdfund <3", "Select", "Close" );
|
||||
}
|
||||
else if ( dialogid == DIALOG_CROWDFUND_OPTIONS )
|
||||
{
|
||||
if ( ! response )
|
||||
return ShowPlayerCrowdfunds( playerid );
|
||||
|
||||
new
|
||||
viewing_crowdfund = GetPVarInt( playerid, "viewing_crowdfund" );
|
||||
|
||||
if ( ! viewing_crowdfund ) {
|
||||
return SendError( playerid, "There was an error. Please attempt to contribute to the crowdfund again." );
|
||||
}
|
||||
|
||||
switch ( listitem )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
mysql_tquery(
|
||||
dbHandle,
|
||||
sprintf( "SELECT CROWDFUND_PACKAGES.*, CROWDFUNDS.DESCRIPTION AS CF_DESCRIPTION FROM CROWDFUND_PACKAGES INNER JOIN CROWDFUNDS ON CROWDFUNDS.ID = CROWDFUND_PACKAGES.CROWDFUND_ID WHERE CROWDFUND_ID = %d ORDER BY REQUIRED_AMOUNT DESC", viewing_crowdfund ),
|
||||
"OnDisplayCrowdfundInfo", "ii", playerid, viewing_crowdfund
|
||||
);
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
mysql_tquery(
|
||||
dbHandle,
|
||||
sprintf( "SELECT USERS.NAME, SUM(AMOUNT) AS TOTAL FROM CROWDFUND_PATREONS INNER JOIN USERS ON USERS.ID = CROWDFUND_PATREONS.USER_ID WHERE CROWDFUND_PATREONS.CROWDFUND_ID = %d GROUP BY CROWDFUND_PATREONS.USER_ID ORDER BY TOTAL DESC", viewing_crowdfund ),
|
||||
"OnDisplayCrowdfundPatreons", "ii", playerid, viewing_crowdfund
|
||||
);
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_DONATE, DIALOG_STYLE_INPUT, ""COL_GOLD"Feature Crowdfunding", ""COL_WHITE"Please specify the amount of IC you wish to contribute:\n\n"COL_ORANGE"Warning: There is no confirmation dialog.", "Contribute", "Back" );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_CROWDFUND_INFO && ! response ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_OPTIONS, DIALOG_STYLE_LIST, ""COL_GOLD"Feature Crowdfunding", "View Crowdfund Details\nView Crowdfund Patreons\n"COL_GOLD"Contribute To Crowdfund <3", "Select", "Close" );
|
||||
}
|
||||
else if ( dialogid == DIALOG_CROWDFUND_DONATE )
|
||||
{
|
||||
if ( ! response )
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_OPTIONS, DIALOG_STYLE_LIST, ""COL_GOLD"Feature Crowdfunding", "View Crowdfund Details\nView Crowdfund Patreons\n"COL_GOLD"Contribute To Crowdfund <3", "Select", "Close" );
|
||||
|
||||
new
|
||||
viewing_crowdfund = GetPVarInt( playerid, "viewing_crowdfund" );
|
||||
|
||||
if ( ! viewing_crowdfund ) {
|
||||
return SendError( playerid, "There was an error. Please attempt to contribute to the crowdfund again." );
|
||||
}
|
||||
|
||||
new
|
||||
Float: amount;
|
||||
|
||||
if ( sscanf( inputtext, "f", amount ) ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_DONATE, DIALOG_STYLE_INPUT, ""COL_GOLD"Feature Crowdfunding", ""COL_WHITE"Please specify the amount of IC you wish to contribute:\n\n"COL_RED"Please specify a decimal number!", "Contribute", "Close" );
|
||||
} else if ( amount < 10.0 ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_DONATE, DIALOG_STYLE_INPUT, ""COL_GOLD"Feature Crowdfunding", ""COL_WHITE"Please specify the amount of IC you wish to contribute:\n\n"COL_RED"The minimum amount you can contribute is 10.00 IC!", "Contribute", "Close" );
|
||||
} else if ( amount > GetPlayerIrresistibleCoins( playerid ) ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_DONATE, DIALOG_STYLE_INPUT, ""COL_GOLD"Feature Crowdfunding", ""COL_WHITE"Please specify the amount of IC you wish to contribute:\n\n"COL_RED"You do not have this many coins in your account!", "Contribute", "Close" );
|
||||
} else {
|
||||
// check if expired/ended/valid before even submitting
|
||||
mysql_tquery( dbHandle, sprintf( "SELECT FEATURE, UNIX_TIMESTAMP(RELEASE_DATE) AS `RELEASE`, UNIX_TIMESTAMP(END_DATE) AS `END` FROM CROWDFUNDS WHERE ID = %d", viewing_crowdfund ), "OnPlayerCrowdfundContribute", "ddf", playerid, viewing_crowdfund, amount );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:crowdfund( playerid, params[ ] ) return cmd_crowdfunds( playerid, params );
|
||||
CMD:crowdfunds( playerid, params[ ] ) return ShowPlayerCrowdfunds( playerid );
|
||||
|
||||
/* ** Functions ** */
|
||||
stock ShowPlayerCrowdfunds( playerid ) {
|
||||
return mysql_tquery( dbHandle,
|
||||
"SELECT CROWDFUNDS.ID, CROWDFUNDS.FEATURE, CROWDFUNDS.FUND_TARGET, SUM(CROWDFUND_PATREONS.AMOUNT) AS RAISED, UNIX_TIMESTAMP(RELEASE_DATE) AS RELASE, UNIX_TIMESTAMP(END_DATE) AS END FROM CROWDFUNDS " \
|
||||
"LEFT JOIN CROWDFUND_PATREONS on CROWDFUNDS.ID = CROWDFUND_PATREONS.CROWDFUND_ID " \
|
||||
"GROUP BY CROWDFUNDS.ID ORDER BY CROWDFUNDS.ID DESC LIMIT " # MAX_CROWDFUNDS,
|
||||
"OnDisplayCrowdfunds", "i", playerid
|
||||
), 1;
|
||||
}
|
||||
|
||||
thread OnPlayerCrowdfundContribute( playerid, crowdfund_id, Float: amount )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( rows )
|
||||
{
|
||||
new feature[ 64 ];
|
||||
new curr_timestamp = gettime( );
|
||||
new release_timestamp = cache_get_field_content_int( 0, "RELEASE", dbHandle );
|
||||
new end_timestamp = cache_get_field_content_int( 0, "END", dbHandle );
|
||||
|
||||
// check if released or ended
|
||||
if ( ( curr_timestamp > release_timestamp && release_timestamp != 0 ) || ( curr_timestamp > end_timestamp ) ) {
|
||||
SendError( playerid, "You can no longer contribute to this crowdfund as it is released or ended." );
|
||||
return ShowPlayerCrowdfunds( playerid );
|
||||
}
|
||||
|
||||
// double check valid amounts again
|
||||
if ( amount < 10.0 || amount > GetPlayerIrresistibleCoins( playerid ) ) {
|
||||
SendError( playerid, "You can no longer contribute to this crowdfund as the contribution amount is invalid." );
|
||||
return ShowPlayerCrowdfunds( playerid );
|
||||
}
|
||||
|
||||
// get feature name
|
||||
cache_get_field_content( 0, "FEATURE", feature );
|
||||
|
||||
// notify and deduct ic
|
||||
GivePlayerIrresistibleCoins( playerid, -amount );
|
||||
SendClientMessageToAllFormatted( -1, ""COL_GOLD"[CROWDFUND]"COL_WHITE" %s(%d) has donated %s IC to the %s Crowdfund! <3", ReturnPlayerName( playerid ), playerid, number_format( amount, .prefix = '\0', .decimals = 2 ), feature );
|
||||
SavePlayerData( playerid ); // force save just incase
|
||||
|
||||
// insert into database
|
||||
mysql_format(
|
||||
dbHandle, szBigString, sizeof( szBigString ),
|
||||
"INSERT INTO CROWDFUND_PATREONS (USER_ID, CROWDFUND_ID, AMOUNT) VALUES (%d, %d, %f)",
|
||||
GetPlayerAccountID( playerid ), crowdfund_id, amount
|
||||
);
|
||||
mysql_single_query( szBigString );
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "The crowdfund you are attempting to contribute to no longer exists." );
|
||||
}
|
||||
}
|
||||
|
||||
thread OnDisplayCrowdfundPatreons( playerid, crowdfund_id )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( ! rows ) {
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_INFO, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Feature Crowdfunding", ""COL_GREY"Contributor\t"COL_GREY"Amount (IC)\n"COL_RED"No-One\t"COL_RED"N/A", "Close", "Back" ), 1;
|
||||
}
|
||||
|
||||
new patreon[ MAX_PLAYER_NAME ];
|
||||
|
||||
szHugeString = ""COL_GREY"Contributor\t"COL_GREY"Amount (IC)\n";
|
||||
|
||||
for ( new row = 0; row < rows; row ++ )
|
||||
{
|
||||
cache_get_field_content( row, "NAME", patreon );
|
||||
|
||||
new Float: contribution = cache_get_field_content_float( row, "TOTAL", dbHandle );
|
||||
|
||||
format( szHugeString, sizeof( szHugeString ), "%s%s\t%s IC\n", szHugeString, patreon, number_format( contribution, .prefix = '\0', .decimals = 2 ) );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_INFO, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Feature Crowdfunding", szHugeString, "Close", "Back" ), 1;
|
||||
}
|
||||
|
||||
thread OnDisplayCrowdfundInfo( playerid, crowdfund_id )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( ! rows ) {
|
||||
return SendError( playerid, "There is no crowdfund information to show. Try again later." );
|
||||
}
|
||||
|
||||
new cf_description[ 100 ];
|
||||
new description[ 100 ];
|
||||
new title[ 48 ];
|
||||
|
||||
cache_get_field_content( 0, "CF_DESCRIPTION", cf_description );
|
||||
|
||||
if ( strlen( cf_description ) < sizeof( cf_description ) - 1 ) {
|
||||
format( szHugeString, sizeof( szHugeString ), ""COL_WHITE"%s\n\n", cf_description );
|
||||
} else {
|
||||
format( szHugeString, sizeof( szHugeString ), ""COL_WHITE"%s"COL_GREY"... (read more on sfcnr.com)\n\n", cf_description );
|
||||
}
|
||||
|
||||
for ( new row = 0; row < rows; row ++ )
|
||||
{
|
||||
cache_get_field_content( row, "TITLE", title );
|
||||
cache_get_field_content( row, "DESCRIPTION", description );
|
||||
|
||||
new Float: req_amount = cache_get_field_content_float( row, "REQUIRED_AMOUNT", dbHandle );
|
||||
|
||||
if ( strlen( description ) < sizeof( description ) - 1 ) {
|
||||
format( szHugeString, sizeof( szHugeString ), "%s"COL_GOLD"%s (%s IC+)"COL_WHITE"\n%s\n\n", szHugeString, title, number_format( req_amount, .prefix = '\0', .decimals = 2 ), description );
|
||||
} else {
|
||||
format( szHugeString, sizeof( szHugeString ), "%s"COL_GOLD"%s (%s IC+)"COL_WHITE"\n%s"COL_GREY"... (read more on sfcnr.com)\n\n", szHugeString, title, number_format( req_amount, .prefix = '\0', .decimals = 2 ), description );
|
||||
}
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUND_INFO, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Feature Crowdfunding", szHugeString, "Close", "Back" ), 1;
|
||||
}
|
||||
|
||||
thread OnDisplayCrowdfunds( playerid )
|
||||
{
|
||||
new
|
||||
rows;
|
||||
|
||||
cache_get_data( rows, tmpVariable );
|
||||
|
||||
if ( ! rows ) {
|
||||
return SendError( playerid, "There is no crowdfund to show. Try again later." );
|
||||
}
|
||||
|
||||
new feature[ 64 ];
|
||||
new crowdfund_ids[ MAX_CROWDFUNDS * 3 ];
|
||||
|
||||
// header
|
||||
szLargeString = ""COL_WHITE"Feature\t"COL_WHITE"Raised (IC)\t"COL_WHITE"Goal (IC)\t"COL_WHITE"Completion (%)\n";
|
||||
|
||||
for ( new row = 0; row < MAX_CROWDFUNDS; row ++ )
|
||||
{
|
||||
new
|
||||
id = 0;
|
||||
|
||||
if ( row < rows )
|
||||
{
|
||||
id = cache_get_field_content_int( row, "ID" );
|
||||
cache_get_field_content( row, "FEATURE", feature );
|
||||
|
||||
new Float: amount_raised = cache_get_field_content_float( row, "RAISED", dbHandle );
|
||||
new Float: target_amount = cache_get_field_content_float( row, "FUND_TARGET", dbHandle );
|
||||
new Float: percent_raised = ( amount_raised / target_amount ) * 100.0;
|
||||
|
||||
new curr_timestamp = gettime( );
|
||||
new release_timestamp = cache_get_field_content_int( row, "RELEASE", dbHandle );
|
||||
new end_timestamp = cache_get_field_content_int( row, "END", dbHandle );
|
||||
|
||||
// inactive
|
||||
if ( ( curr_timestamp > release_timestamp && release_timestamp != 0 ) || ( curr_timestamp > end_timestamp ) )
|
||||
{
|
||||
format( szLargeString, sizeof( szLargeString ),
|
||||
"%s{333333}%s\t{333333}%s IC\t{333333}%s IC\t%s%0.1f%\n",
|
||||
szLargeString, feature,
|
||||
number_format( amount_raised, .prefix = '\0', .decimals = 1 ),
|
||||
number_format( target_amount, .prefix = '\0', .decimals = 1 ),
|
||||
percent_raised >= 100.0 ? ( COL_GREEN ) : ( COL_WHITE ), percent_raised
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
format( szLargeString, sizeof( szLargeString ),
|
||||
"%s%s\t%s IC\t%s IC\t%s%0.1f%\n",
|
||||
szLargeString, feature,
|
||||
number_format( amount_raised, .prefix = '\0', .decimals = 1 ),
|
||||
number_format( target_amount, .prefix = '\0', .decimals = 1 ),
|
||||
percent_raised >= 100.0 ? ( COL_GREEN ) : ( COL_WHITE ), percent_raised
|
||||
);
|
||||
}
|
||||
}
|
||||
format( crowdfund_ids, sizeof( crowdfund_ids ), "%s%d ", crowdfund_ids, id );
|
||||
}
|
||||
|
||||
// save ids for response
|
||||
SetPVarString( playerid, "crowdfunds_shown", crowdfund_ids );
|
||||
return ShowPlayerDialog( playerid, DIALOG_CROWDFUNDS, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Feature Crowdfunding", szLargeString, "Select", "Close" ), 1;
|
||||
}
|
577
gamemodes/irresistible/features/duel.pwn
Normal file
577
gamemodes/irresistible/features/duel.pwn
Normal file
@ -0,0 +1,577 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Stev
|
||||
* Module: duel.pwn
|
||||
* Purpose: player dueling system
|
||||
*/
|
||||
|
||||
/* ** Debug ** */
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define COL_DUEL "{B74AFF}"
|
||||
#define DIALOG_DUEL 7360
|
||||
#define DIALOG_DUEL_PLAYER 7361
|
||||
#define DIALOG_DUEL_LOCATION 7362
|
||||
#define DIALOG_DUEL_WEAPON 7363
|
||||
#define DIALOG_DUEL_WAGER 7364
|
||||
#define DIALOG_DUEL_WEAPON_TWO 7365
|
||||
#define DIALOG_DUEL_HEALTH 7366
|
||||
#define DIALOG_DUEL_ARMOUR 7367
|
||||
|
||||
/* ** Variables ** */
|
||||
enum duelData
|
||||
{
|
||||
duelPlayer,
|
||||
duelWeapon[2],
|
||||
duelBet,
|
||||
Float: duelArmour,
|
||||
Float: duelHealth,
|
||||
duelCountdown,
|
||||
duelTimer,
|
||||
duelLocation,
|
||||
duelRemainingRounds
|
||||
};
|
||||
|
||||
enum locationData
|
||||
{
|
||||
locationName[19],
|
||||
Float:locationPosOne[3],
|
||||
Float:locationPosTwo[3],
|
||||
};
|
||||
|
||||
static const Float: duel_coordinates[3] = {-2226.1938, 251.9206, 35.3203};
|
||||
|
||||
new
|
||||
weaponList [] = {0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34},
|
||||
LocationInfo [][locationData] =
|
||||
{
|
||||
{"Santa Maria Beach", {369.75770, -1831.576, 7.67190}, {369.65890, -1871.215, 7.67190}},
|
||||
{"Greenglass College", {1078.0353, 1084.4989, 10.8359}, {1095.4019, 1064.7239, 10.8359}},
|
||||
{"Baseball Arena", {1393.0995, 2177.4585, 9.75780}, {1377.7881, 2195.4214, 9.75780}},
|
||||
//{"The Visage", {1960.4512, 1907.6881, 130.937}, {1969.4047, 1923.2622, 130.937}},
|
||||
{"Mount Chilliad", {-2318.471, -1632.880, 483.703}, {-2329.174, -1604.657, 483.760}},
|
||||
{"The Farm", {-1044.856, -996.8120, 129.218}, {-1125.599, -996.7523, 129.218}},
|
||||
{"Tennis Courts", {755.93790, -1280.710, 13.5565}, {755.93960, -1238.688, 13.5516}},
|
||||
{"Underwater World", {520.59600, -2125.663, -28.257}, {517.96600, -2093.610, -28.257}},
|
||||
{"Grove Street", {2476.4580, -1668.631, 13.3249}, {2501.1560, -1667.655, 13.3559}},
|
||||
{"Ocean Docks", {2683.5440, -2485.137, 13.5425}, {2683.8470, -2433.726, 13.5553}}
|
||||
},
|
||||
duelInfo [MAX_PLAYERS][duelData],
|
||||
|
||||
bool: p_playerDueling [MAX_PLAYERS char],
|
||||
p_duelInvitation [MAX_PLAYERS][MAX_PLAYERS],
|
||||
|
||||
g_DuelCheckpoint = -1
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit()
|
||||
{
|
||||
CreateDynamicMapIcon(duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 23, 0, -1, -1, -1, 750.0);
|
||||
g_DuelCheckpoint = CreateDynamicCP(duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 1.5, 0, 0, -1);
|
||||
CreateDynamic3DTextLabel(""COL_GOLD"[DUEL PLAYER]", -1, duel_coordinates[0], duel_coordinates[1], duel_coordinates[2], 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect(playerid)
|
||||
{
|
||||
p_playerDueling{playerid} = false;
|
||||
duelInfo[playerid][duelPlayer] = INVALID_PLAYER_ID;
|
||||
duelInfo[playerid][duelWeapon][0] = 0;
|
||||
duelInfo[playerid][duelWeapon][1] = 0;
|
||||
duelInfo[playerid][duelHealth] = 100.0;
|
||||
duelInfo[playerid][duelArmour] = 100.0;
|
||||
duelInfo[playerid][duelBet] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect(playerid, reason)
|
||||
{
|
||||
forfeitPlayerDuel(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx(playerid, killerid, reason, Float: damage, bodypart)
|
||||
#else
|
||||
hook OnPlayerDeath(playerid, killerid, reason)
|
||||
#endif
|
||||
{
|
||||
forfeitPlayerDuel(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook SetPlayerRandomSpawn(playerid)
|
||||
{
|
||||
if (IsPlayerDueling(playerid))
|
||||
{
|
||||
// teleport back to pb
|
||||
SetPlayerPos(playerid, duel_coordinates[0], duel_coordinates[1], duel_coordinates[2]);
|
||||
SetPlayerInterior(playerid, 0);
|
||||
SetPlayerVirtualWorld(playerid, 0);
|
||||
|
||||
// reset duel variables
|
||||
p_playerDueling{playerid} = false;
|
||||
duelInfo[playerid][duelPlayer] = INVALID_PLAYER_ID;
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerEnterDynamicCP(playerid, checkpointid)
|
||||
{
|
||||
if (GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (checkpointid == g_DuelCheckpoint)
|
||||
{
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
|
||||
{
|
||||
if (dialogid == DIALOG_DUEL && response)
|
||||
{
|
||||
switch (listitem)
|
||||
{
|
||||
case 0: ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{C0C0C0}Note: You can enter partially their names.", "Select", "Back");
|
||||
|
||||
case 1: ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{C0C0C0}Note: The default health is 100.0.", "Select", "Back");
|
||||
|
||||
case 2: ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{C0C0C0}Note: The default armour is 100.0.", "Select", "Back");
|
||||
|
||||
case 3:
|
||||
{
|
||||
new weaponid = duelInfo[playerid][duelWeapon][0];
|
||||
|
||||
erase(szBigString);
|
||||
|
||||
for (new i = 0; i < sizeof(weaponList); i ++) {
|
||||
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (weaponid == weaponList[i] ? (COL_GREY) : (COL_WHITE)), ReturnWeaponName(weaponList[i]));
|
||||
}
|
||||
|
||||
ShowPlayerDialog(playerid, DIALOG_DUEL_WEAPON, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Primary Weapon", szBigString, "Select", "Back");
|
||||
}
|
||||
|
||||
case 4:
|
||||
{
|
||||
new weaponid = duelInfo[playerid][duelWeapon][1];
|
||||
|
||||
erase(szBigString);
|
||||
|
||||
for (new i = 0; i < sizeof(weaponList); i ++) {
|
||||
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (weaponid == weaponList[i] ? (COL_GREY) : (COL_WHITE)), ReturnWeaponName(weaponList[i]));
|
||||
}
|
||||
|
||||
ShowPlayerDialog(playerid, DIALOG_DUEL_WEAPON_TWO, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Secondary Weapon", szBigString, "Select", "Back");
|
||||
}
|
||||
|
||||
case 5:
|
||||
{
|
||||
new index = duelInfo[playerid][duelLocation];
|
||||
|
||||
erase(szBigString);
|
||||
|
||||
for (new i = 0; i < sizeof(LocationInfo); i ++) {
|
||||
format(szBigString, sizeof(szBigString), "%s%s%s\n", szBigString, (index == i ? (COL_GREY) : (COL_WHITE)), LocationInfo[i][locationName]);
|
||||
}
|
||||
|
||||
ShowPlayerDialog(playerid, DIALOG_DUEL_LOCATION, DIALOG_STYLE_LIST, "{FFFFFF}Duel Settings - Change Location", szBigString, "Select", "Back");
|
||||
}
|
||||
|
||||
case 6: ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:", "Select", "Back");
|
||||
|
||||
case 7:
|
||||
{
|
||||
new targetid = duelInfo[playerid][duelPlayer];
|
||||
|
||||
if (!IsPlayerConnected(targetid)) {
|
||||
SendError(playerid, "You haven't selected anyone to duel!");
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
}
|
||||
|
||||
p_duelInvitation[playerid][targetid] = gettime() + 60;
|
||||
ShowPlayerHelpDialog(targetid, 10000, "%s wants to duel!~n~~n~~y~Location: ~w~%s~n~~y~Weapon: ~w~%s and %s~n~~y~Wager: ~w~%s", ReturnPlayerName(playerid), LocationInfo[duelInfo[playerid][duelLocation]][locationName], ReturnWeaponName(duelInfo[playerid][duelWeapon][0]), ReturnWeaponName(duelInfo[playerid][duelWeapon][1]), number_format(duelInfo[playerid][duelBet]));
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have sent a duel invitation to %s for "COL_GOLD"%s"COL_WHITE".", ReturnPlayerName(targetid), number_format(duelInfo[playerid][duelBet]));
|
||||
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You are invited to duel %s for "COL_GOLD"%s"COL_WHITE", use \"/duel accept %d\".", ReturnPlayerName(playerid), number_format(duelInfo[playerid][duelBet]), playerid);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_PLAYER)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
new targetid;
|
||||
|
||||
if (sscanf(inputtext, "u", targetid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{C0C0C0}Note: You can enter partially their names.", "Select", "Back");
|
||||
|
||||
if (targetid == playerid)
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't invite yourself to duel!", "Select", "Back");
|
||||
|
||||
if (targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}Player is not connected!", "Select", "Back");
|
||||
|
||||
if (IsPlayerDueling(playerid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You are already in a duel!", "Select", "Back");
|
||||
|
||||
if (IsPlayerDueling(targetid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}This player is already in a duel!", "Select", "Back");
|
||||
|
||||
if (GetPlayerWantedLevel(targetid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't duel this person right now, they are wanted", "Select", "Back");
|
||||
|
||||
if (GetDistanceBetweenPlayers(playerid, targetid) > 25.0)
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}The player you wish to duel is not near you.", "Select", "Back");
|
||||
|
||||
if (IsPlayerJailed(targetid))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_PLAYER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Select a player", "{FFFFFF}Please type the name of the player you wish to duel:\n\n{FF0000}You can't duel this person right now, they are currently in jail.", "Select", "Back");
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have selected {C0C0C0}%s {FFFFFF}as your opponent.", ReturnPlayerName(targetid));
|
||||
|
||||
duelInfo[playerid][duelPlayer] = targetid;
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_LOCATION)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
if (duelInfo[playerid][duelLocation] == listitem)
|
||||
{
|
||||
SendError(playerid, "You have already selected this location!");
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
}
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed the duel location to {C0C0C0}%s{FFFFFF}.", LocationInfo[listitem][locationName]);
|
||||
|
||||
duelInfo[playerid][duelLocation] = listitem;
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_WEAPON)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
if (duelInfo[playerid][duelWeapon][0] == weaponList[listitem])
|
||||
{
|
||||
SendError(playerid, "You have already selected this weapon!");
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
}
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Primary Weapon to {C0C0C0}%s{FFFFFF}.", ReturnWeaponName(weaponList[listitem]));
|
||||
duelInfo[playerid][duelWeapon][0] = weaponList[listitem];
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_WEAPON_TWO)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
if (duelInfo[playerid][duelWeapon][1] == weaponList[listitem])
|
||||
{
|
||||
SendError(playerid, "You have already selected this weapon!");
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
}
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Secondary Weapon to {C0C0C0}%s{FFFFFF}.", ReturnWeaponName(weaponList[listitem]));
|
||||
duelInfo[playerid][duelWeapon][1] = weaponList[listitem];
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_HEALTH)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
new Float:health;
|
||||
|
||||
if (sscanf(inputtext, "f", health))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{C0C0C0}Note: The default health is 100.0.", "Select", "Back");
|
||||
|
||||
if (!(1.0 <= health <= 100.0))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_HEALTH, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Health", "{FFFFFF}Enter the amount of health you will begin with:\n\n{FF0000}The amount you have entered is a invalid amount, 1 to 100 only!", "Select", "Back");
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Health to {C0C0C0}%0.2f%%{FFFFFF}.", health);
|
||||
duelInfo[playerid][duelHealth] = health;
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_ARMOUR)
|
||||
{
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
new Float:armour;
|
||||
|
||||
if (sscanf(inputtext, "f", armour))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{C0C0C0}Note: The default armour is 100.0.", "Select", "Back");
|
||||
|
||||
if (!(0.0 <= armour <= 100.0))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_ARMOUR, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Armour", "{FFFFFF}Enter the amount of armour you will begin with:\n\n{FF0000}The amount you have entered is a invalid amount, 0 to 100 only!", "Select", "Back");
|
||||
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed Armour to {C0C0C0}%0.2f%%{FFFFFF}.", armour);
|
||||
duelInfo[playerid][duelArmour] = armour;
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if (dialogid == DIALOG_DUEL_WAGER)
|
||||
{
|
||||
if (IsPlayerDueling(playerid)) // prevent spawning money
|
||||
return SendError(playerid, "You cannot use this at the moment.");
|
||||
|
||||
if (!response)
|
||||
return ShowPlayerDuelMenu(playerid);
|
||||
|
||||
new amount;
|
||||
|
||||
if (sscanf(inputtext, "d", amount))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:", "Select", "Back");
|
||||
|
||||
if (!(0 <= amount < 10000000))
|
||||
return ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, "{FFFFFF}Duel Settings - Set A Wager", "{FFFFFF}Please enter the wager for this duel:\n\n{FF0000}Wagers must be between $0 and $10,000,000.", "Select", "Back");
|
||||
|
||||
duelInfo[playerid][duelBet] = amount;
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have changed the wager to %s.", number_format(duelInfo[playerid][duelBet]));
|
||||
ShowPlayerDuelMenu(playerid);
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:duel(playerid, params[])
|
||||
{
|
||||
if (!strcmp(params, "accept", false, 6))
|
||||
{
|
||||
new
|
||||
targetid;
|
||||
|
||||
if (sscanf(params[7], "u", targetid))
|
||||
return SendUsage(playerid, "/duel accept [PLAYER_ID]");
|
||||
|
||||
if (!IsPlayerConnected(targetid))
|
||||
return SendError(playerid, "You do not have any duel invitations to accept.");
|
||||
|
||||
if (gettime() > p_duelInvitation[targetid][playerid])
|
||||
return SendError(playerid, "You have not been invited by %s to duel or it has expired.");
|
||||
|
||||
if (IsPlayerDueling(playerid))
|
||||
return SendError(playerid, "You cannot accept this invite as you are currently dueling.");
|
||||
|
||||
if (GetDistanceBetweenPlayers(playerid, targetid) > 25.0)
|
||||
return SendError(playerid, "You must be within 25.0 meters of your opponent!");
|
||||
|
||||
new waged_amount = duelInfo[targetid][duelBet];
|
||||
|
||||
if (duelInfo[targetid][duelBet] != 0)
|
||||
{
|
||||
if (GetPlayerCash(targetid) < waged_amount)
|
||||
{
|
||||
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted but you don't have money to wage (%s).", ReturnPlayerName(playerid), number_format(waged_amount));
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have accepted %s's duel invitation but they don't have money.", ReturnPlayerName(targetid));
|
||||
return 1;
|
||||
}
|
||||
else if (GetPlayerCash(playerid) < waged_amount)
|
||||
{
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s requires you to wage %s.", ReturnPlayerName(targetid), number_format(waged_amount));
|
||||
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted the duel invitation but they don't have money to wage.", ReturnPlayerName(playerid));
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
GivePlayerCash(playerid, -waged_amount);
|
||||
GivePlayerCash(targetid, -waged_amount);
|
||||
}
|
||||
}
|
||||
|
||||
SendClientMessageFormatted(targetid, -1, ""COL_DUEL"[DUEL]{FFFFFF} %s has accepted your duel invitation.", ReturnPlayerName(playerid));
|
||||
SendClientMessageFormatted(playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have accepted %s's duel invitation.", ReturnPlayerName(targetid));
|
||||
|
||||
p_playerDueling{targetid} = true;
|
||||
p_playerDueling{playerid} = true;
|
||||
|
||||
duelInfo[targetid][duelPlayer] = playerid;
|
||||
duelInfo[playerid][duelPlayer] = targetid;
|
||||
duelInfo[playerid][duelBet] = duelInfo[targetid][duelBet];
|
||||
duelInfo[playerid][duelRemainingRounds] = 1;
|
||||
duelInfo[targetid][duelRemainingRounds] = 1;
|
||||
|
||||
new id = duelInfo[targetid][duelLocation];
|
||||
|
||||
ResetPlayerWeapons(targetid);
|
||||
RemovePlayerFromVehicle(targetid);
|
||||
SetPlayerArmour(targetid, duelInfo[targetid][duelArmour]);
|
||||
SetPlayerHealth(targetid, duelInfo[targetid][duelHealth]);
|
||||
SetPlayerVirtualWorld(targetid, targetid + 1);
|
||||
SetPlayerPos(targetid, LocationInfo[id][locationPosTwo][0], LocationInfo[id][locationPosTwo][1], LocationInfo[id][locationPosTwo][2]);
|
||||
|
||||
ResetPlayerWeapons(playerid);
|
||||
RemovePlayerFromVehicle(playerid);
|
||||
SetPlayerArmour(playerid, duelInfo[targetid][duelArmour]);
|
||||
SetPlayerHealth(playerid, duelInfo[targetid][duelHealth]);
|
||||
SetPlayerVirtualWorld(playerid, targetid + 1);
|
||||
SetPlayerPos(playerid, LocationInfo[id][locationPosOne][0], LocationInfo[id][locationPosOne][1], LocationInfo[id][locationPosOne][2]);
|
||||
|
||||
// freeze
|
||||
TogglePlayerControllable(playerid, 0);
|
||||
TogglePlayerControllable(targetid, 0);
|
||||
|
||||
// start countdown
|
||||
duelInfo[targetid][duelCountdown] = 10;
|
||||
duelInfo[targetid][duelTimer] = SetTimerEx("DuelTimer", 960, true, "d", targetid);
|
||||
|
||||
// give weapon
|
||||
GivePlayerWeapon(playerid, duelInfo[targetid][duelWeapon][0], 5000);
|
||||
GivePlayerWeapon(targetid, duelInfo[targetid][duelWeapon][0], 5000);
|
||||
GivePlayerWeapon(playerid, duelInfo[targetid][duelWeapon][1], 5000);
|
||||
GivePlayerWeapon(targetid, duelInfo[targetid][duelWeapon][1], 5000);
|
||||
|
||||
// clear invites for safety
|
||||
for (new i = 0; i < MAX_PLAYERS; i ++) {
|
||||
p_duelInvitation[playerid][i] = 0;
|
||||
p_duelInvitation[targetid][i] = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else if (strmatch(params, "cancel"))
|
||||
{
|
||||
if (ClearDuelInvites(playerid))
|
||||
{
|
||||
return SendServerMessage(playerid, "You have cancelled every duel offer that you have made.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError(playerid, "You have not made any duel offers recently.");
|
||||
}
|
||||
}
|
||||
return SendUsage(playerid, "/duel [ACCEPT/CANCEL]");
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
static stock ClearDuelInvites(playerid)
|
||||
{
|
||||
new current_time = gettime();
|
||||
new count = 0;
|
||||
|
||||
for (new i = 0; i < MAX_PLAYERS; i ++)
|
||||
{
|
||||
if (p_duelInvitation[playerid][i] != 0 && current_time > p_duelInvitation[playerid][i])
|
||||
{
|
||||
p_duelInvitation[playerid][i] = 0;
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
stock IsPlayerDueling(playerid) {
|
||||
return p_playerDueling{playerid};
|
||||
}
|
||||
|
||||
stock ShowPlayerDuelMenu(playerid)
|
||||
{
|
||||
if (GetPlayerClass(playerid) != CLASS_CIVILIAN)
|
||||
return SendError(playerid, "You can only use this feature whist being a civilian.");
|
||||
|
||||
if (GetPlayerWantedLevel(playerid))
|
||||
return SendError(playerid, "You cannot duel whilst having a wanted level.");
|
||||
|
||||
format(szBigString, sizeof(szBigString),
|
||||
"Player\t{C0C0C0}%s\nHealth\t{C0C0C0}%.2f%%\nArmour\t{C0C0C0}%.2f%%\nPrimary Weapon\t{C0C0C0}%s\nSecondary Weapon\t{C0C0C0}%s\nLocation\t{C0C0C0}%s\nWager\t{C0C0C0}%s\n"COL_GOLD"Send Invite\t"COL_GOLD">>>",
|
||||
(!IsPlayerConnected(duelInfo[playerid][duelPlayer]) ? (""COL_RED"N/A") : (ReturnPlayerName(duelInfo[playerid][duelPlayer]))),
|
||||
duelInfo[playerid][duelHealth],
|
||||
duelInfo[playerid][duelArmour],
|
||||
ReturnWeaponName(duelInfo[playerid][duelWeapon][0]),
|
||||
ReturnWeaponName(duelInfo[playerid][duelWeapon][1]),
|
||||
LocationInfo[duelInfo[playerid][duelLocation]][locationName],
|
||||
number_format(duelInfo[playerid][duelBet])
|
||||
);
|
||||
ShowPlayerDialog(playerid, DIALOG_DUEL, DIALOG_STYLE_TABLIST, "{FFFFFF}Duel Settings", szBigString, "Select", "Cancel");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static stock forfeitPlayerDuel(playerid)
|
||||
{
|
||||
if (!IsPlayerDueling(playerid))
|
||||
return 0;
|
||||
|
||||
ClearDuelInvites(playerid);
|
||||
|
||||
new
|
||||
winnerid = duelInfo[playerid][duelPlayer];
|
||||
|
||||
if (!IsPlayerConnected(winnerid) || !IsPlayerDueling(winnerid))
|
||||
return 0;
|
||||
|
||||
// begin wager info
|
||||
new
|
||||
amount_waged = duelInfo[playerid][duelBet];
|
||||
|
||||
SpawnPlayer(winnerid);
|
||||
ClearDuelInvites(winnerid);
|
||||
|
||||
// decrement rounds
|
||||
duelInfo[playerid][duelRemainingRounds] --;
|
||||
duelInfo[winnerid][duelRemainingRounds] = duelInfo[playerid][duelRemainingRounds];
|
||||
|
||||
// check if theres a remaining round
|
||||
if (duelInfo[playerid][duelRemainingRounds] == 0) {
|
||||
if (0 < amount_waged < 10000000) {
|
||||
new winning_prize = floatround(float(amount_waged) * 1.95); // We take 2.5% of the total pot
|
||||
GivePlayerCash(winnerid, winning_prize);
|
||||
SendClientMessageToAllFormatted( -1, ""COL_DUEL"[DUEL]{FFFFFF} %s(%d) has won the duel against %s(%d) for %s!", ReturnPlayerName(winnerid), winnerid, ReturnPlayerName(playerid), playerid, number_format(winning_prize));
|
||||
} else {
|
||||
SendClientMessageToAllFormatted( -1, ""COL_DUEL"[DUEL]{FFFFFF} %s(%d) has won the duel against %s(%d)!", ReturnPlayerName(winnerid), winnerid, ReturnPlayerName(playerid), playerid);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
function DuelTimer(targetid)
|
||||
{
|
||||
new
|
||||
playerid = duelInfo[targetid][duelPlayer];
|
||||
|
||||
duelInfo[targetid][duelCountdown] --;
|
||||
|
||||
if (duelInfo[targetid][duelCountdown] <= 0)
|
||||
{
|
||||
GameTextForPlayer(targetid, "~g~~h~FIGHT!", 1500, 4);
|
||||
GameTextForPlayer(playerid, "~g~~h~FIGHT!", 1500, 4);
|
||||
|
||||
PlayerPlaySound(targetid, 1057, 0.0, 0.0, 0.0);
|
||||
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
|
||||
|
||||
TogglePlayerControllable(playerid, 1);
|
||||
TogglePlayerControllable(targetid, 1);
|
||||
|
||||
KillTimer(duelInfo[targetid][duelTimer]);
|
||||
}
|
||||
else
|
||||
{
|
||||
format(szSmallString, sizeof(szSmallString), "~w~%d", duelInfo[targetid][duelCountdown]);
|
||||
GameTextForPlayer(targetid, szSmallString, 1500, 4);
|
||||
GameTextForPlayer(playerid, szSmallString, 1500, 4);
|
||||
|
||||
PlayerPlaySound(targetid, 1056, 0.0, 0.0, 0.0);
|
||||
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
|
||||
}
|
||||
return 1;
|
||||
}
|
21
gamemodes/irresistible/features/fishing.pwn
Normal file
21
gamemodes/irresistible/features/fishing.pwn
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: fishing.inc
|
||||
* Purpose: fishing module
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
|
||||
/* ** Variables ** */
|
||||
|
||||
/* ** Hooks ** */
|
||||
|
||||
/* ** Functions ** */
|
||||
CMD:fish( playerid, params[ ] )
|
||||
{
|
||||
return 1;
|
||||
}
|
97
gamemodes/irresistible/features/fps.pwn
Normal file
97
gamemodes/irresistible/features/fps.pwn
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: fps.inc
|
||||
* Purpose: fps counter in-game
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Defines ** */
|
||||
#define GetPlayerFPS(%1) p_FPS[%1]
|
||||
|
||||
/* ** Variables ** */
|
||||
new
|
||||
Text: p_FPSCounterTD [ MAX_PLAYERS ] = { Text: INVALID_TEXT_DRAW, ... },
|
||||
bool: p_FPSCounter [ MAX_PLAYERS char ],
|
||||
p_FPS_DrunkLevel [ MAX_PLAYERS ],
|
||||
p_FPS [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:fps( playerid, params[ ] )
|
||||
{
|
||||
if( ( p_FPSCounter{ playerid } = !p_FPSCounter{ playerid } ) == true )
|
||||
{
|
||||
formatFPSCounter( playerid );
|
||||
TextDrawShowForPlayer( playerid, p_FPSCounterTD[ playerid ] );
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> FPS counter enabled" );
|
||||
}
|
||||
else
|
||||
{
|
||||
TextDrawHideForPlayer( playerid, p_FPSCounterTD[ playerid ] );
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> FPS counter disabled" );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined _streamer_included
|
||||
CMD:drawdistance( playerid, params[ ] )
|
||||
{
|
||||
if ( strmatch( params, "low" ) ) {
|
||||
Streamer_SetVisibleItems( STREAMER_TYPE_OBJECT, 300, playerid );
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> Draw distance of objects now set to LOW." );
|
||||
} else if ( strmatch( params, "medium" ) ) {
|
||||
Streamer_SetVisibleItems( STREAMER_TYPE_OBJECT, 625, playerid );
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> Draw distance of objects now set to MEDIUM." );
|
||||
} else if ( strmatch( params, "high" ) ) {
|
||||
Streamer_SetVisibleItems( STREAMER_TYPE_OBJECT, 950, playerid );
|
||||
SendClientMessage( playerid, 0x84aa63ff, "-> Draw distance of objects now set to HIGH." );
|
||||
} else if ( strmatch( params, "info" ) ) {
|
||||
SendClientMessage( playerid, 0x84aa63ff, sprintf( "-> You have currently %d objects streamed towards your client.", Streamer_GetVisibleItems( STREAMER_TYPE_OBJECT, playerid ) ) );
|
||||
}
|
||||
else {
|
||||
SendClientMessage( playerid, 0xa9c4e4ff, "-> /drawdistance [LOW/MEDIUM/HIGH/INFO]" );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ** Functions ** */
|
||||
stock formatFPSCounter( playerid ) {
|
||||
if( !p_FPSCounter{ playerid } )
|
||||
return;
|
||||
|
||||
static
|
||||
iFPS,
|
||||
szColor[ 10 ],
|
||||
szFPS[ sizeof( szColor ) + 4 ]
|
||||
;
|
||||
|
||||
switch( ( iFPS = p_FPS[ playerid ] ) ) {
|
||||
case 32 .. 120: szColor = "~g~~h~~h~";
|
||||
case 18 .. 31: szColor = "~y~~h~";
|
||||
case 0 .. 17: szColor = "~r~~h~~h~";
|
||||
default: szColor = "~g~~h~~h~";
|
||||
}
|
||||
|
||||
format( szFPS, sizeof( szFPS ), "%s%d", szColor, iFPS );
|
||||
TextDrawSetString( p_FPSCounterTD[ playerid ], szFPS );
|
||||
}
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook InitializeTextDraws( )
|
||||
{
|
||||
for(new playerid; playerid != MAX_PLAYERS; playerid ++)
|
||||
{
|
||||
p_FPSCounterTD[ playerid ] = TextDrawCreate(636.000000, 2.000000, "_");
|
||||
TextDrawAlignment(p_FPSCounterTD[ playerid ], 3);
|
||||
TextDrawBackgroundColor(p_FPSCounterTD[ playerid ], 255);
|
||||
TextDrawFont(p_FPSCounterTD[ playerid ], 3);
|
||||
TextDrawLetterSize(p_FPSCounterTD[ playerid ], 0.300000, 1.500000);
|
||||
TextDrawColor(p_FPSCounterTD[ playerid ], -1);
|
||||
TextDrawSetOutline(p_FPSCounterTD[ playerid ], 1);
|
||||
TextDrawSetProportional(p_FPSCounterTD[ playerid ], 1);
|
||||
}
|
||||
}
|
494
gamemodes/irresistible/features/furniture.pwn
Normal file
494
gamemodes/irresistible/features/furniture.pwn
Normal file
@ -0,0 +1,494 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: static_cnr\furniture.inc
|
||||
* Purpose: removals of static furniture objects in buildings or player interiors
|
||||
*/
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
initializePlayerInteriors( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
static stock initializePlayerInteriors( playerid )
|
||||
{
|
||||
//Katie - 271.884979,306.631988,999.148437 - DEFAULT - 2
|
||||
RemoveBuildingForPlayer( playerid, 2251, 266.4531, 303.3672, 998.9844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14867, 270.2813, 302.5547, 999.6797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1720, 272.9063, 304.7891, 998.1641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14870, 273.1641, 303.1719, 1000.9141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2251, 273.9922, 303.3672, 998.9844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14868, 274.1328, 304.5078, 1001.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 948, 266.5703, 306.4453, 998.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14866, 270.1172, 307.6094, 998.7578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14869, 273.8125, 305.0156, 998.9531, 0.25 );
|
||||
//Denise - 244.411987,305.032989,999.148437 - $10,000 - 1
|
||||
RemoveBuildingForPlayer( playerid, 14862, 245.5547, 300.8594, 998.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1740, 243.8828, 301.9766, 998.2344, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14861, 245.7578, 302.2344, 998.5469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14860, 246.5156, 301.5859, 1000.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14864, 246.1875, 303.1094, 998.2656, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1734, 246.7109, 303.8750, 1002.1172, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14863, 246.9844, 303.5781, 998.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2103, 248.4063, 300.5625, 999.3047, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 248.4922, 304.3516, 998.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1741, 248.4844, 306.1250, 998.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1741, 248.8672, 301.9609, 998.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1744, 250.1016, 301.9609, 999.4531, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1744, 250.1016, 301.9609, 1000.1563, 0.25 );
|
||||
//Michelle - 302.180999,300.722991,999.148437 - $25,000 - 4
|
||||
RemoveBuildingForPlayer( playerid, 2338, 299.9375, 300.5078, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2334, 299.9375, 301.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2336, 301.9297, 300.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2334, 299.9375, 302.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2170, 299.9141, 303.3906, 1002.5313, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2334, 299.9375, 304.2734, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2334, 302.9219, 301.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2338, 302.9219, 300.5078, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2226, 303.1797, 302.4219, 1003.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2335, 302.9219, 302.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2337, 302.9219, 303.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2335, 302.9219, 304.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2069, 304.1641, 300.3594, 1002.3828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1768, 306.3906, 302.4219, 1002.2969, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1782, 304.0156, 302.8281, 1002.3047, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1752, 303.9063, 304.2109, 1002.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2235, 304.6641, 303.6797, 1002.3438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2158, 299.9297, 305.3516, 1002.5469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2158, 299.9297, 306.3516, 1002.5469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2147, 299.9141, 307.3906, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2335, 302.9219, 305.5000, 1002.5391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1768, 307.0313, 305.4375, 1002.2969, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14880, 309.1484, 301.7266, 1002.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2069, 310.5547, 300.3594, 1002.3828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14879, 308.3203, 305.9141, 1002.6172, 0.25 );
|
||||
//Gang House - 318.564971,1118.209960,1083.882812 - $35,000 - 5
|
||||
RemoveBuildingForPlayer( playerid, 2158, 305.2188, 1120.2109, 1082.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2330, 308.6953, 1120.8203, 1082.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1802, 307.1875, 1121.8281, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2846, 309.9844, 1121.4063, 1082.8906, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2840, 309.8125, 1123.4766, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 309.0391, 1124.5547, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1720, 309.8594, 1124.5938, 1082.8906, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1750, 315.6797, 1116.6563, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2867, 318.0703, 1122.9844, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2858, 321.4141, 1122.4063, 1082.8984, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.2578, 1124.5469, 1083.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.3359, 1124.5547, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.4688, 1125.0313, 1083.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.4688, 1125.0313, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.7266, 1124.5547, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2855, 316.7266, 1124.5547, 1083.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2852, 316.5469, 1124.7031, 1083.1563, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1728, 319.0469, 1124.3047, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2262, 317.7266, 1124.8047, 1084.8594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2844, 321.6406, 1127.9375, 1082.9531, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1793, 321.3828, 1128.4453, 1082.8828, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2859, 324.4453, 1118.9844, 1082.9063, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2860, 324.6094, 1120.7969, 1082.8906, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2103, 327.0391, 1116.9766, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1710, 326.2109, 1121.2656, 1082.8984, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2147, 331.9922, 1118.8672, 1082.8594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2338, 334.3906, 1118.8203, 1082.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2337, 334.3906, 1119.8125, 1082.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2170, 334.4531, 1121.8281, 1082.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2116, 331.4922, 1122.5469, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2857, 322.2422, 1123.7109, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2295, 326.8438, 1124.4844, 1082.8594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2336, 334.2500, 1123.8672, 1082.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2335, 334.2422, 1124.8672, 1082.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2334, 334.2422, 1125.8672, 1082.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2852, 321.6719, 1130.3516, 1083.5547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1728, 325.5078, 1130.8516, 1082.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2819, 323.4453, 1131.1250, 1082.8984, 0.25 );
|
||||
//Carl - 2496.049804,-1695.238159,1014.742187 - $50,000 - 3
|
||||
RemoveBuildingForPlayer( playerid, 2865, 2499.5000, -1712.2188, 1014.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2821, 2500.9297, -1710.3516, 1014.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1509, 2501.1953, -1710.6953, 1015.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2277, 2494.7578, -1705.3281, 1018.8984, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1512, 2500.8906, -1706.5703, 1015.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1509, 2501.1953, -1706.8594, 1015.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1520, 2501.2969, -1707.2344, 1014.9141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1520, 2501.2969, -1707.3594, 1014.9141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2830, 2491.8359, -1702.9375, 1014.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2306, 2491.8359, -1701.2813, 1017.3516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1794, 2492.9688, -1701.8516, 1017.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2275, 2493.4297, -1699.8594, 1019.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2306, 2494.0156, -1701.3125, 1017.3516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2247, 2494.1172, -1700.3359, 1018.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14478, 2494.4297, -1698.3359, 1014.0391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1740, 2495.2891, -1704.4922, 1017.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2816, 2494.8047, -1702.5156, 1018.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2272, 2496.2188, -1702.5234, 1018.5859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14477, 2501.0703, -1697.6172, 1016.1250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14490, 2501.0703, -1697.6172, 1016.1250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14491, 2501.0703, -1697.6172, 1016.1250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2252, 2493.0469, -1697.1875, 1014.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2827, 2497.6563, -1697.0703, 1014.7266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14489, 2490.4453, -1694.8672, 1015.4609, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2028, 2491.3438, -1694.7656, 1013.8359, 0.25 );
|
||||
//colonelhouse - 2807.619873,-1171.899902,1025.570312 - $60,000 - 8
|
||||
RemoveBuildingForPlayer( playerid, 2046, 2806.2266, -1174.5703, 1026.3594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2049, 2805.2109, -1173.4922, 1026.5234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2241, 2805.6875, -1173.5156, 1025.0703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2810.3047, -1172.8516, 1025.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2810.3047, -1172.8516, 1025.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2810.3047, -1172.8516, 1024.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2810.3047, -1172.8516, 1024.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2811.6016, -1172.8516, 1024.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2811.6016, -1172.8516, 1024.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2811.6016, -1172.8516, 1025.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2811.6016, -1172.8516, 1025.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2048, 2805.2109, -1172.0547, 1026.8906, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2055, 2805.1953, -1170.5391, 1026.5078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2060, 2810.0234, -1171.2266, 1024.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2064, 2810.8359, -1171.8984, 1025.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2068, 2809.2031, -1169.3672, 1027.5313, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2069, 2806.3906, -1166.8203, 1024.6250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1764, 2808.6563, -1166.9531, 1024.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2100, 2805.5078, -1165.5625, 1024.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2276, 2809.2109, -1165.2734, 1026.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1821, 2810.5938, -1167.6172, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2053, 2810.6094, -1167.5781, 1024.6328, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2058, 2809.6406, -1165.3359, 1024.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2272, 2811.3438, -1165.2734, 1026.7891, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2297, 2811.0234, -1165.0625, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1765, 2811.4766, -1168.4063, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2241, 2811.6875, -1168.5078, 1028.6797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2059, 2814.8359, -1173.4766, 1025.3594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2116, 2814.3047, -1173.4219, 1024.5547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2050, 2813.1250, -1173.3359, 1026.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1736, 2812.8281, -1172.2969, 1027.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2051, 2813.1250, -1171.2891, 1026.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2121, 2813.9531, -1172.4609, 1025.0859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2121, 2815.3828, -1172.4844, 1025.0859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2275, 2812.6094, -1168.1094, 1026.4453, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2156, 2813.6484, -1167.0000, 1024.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2160, 2815.8984, -1164.9063, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2159, 2817.2656, -1164.9063, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2157, 2818.7109, -1173.9531, 1024.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2157, 2818.6406, -1164.9063, 1024.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2300, 2818.6484, -1166.5078, 1028.1719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2046, 2819.4453, -1174.0000, 1026.3594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2091, 2819.8047, -1165.6641, 1028.1641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2157, 2820.6328, -1167.3125, 1024.5703, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2255, 2814.5703, -1169.2891, 1029.9141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2047, 2817.3125, -1170.9688, 1031.1719, 0.25 );
|
||||
//Modern Style - 2260.70,-1210.45,1049.02 - $70,000 - 10
|
||||
RemoveBuildingForPlayer( playerid, 1741, 2261.6953, -1223.0781, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2258.1406, -1220.5859, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2090, 2258.5938, -1221.5469, 1048.0625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2251.3594, -1218.1797, 1048.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 2254.4063, -1218.2734, 1048.0234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2247.5547, -1213.9219, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2247.5547, -1212.9375, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2121, 2250.3047, -1213.9375, 1048.5234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, 2252.4297, -1215.4531, 1048.0391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2523, 2254.1953, -1215.4531, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2297, 2255.4219, -1213.5313, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2248, 2262.3906, -1215.5469, 1048.6094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1816, 2261.4141, -1213.4531, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2247.2969, -1212.1641, 1049.6250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2247.2969, -1208.8594, 1049.6250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2247.5625, -1211.9531, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2136, 2247.5469, -1210.9688, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2303, 2247.5469, -1208.9844, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2247.5547, -1207.9766, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2305, 2247.5547, -1206.9922, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2109, 2250.2813, -1212.2500, 1048.4141, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2121, 2249.2344, -1211.4531, 1048.5234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2121, 2250.3047, -1210.8984, 1048.5234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2135, 2248.5234, -1206.9922, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2319, 2250.3438, -1206.9609, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1760, 2261.4609, -1212.0625, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2126, 2258.1094, -1210.3750, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15044, 2255.0938, -1209.7813, 1048.0313, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2247, 2258.4766, -1209.7891, 1048.9922, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2099, 2262.8047, -1208.4922, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2254, 2254.1172, -1206.5000, 1050.7578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2240, 2254.6328, -1207.2734, 1048.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2252, 2256.2109, -1206.1016, 1048.8281, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2235, 2256.2188, -1206.8594, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1760, 2257.6172, -1207.7266, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2235, 2261.4297, -1206.2031, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2252, 2262.1172, -1206.1016, 1048.8281, 0.25 );
|
||||
//Modern-Stlyle - 2365.42,-1131.8,1050.88 - $72,000 - 8
|
||||
RemoveBuildingForPlayer( playerid, 2077, 2357.5469, -1134.1875, 1050.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2298, 2361.2969, -1134.1484, 1049.8594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2141, 2367.5625, -1135.3906, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2339, 2367.5625, -1134.3906, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2134, 2367.5625, -1133.3906, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2077, 2357.5469, -1131.5234, 1050.6875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2271, 2357.8594, -1132.8828, 1051.2813, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2087, 2360.2969, -1129.9766, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2103, 2360.8281, -1130.1406, 1051.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2279, 2369.8125, -1135.4375, 1052.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2125, 2370.5781, -1134.0313, 1050.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2125, 2371.7500, -1133.5938, 1050.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2278, 2372.1875, -1135.4297, 1052.1250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2030, 2371.2266, -1132.9219, 1050.2734, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2812, 2371.2969, -1133.0156, 1050.6641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2125, 2371.7500, -1131.8594, 1050.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2125, 2370.5781, -1131.8594, 1050.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2141, 2374.5000, -1135.3906, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2132, 2374.5000, -1131.3906, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2339, 2374.5078, -1134.3828, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2134, 2374.5078, -1133.3828, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2339, 2374.5078, -1130.3828, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2225, 2369.1797, -1125.8047, 1049.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2260, 2369.7188, -1123.8594, 1052.0781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2331, 2367.3672, -1123.1563, 1050.1172, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2302, 2364.5547, -1122.9688, 1049.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2259, 2368.6094, -1122.5078, 1052.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2333, 2367.5703, -1122.1484, 1049.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2255, 2361.5703, -1122.1484, 1052.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2811, 2372.7031, -1128.9141, 1049.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15061, 2371.6094, -1128.1875, 1051.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15062, 2371.6094, -1128.1875, 1051.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2868, 2370.1250, -1125.2344, 1049.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2370.3906, -1124.4375, 1049.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1822, 2372.0938, -1124.2188, 1049.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2828, 2374.2578, -1129.2578, 1050.7891, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2084, 2374.4688, -1129.2109, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2374.6797, -1122.5313, 1049.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2281, 2375.6641, -1128.1016, 1051.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2868, 2374.9766, -1125.2344, 1049.8672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2280, 2375.6484, -1122.3828, 1051.9922, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2227, 2370.2344, -1120.5859, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1742, 2366.6953, -1119.2500, 1049.8750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2371.6016, -1121.5078, 1049.8438, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2227, 2375.5859, -1120.9922, 1049.8750, 0.25 );
|
||||
//Nice House - 2324.419921,-1145.568359,1050.710083 - $80000 - 12
|
||||
RemoveBuildingForPlayer( playerid, 2123, 2312.9609, -1145.0703, 1050.3203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2123, 2314.2969, -1146.3125, 1050.3203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2123, 2315.4219, -1145.0703, 1050.3203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2086, 2314.2734, -1144.8984, 1050.0859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2123, 2314.2969, -1143.6250, 1050.3203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15045, 2324.4297, -1143.3125, 1049.6016, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1144.0859, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2335.3594, -1144.0703, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2135, 2336.3516, -1144.0781, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2305, 2337.3203, -1144.0781, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1143.1016, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2337.3203, -1143.0938, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2322.2266, -1142.4766, 1049.4766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1822, 2323.9297, -1142.2578, 1049.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1741, 2312.6484, -1140.7891, 1053.3750, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1142.1094, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1141.1172, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2334.4219, -1140.9688, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2326.5234, -1140.5703, 1049.4766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2337.3203, -1142.1094, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2337.3125, -1141.1094, 1049.6641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2338.4531, -1141.3672, 1053.2734, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15050, 2330.3281, -1140.3047, 1051.9063, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1140.1328, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2323.4375, -1139.5469, 1049.4766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2333.3281, -1139.8672, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2115, 2334.4297, -1139.6250, 1049.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15049, 2334.3281, -1139.5859, 1051.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2335.3672, -1139.8750, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2303, 2337.3281, -1140.1172, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2090, 2309.5156, -1139.3438, 1053.4219, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1139.1406, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2333.3281, -1138.8281, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2335.3672, -1138.8359, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2298, 2336.5391, -1138.7891, 1053.2813, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1138.1563, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2136, 2337.3281, -1138.1328, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2240, 2319.2500, -1137.8750, 1050.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2240, 2329.5000, -1137.8750, 1050.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1137.1641, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2334.4219, -1137.5859, 1050.3359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2337.3125, -1137.1484, 1049.6641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2310.6641, -1136.3047, 1053.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2257, 2320.4141, -1134.6328, 1053.8281, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1136.1719, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2331.3359, -1135.1875, 1049.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2254, 2328.1484, -1134.6172, 1054.0625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2281, 2335.2656, -1136.4063, 1054.7266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2106, 2336.5156, -1135.0156, 1053.8047, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2271, 2337.8047, -1135.3516, 1054.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2337.3203, -1136.1641, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2337.3203, -1135.1797, 1049.6719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2106, 2339.2031, -1135.0156, 1053.8047, 0.25 );
|
||||
// Butcher
|
||||
RemoveBuildingForPlayer( playerid, 14612, 961.1719, 2166.5781, 1012.7344, 0.25 );
|
||||
// Mundus
|
||||
RemoveBuildingForPlayer( playerid, 2240, 26.1563, 1343.2969, 1083.9531, 0.25 );
|
||||
// Godfather
|
||||
RemoveBuildingForPlayer( playerid, 1739, 149.2266, 1381.5234, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 149.2266, 1380.5469, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 151.5469, 1380.5469, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 151.5469, 1381.5234, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2117, 150.4297, 1381.6016, 1082.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 149.2266, 1382.7422, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 151.5469, 1382.6563, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2117, 150.4297, 1383.5938, 1082.8516, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 151.5469, 1383.7500, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 149.2266, 1383.8203, 1083.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2312, 151.818466, 1369.827148, 1083.859375, 19994.000 );
|
||||
// Lorem
|
||||
RemoveBuildingForPlayer( playerid, 2524, 219.6719, 1072.9922, 1083.1641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2525, 219.6250, 1074.4844, 1083.1875, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, 219.5859, 1076.3750, 1083.1719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2524, 225.1563, 1085.5313, 1086.8125, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, 227.4766, 1087.1875, 1086.8047, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2525, 225.1563, 1087.2734, 1086.8203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2527, -64.8281, 1355.4609, 1079.1719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, -64.1875, 1353.5781, 1079.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2525, -62.7734, 1356.4844, 1079.1953, 0.25 );
|
||||
// Bulbus
|
||||
RemoveBuildingForPlayer( playerid, 2527, -64.8281, 1355.4609, 1079.1719, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, -64.1875, 1353.5781, 1079.1797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2525, -62.7734, 1356.4844, 1079.1953, 0.25 );
|
||||
// Fossor
|
||||
RemoveBuildingForPlayer( playerid, 2523, 249.6953, 1291.7813, 1079.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 249.5938, 1293.5469, 1079.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2520, 252.3203, 1293.4844, 1079.2344, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2522, 249.6719, 1294.4766, 1079.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15035, 2205.9375, -1073.9922, 1049.4844, 0.25 );
|
||||
// Angusto
|
||||
RemoveBuildingForPlayer( playerid, 2523, 249.6953, 1291.7813, 1079.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 249.5938, 1293.5469, 1079.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2520, 252.3203, 1293.4844, 1079.2344, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2522, 249.6719, 1294.4766, 1079.2031, 0.25 );
|
||||
// Artus
|
||||
RemoveBuildingForPlayer( playerid, 2248, 2235.8281, -1081.6484, 1048.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2248, 2239.2266, -1081.6484, 1048.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1798, 2242.0469, -1078.4297, 1048.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1798, 2244.5469, -1078.4297, 1048.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2248, 2235.8281, -1070.2188, 1048.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2523, 2236.0391, -1068.9063, 1048.0547, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2236.1406, -1064.1953, 1048.6641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2264, 2239.0156, -1071.6094, 1050.0625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15057, 2240.6016, -1072.7031, 1048.0391, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2270, 2238.9063, -1068.9844, 1050.0469, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2248, 2239.2188, -1070.2188, 1048.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2280, 2240.3203, -1070.8906, 1050.2188, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2240.7344, -1069.5156, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, 2237.2500, -1066.5391, 1048.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2237.9063, -1064.2891, 1047.9766, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 2238.8516, -1068.1563, 1048.0234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2238.9531, -1064.8125, 1050.5625, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2269, 2240.3203, -1068.4453, 1050.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2108, 2240.7734, -1066.3047, 1048.0234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1741, 2241.3125, -1072.4688, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2297, 2242.1719, -1066.2266, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1822, 2243.3281, -1067.8281, 1048.0234, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2243.8203, -1073.1875, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2271, 2245.3203, -1068.4453, 1050.1172, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1703, 2245.0313, -1067.6094, 1048.0156, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2108, 2244.7969, -1066.2734, 1048.0234, 0.25 );
|
||||
// Vindemia
|
||||
RemoveBuildingForPlayer( playerid, 2523, 284.5078, 1480.5156, 1079.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 284.4063, 1482.2813, 1079.2500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2522, 284.4844, 1484.4219, 1079.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2520, 287.1328, 1483.4297, 1079.2266, 0.25 );
|
||||
// Caelum
|
||||
RemoveBuildingForPlayer( playerid, 1567, 2231.2969, -1111.4609, 1049.8594, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15039, 2232.3438, -1106.7422, 1049.7500, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15038, 2235.2891, -1108.1328, 1051.2656, 0.25 );
|
||||
//Ascensor
|
||||
RemoveBuildingForPlayer( playerid, 2259, 2316.3125, -1024.5156, 1051.3203, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2242, 2321.4609, -1019.7500, 1049.3672, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2078, 2318.2578, -1017.6016, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2203, 2312.1641, -1014.5547, 1050.4219, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2312.3750, -1014.5547, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2830, 2312.1406, -1013.6719, 1050.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2312.3750, -1013.5625, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2241, 2322.4453, -1026.4453, 1050.5000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2244, 2322.3594, -1019.8906, 1049.4844, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2112, 2322.6563, -1026.4219, 1049.5938, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2105, 2323.0156, -1026.8594, 1050.4453, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2224, 2322.6953, -1019.0859, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2281, 2324.3125, -1017.7969, 1051.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2261, 2322.4609, -1015.4297, 1051.1563, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2165, 2323.3750, -1015.8984, 1053.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1714, 2323.7500, -1014.8594, 1053.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1755, 2325.2734, -1025.0625, 1049.1406, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2229, 2325.6406, -1017.2813, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2107, 2326.0703, -1016.6719, 1050.6641, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2325.5313, -1015.0938, 1053.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 15060, 2326.6641, -1022.1953, 1049.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2280, 2327.3125, -1017.7969, 1051.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2104, 2327.1719, -1017.2109, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2088, 2327.4766, -1015.0938, 1053.6953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2312.3750, -1012.5703, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2303, 2312.3594, -1011.5859, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2313.8906, -1011.5781, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2314.9844, -1012.6797, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2115, 2314.9922, -1011.4063, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2832, 2315.0547, -1011.2813, 1050.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2315.9297, -1011.5859, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2831, 2312.1875, -1010.6563, 1050.2656, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2136, 2312.3594, -1010.6094, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2313.8906, -1010.5391, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2315.9297, -1010.5469, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2317.3438, -1009.5938, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2079, 2314.9844, -1009.2969, 1049.8359, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1822, 2324.3359, -1012.2188, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2333, 2323.4922, -1009.7266, 1053.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2323.7891, -1009.5938, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2324.7813, -1009.5938, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2331, 2323.4453, -1009.2813, 1053.9531, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2298, 2325.0625, -1010.7188, 1053.7031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2325.7813, -1009.5938, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1822, 2326.6250, -1012.2188, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2326.7734, -1009.5938, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2312.3672, -1008.6094, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2138, 2314.3281, -1007.6328, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2305, 2312.3672, -1007.6250, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2135, 2313.3359, -1007.6250, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2317.3438, -1008.6016, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1735, 2318.8047, -1007.9688, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2139, 2317.3438, -1007.6094, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2287, 2320.0547, -1007.2500, 1055.7578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2194, 2322.3594, -1008.4453, 1054.9453, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2106, 2325.0391, -1006.9453, 1054.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2528, 2321.2656, -1006.0313, 1053.7266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2249, 2323.0156, -1005.8828, 1054.3984, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2526, 2318.3750, -1003.0703, 1053.7422, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2523, 2322.2500, -1003.0703, 1053.7188, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1760, 2327.8047, -1021.0313, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2295, 2328.7891, -1015.8281, 1049.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 2328.8359, -1023.6016, 1050.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 2329.0469, -1022.6953, 1050.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2229, 2329.0703, -1017.2813, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2295, 2329.2578, -1015.8281, 1053.7891, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2327.7578, -1009.5938, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2106, 2327.7266, -1006.9453, 1054.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2329.1875, -1011.0078, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2329.1875, -1011.9922, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2291, 2329.1875, -1010.0234, 1049.2109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2285, 2328.9766, -1007.6406, 1051.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2869, 2329.2891, -1025.8672, 1049.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2829, 2329.4688, -1023.6250, 1050.0078, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2868, 2329.7656, -1023.0156, 1050.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2117, 2329.6953, -1022.5859, 1049.2031, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 2330.3672, -1023.5156, 1050.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1739, 2330.3672, -1022.6875, 1050.1094, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2243, 2329.2969, -1018.0313, 1049.3984, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2096, 2330.2266, -1012.9688, 1053.7109, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2240, 2330.7422, -1010.7813, 1054.2578, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2096, 2330.2266, -1009.1875, 1053.7109, 0.25 );
|
||||
// Aurora
|
||||
RemoveBuildingForPlayer( playerid, 1738, -2171.4766, 643.6875, 1057.2344, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2233, -2167.4219, 640.7500, 1056.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2296, -2168.4219, 643.7344, 1056.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2028, -2167.5859, 644.6875, 1056.6797, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2108, -2168.3125, 646.7656, 1056.6016, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2233, -2165.4531, 640.7500, 1056.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2225, -2166.2344, 640.9297, 1056.5781, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14554, -2164.5469, 641.1016, 1056.0000, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1819, -2167.2422, 643.7031, 1056.5859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2288, -2166.7344, 646.7734, 1058.2266, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 14543, -2163.6563, 644.9063, 1058.6250, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2271, -2161.9609, 646.7422, 1058.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2270, -2158.4141, 646.7656, 1058.2188, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 2108, -2163.8438, 646.9844, 1056.6016, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1742, -2160.3906, 647.3906, 1056.5859, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 1738, -2158.3906, 647.0859, 1057.2344, 0.25 );
|
||||
}
|
369
gamemodes/irresistible/features/gangs/cannon.pwn
Normal file
369
gamemodes/irresistible/features/gangs/cannon.pwn
Normal file
@ -0,0 +1,369 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: cannon.inc
|
||||
* Purpose: orbital cannon implementation for gang facilities
|
||||
*/
|
||||
|
||||
#if !defined MAX_FACILITIES
|
||||
#error "This module requires facility module!"
|
||||
#endif
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define ORBITAL_CANNON_TICK ( 100 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_ORBITAL_CANNON_DATA
|
||||
{
|
||||
Float: E_POS[ 3 ], Float: E_ZOOM, E_TIMER,
|
||||
E_FIRE_TICK, E_COOL_DOWN
|
||||
};
|
||||
|
||||
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 ]
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnScriptInit( )
|
||||
{
|
||||
// textdraw
|
||||
g_orbitalAimTD = TextDrawCreate( 305.000000, 205.000000, "+" );
|
||||
TextDrawBackgroundColor( g_orbitalAimTD, 0 );
|
||||
TextDrawFont( g_orbitalAimTD, 2 );
|
||||
TextDrawLetterSize( g_orbitalAimTD, 1.000000, 4.000000 );
|
||||
TextDrawColor( g_orbitalAimTD, -16777152 );
|
||||
TextDrawSetOutline( g_orbitalAimTD, 1 );
|
||||
TextDrawSetProportional( g_orbitalAimTD, 1 );
|
||||
|
||||
// starting data
|
||||
for ( new facilityid = 0; facilityid < sizeof( g_orbitalCannonData ); facilityid ++ ) {
|
||||
g_orbitalCannonData[ facilityid ] [ E_TIMER ] = -1;
|
||||
for ( new i = 0; i < sizeof( g_orbitalPlayerLabels[ ] ); i ++ ) {
|
||||
g_orbitalPlayerLabels[ facilityid ] [ i ] = Text3D: INVALID_3DTEXT_ID;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook SetPlayerRandomSpawn( playerid )
|
||||
{
|
||||
if ( GetPVarType( playerid, "left_cannon" ) != PLAYER_VARTYPE_NONE )
|
||||
{
|
||||
new facilityid = GetPVarInt( playerid, "left_cannon" );
|
||||
new int_type = g_gangFacilities[ facilityid ] [ E_INTERIOR_TYPE ];
|
||||
|
||||
// place in facility
|
||||
pauseToLoad( playerid );
|
||||
SetPVarInt( playerid, "in_facility", facilityid );
|
||||
UpdatePlayerEntranceExitTick( 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 );
|
||||
|
||||
// set camera
|
||||
DeletePVar( playerid, "left_cannon" );
|
||||
SetCameraBehindPlayer( playerid );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
ClosePlayerOrbitalCannon( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath(playerid, killerid, reason)
|
||||
#endif
|
||||
{
|
||||
ClosePlayerOrbitalCannon( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Callbacks ** */
|
||||
function OnPlayerOrbitalCannonUpdate( facilityid, playerid )
|
||||
{
|
||||
new Float: current_pos[ 3 ];
|
||||
new Float: move_unit = 10.0;
|
||||
new keys, ud, lr;
|
||||
|
||||
GetPlayerKeys( playerid, keys, ud, lr );
|
||||
|
||||
// store local positions
|
||||
current_pos[ 0 ] = g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ];
|
||||
current_pos[ 1 ] = g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ];
|
||||
MapAndreas_FindZ_For2DCoord( current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ] );
|
||||
|
||||
// close
|
||||
if ( ( keys & KEY_CROUCH ) || IsPlayerJailed( playerid ) || IsPlayerAFK( playerid ) || ( GetPlayerCash( playerid ) < 250000 && ! g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] ) )
|
||||
{
|
||||
SetPVarInt( playerid, "left_cannon", facilityid );
|
||||
HidePlayerHelpDialog( playerid );
|
||||
if ( IsPlayerMovieMode( playerid ) ) cmd_moviemode( playerid, "" );
|
||||
ClosePlayerOrbitalCannon( playerid );
|
||||
return TogglePlayerSpectating( playerid, 0 );
|
||||
}
|
||||
|
||||
// fire ammo
|
||||
if ( ( keys & KEY_SPRINT ) && ! g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] )
|
||||
{
|
||||
// add tick (ms) for countdown
|
||||
g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] += ORBITAL_CANNON_TICK;
|
||||
|
||||
// just pressed fire? move camera
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] == ORBITAL_CANNON_TICK ) {
|
||||
// smoothly move camera
|
||||
InterpolateCameraPos(
|
||||
playerid,
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ],
|
||||
current_pos[ 2 ] + g_orbitalCannonData[ facilityid ] [ E_ZOOM ],
|
||||
current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ] + g_orbitalCannonData[ facilityid ] [ E_ZOOM ] + 50.0,
|
||||
5000
|
||||
);
|
||||
|
||||
InterpolateCameraLookAt(
|
||||
playerid,
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ], current_pos[ 2 ],
|
||||
current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ],
|
||||
5000
|
||||
);
|
||||
}
|
||||
|
||||
// alert
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] % 1000 == 0 )
|
||||
{
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] > 3000 )
|
||||
{
|
||||
g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] = 0;
|
||||
g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] = ORBITAL_CANNON_TICK * 20;
|
||||
|
||||
new rocket = CreateDynamicObject( 3786, current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ] + g_orbitalCannonData[ facilityid ] [ E_ZOOM ], 5.0, -90.0, 0.0 );
|
||||
new move_speed = MoveDynamicObject( rocket, current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ], 100.0 );
|
||||
Streamer_Update( playerid, STREAMER_TYPE_OBJECT );
|
||||
|
||||
GivePlayerCash( playerid, -250000 );
|
||||
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 );
|
||||
GameTextForPlayer( playerid, "~g~FIRED!", 2000, 3 );
|
||||
SendServerMessage( playerid, "You have launched an orbital cannon for "COL_GOLD"$250,000"COL_WHITE", you have %s left.", number_format( GetPlayerCash( playerid ) ) );
|
||||
return SetTimerEx( "OnPlayerFireOrbitalCannon", move_speed, false, "ddfff", playerid, rocket, current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
g_orbitalCannonData[ facilityid ] [ E_ZOOM ] += 2.0;
|
||||
GameTextForPlayer( playerid, sprintf( "~r~%d", g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] / 1000 ), 2000, 3 );
|
||||
PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] = 0;
|
||||
}
|
||||
|
||||
// deduct cooldown
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] && ( g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] -= ORBITAL_CANNON_TICK ) <= 0 )
|
||||
g_orbitalCannonData[ facilityid ] [ E_COOL_DOWN ] = 0;
|
||||
|
||||
// begin movement
|
||||
if ( ! g_orbitalCannonData[ facilityid ] [ E_FIRE_TICK ] )
|
||||
{
|
||||
// zoom in
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_ZOOM ] > 75.0 ) move_unit = g_orbitalCannonData[ facilityid ] [ E_ZOOM ] / 7.5;
|
||||
else if ( g_orbitalCannonData[ facilityid ] [ E_ZOOM ] <= 20.0 ) move_unit = 5.0;
|
||||
|
||||
// move camera
|
||||
if ( ud == KEY_UP ) current_pos[ 1 ] += move_unit;
|
||||
else if ( ud == KEY_DOWN ) current_pos[ 1 ] -= move_unit;
|
||||
|
||||
if ( lr == KEY_LEFT ) current_pos[ 0 ] -= move_unit;
|
||||
else if ( lr == KEY_RIGHT ) current_pos[ 0 ] += move_unit;
|
||||
|
||||
// zoom in
|
||||
if ( keys & KEY_FIRE ) {
|
||||
if ( ( g_orbitalCannonData[ facilityid ] [ E_ZOOM ] -= move_unit ) < 20.0 ) {
|
||||
g_orbitalCannonData[ facilityid ] [ E_ZOOM ] = 20.0;
|
||||
}
|
||||
}
|
||||
else if ( keys & KEY_AIM ) {
|
||||
if ( ( g_orbitalCannonData[ facilityid ] [ E_ZOOM ] += move_unit ) > 300.0 ) {
|
||||
g_orbitalCannonData[ facilityid ] [ E_ZOOM ] = 300.0;
|
||||
}
|
||||
}
|
||||
|
||||
// smoothly move camera
|
||||
InterpolateCameraPos(
|
||||
playerid,
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 2 ] + g_orbitalCannonData[ facilityid ] [ E_ZOOM ],
|
||||
current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ] + g_orbitalCannonData[ facilityid ] [ E_ZOOM ],
|
||||
150
|
||||
);
|
||||
|
||||
InterpolateCameraLookAt(
|
||||
playerid,
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ], g_orbitalCannonData[ facilityid ] [ E_POS ] [ 2 ],
|
||||
current_pos[ 0 ], current_pos[ 1 ], current_pos[ 2 ],
|
||||
150
|
||||
);
|
||||
}
|
||||
|
||||
// update
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] = current_pos;
|
||||
return 1;
|
||||
}
|
||||
|
||||
function OnPlayerFireOrbitalCannon( playerid, rocketid, Float: X, Float: Y, Float: Z )
|
||||
{
|
||||
new Float: player_X, Float: player_Y, Float: player_Z;
|
||||
|
||||
// destroy the rocket after it is moved
|
||||
DestroyDynamicObject( rocketid );
|
||||
|
||||
// kill everyone in that area
|
||||
foreach ( new i : Player ) if ( GetPlayerGang( i ) != GetPlayerGang( playerid ) && GetPlayerVirtualWorld( i ) == 0 && GetPlayerInterior( i ) == 0 && ! IsPlayerJailed( i ) && ! IsPlayerAdminOnDuty( i ) && ! IsPlayerSpawnProtected( i ) )
|
||||
{
|
||||
new
|
||||
player_state = GetPlayerState( i );
|
||||
|
||||
if ( GetPlayerPos( i, player_X, player_Y, player_Z ) && player_Z >= Z && player_state != PLAYER_STATE_WASTED && player_state != PLAYER_STATE_SPECTATING )
|
||||
{
|
||||
new
|
||||
Float: distance_squared = VectorSize( player_X - X, player_Y - Y, 0.0 );
|
||||
|
||||
if ( distance_squared < 30.0 )
|
||||
{
|
||||
// slay user
|
||||
#if defined AC_INCLUDED
|
||||
ForcePlayerKill( i, playerid, 51 );
|
||||
#else
|
||||
SetPlayerHealth( i, -1 );
|
||||
#endif
|
||||
|
||||
// explode player
|
||||
SendClientMessageToAllFormatted( -1, ""COL_ORANGE"[ORBITAL CANNON]"COL_WHITE" %s(%d) got rekt by %s(%d)'s orbital cannon.", ReturnPlayerName( i ), i, ReturnPlayerName( playerid ), playerid );
|
||||
CreateExplosion( player_X, player_Y, player_Z, 0, 10.0 );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create explosion
|
||||
CreateExplosion( X, Y, Z, 6, 10.0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock StartPlayerOrbitalCannon( playerid, facilityid )
|
||||
{
|
||||
if ( g_orbitalCannonData[ facilityid ] [ E_TIMER ] != -1 )
|
||||
return 0;
|
||||
|
||||
// player
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
SetPlayerVirtualWorld( playerid, 0 );
|
||||
TogglePlayerSpectating( playerid, 1 );
|
||||
TextDrawShowForPlayer( playerid, g_orbitalAimTD );
|
||||
ShowPlayerHelpDialog( playerid, 0, "~y~Arrows~w~ - Move camera~n~~y~~k~~PED_FIREWEAPON~~w~ - Zoom in~n~~y~~k~~PED_LOCK_TARGET~~w~ - Zoom out~n~~y~~k~~PED_SPRINT~~w~ - Fire cannon ~g~($250,000)~n~~y~~k~~PED_DUCK~~w~ - Cancel" );
|
||||
p_usingOrbitalCannon[ playerid ] = facilityid;
|
||||
if ( ! IsPlayerMovieMode( playerid ) ) cmd_moviemode( playerid, "" );
|
||||
|
||||
// destroy labels (created on stream out/in anyway)
|
||||
for ( new i = 0; i < sizeof( g_orbitalPlayerLabels[ ] ); i ++ ) {
|
||||
DestroyDynamic3DTextLabel( g_orbitalPlayerLabels[ facilityid ] [ i ] );
|
||||
g_orbitalPlayerLabels[ facilityid ] [ i ] = Text3D: INVALID_3DTEXT_ID;
|
||||
}
|
||||
|
||||
// set cannon position
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 0 ] = g_gangFacilities[ facilityid ] [ E_X ];
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 1 ] = g_gangFacilities[ facilityid ] [ E_Y ];
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 2 ] = g_gangFacilities[ facilityid ] [ E_Z ];
|
||||
|
||||
// set zoom of camera
|
||||
g_orbitalCannonData[ facilityid ] [ E_POS ] [ 2 ] += ( g_orbitalCannonData[ facilityid ] [ E_ZOOM ] += 100.0 );
|
||||
|
||||
g_orbitalCannonData[ facilityid ] [ E_TIMER ] = SetTimerEx( "OnPlayerOrbitalCannonUpdate", ORBITAL_CANNON_TICK, true, "dd", facilityid, playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerStreamIn( playerid, forplayerid )
|
||||
{
|
||||
if ( ! IsPlayerNPC( playerid ) && IsPlayerUsingOrbitalCannon( forplayerid ) )
|
||||
{
|
||||
new
|
||||
facilityid = p_usingOrbitalCannon[ forplayerid ];
|
||||
|
||||
if ( 0 <= facilityid < sizeof( g_orbitalCannonData ) )
|
||||
{
|
||||
if ( ! IsValidDynamic3DTextLabel( g_orbitalPlayerLabels[ facilityid ] [ playerid ] ) )
|
||||
{
|
||||
g_orbitalPlayerLabels[ facilityid ] [ playerid ] = CreateDynamic3DTextLabel(
|
||||
sprintf( "%s(%d)", ReturnPlayerName( playerid ), playerid ),
|
||||
setAlpha( GetPlayerColor( playerid ), 0xFF ),
|
||||
0.0, 0.0, 0.0, 300.0,
|
||||
.attachedplayer = playerid,
|
||||
.testlos = 0,
|
||||
.playerid = forplayerid,
|
||||
.streamdistance = 300.0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerStreamOut( playerid, forplayerid )
|
||||
{
|
||||
if ( ! IsPlayerNPC( playerid ) && IsPlayerUsingOrbitalCannon( forplayerid ) )
|
||||
{
|
||||
new
|
||||
facilityid = p_usingOrbitalCannon[ forplayerid ];
|
||||
|
||||
if ( 0 <= facilityid < sizeof( g_orbitalCannonData ) )
|
||||
{
|
||||
if ( IsValidDynamic3DTextLabel( g_orbitalPlayerLabels[ facilityid ] [ playerid ] ) )
|
||||
{
|
||||
DestroyDynamic3DTextLabel( g_orbitalPlayerLabels[ facilityid ] [ playerid ] );
|
||||
g_orbitalPlayerLabels[ facilityid ] [ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock ClosePlayerOrbitalCannon( playerid ) {
|
||||
|
||||
new
|
||||
facilityid = p_usingOrbitalCannon[ playerid ];
|
||||
|
||||
// remove user
|
||||
p_usingOrbitalCannon[ playerid ] = -1;
|
||||
TextDrawHideForPlayer( playerid, g_orbitalAimTD );
|
||||
|
||||
// reset facility portion
|
||||
if ( 0 <= facilityid < sizeof( g_orbitalCannonData ) )
|
||||
{
|
||||
// remove label associated
|
||||
for ( new i = 0; i < sizeof( g_orbitalPlayerLabels[ ] ); i ++ ) {
|
||||
DestroyDynamic3DTextLabel( g_orbitalPlayerLabels[ facilityid ] [ i ] );
|
||||
g_orbitalPlayerLabels[ facilityid ] [ i ] = Text3D: INVALID_3DTEXT_ID;
|
||||
}
|
||||
|
||||
// kill timer
|
||||
KillTimer( g_orbitalCannonData[ facilityid ] [ E_TIMER ] );
|
||||
g_orbitalCannonData[ facilityid ] [ E_TIMER ] = -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock IsPlayerUsingOrbitalCannon( playerid ) {
|
||||
return p_usingOrbitalCannon[ playerid ] != -1;
|
||||
}
|
917
gamemodes/irresistible/features/gangs/facilities.pwn
Normal file
917
gamemodes/irresistible/features/gangs/facilities.pwn
Normal file
@ -0,0 +1,917 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: facilities.inc
|
||||
* Purpose: gang facilities module
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define FACILITY_TAKEOVER_ENABLED ( false )
|
||||
|
||||
#define MAX_FACILITIES ( 24 )
|
||||
#define MAX_FACILITY_BOMB ( 2 )
|
||||
|
||||
#define FACILITY_AMMU_RESPECT ( 75000.0 )
|
||||
#define FACILITY_BLOWUP_TIME ( 10 )
|
||||
|
||||
#define DIALOG_GANG_JOIN ( 9238 )
|
||||
#define DIALOG_FACILITY_AMMU ( 9239 )
|
||||
#define DIALOG_FACILITY_AMMU_BUY ( 9299 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_GANG_FACILITIES
|
||||
{
|
||||
E_GANG_SQL_ID, E_TURF_ID, E_INTERIOR_TYPE,
|
||||
E_WORLD,
|
||||
|
||||
Text3D: E_LABEL[ 2 ], E_CHECKPOINT[ 2 ],
|
||||
|
||||
Float: E_X, Float: E_Y, Float: E_Z,
|
||||
|
||||
E_AMMU_CP, E_SHOP_CP, E_CANNON_CP,
|
||||
E_TRAVEL_CP,
|
||||
|
||||
bool: E_WAR, E_WAR_TIMER, E_WAR_TICK,
|
||||
|
||||
E_BOMB_OBJECT[ 2 ], E_BLOWUP_COUNT[ 2 ],
|
||||
bool: E_BLOWN[ 2 ]
|
||||
};
|
||||
|
||||
enum E_FACILITY_INTERIOR
|
||||
{
|
||||
Float: E_POS[ 3 ],
|
||||
Float: E_CANNON_POS[ 3 ],
|
||||
Float: E_AMMU_POS[ 4 ],
|
||||
Float: E_SHOP_POS[ 4 ],
|
||||
Float: E_TRAVEL_POS[ 4 ],
|
||||
Float: E_ATM_POS[ 4 ],
|
||||
Float: E_BOMB_POS_1[ 4 ],
|
||||
Float: E_BOMB_POS_2[ 4 ]
|
||||
//Float: E_MECHANIC_POS[ 4 ]
|
||||
};
|
||||
|
||||
new
|
||||
g_gangFacilityInterior [ ] [ E_FACILITY_INTERIOR ] =
|
||||
{
|
||||
// default interior
|
||||
{
|
||||
{ 238.9165, 1872.3391, 1861.4607 },
|
||||
{ 212.4133, 1822.7343, 1856.4138 },
|
||||
{ 248.5042, 1797.5060, 1857.4143, 0.000000 },
|
||||
{ 259.9110, 1850.9300, 1858.7600, 0.000000 },
|
||||
{ 261.0079, 1869.5808, 1858.7600, 90.00000 },
|
||||
{ 262.5575, 1850.0053, 1858.3671, 180.0000 },
|
||||
{ 246.722503, 1816.183593, 1855.371826, 90.000000 },
|
||||
{ 246.722503, 1827.754516, 1855.371826, 90.000000 }
|
||||
}
|
||||
},
|
||||
g_gangFacilities [ MAX_FACILITIES ] [ E_GANG_FACILITIES ],
|
||||
// g_gangsWithFacilities [ MAX_FACILITIES ],
|
||||
Iterator: gangfacilities < MAX_FACILITIES >
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// preload gang and facility
|
||||
mysql_function_query( dbHandle, "SELECT `GANG_FACILITIES`.`ID` as `FACILITY_ID`, `GANGS`.*, `GANG_FACILITIES`.* FROM `GANGS` JOIN `GANG_FACILITIES` ON `GANGS`.`ID` = `GANG_FACILITIES`.`GANG_ID`", true, "OnGangFaciltiesLoad", "d", INVALID_PLAYER_ID );
|
||||
|
||||
// initialize facility objects
|
||||
initializeFacilityObjects( );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
||||
{
|
||||
if ( CanPlayerExitEntrance( playerid ) )
|
||||
{
|
||||
new
|
||||
gangid = GetPlayerGang( playerid );
|
||||
|
||||
foreach ( new facility : gangfacilities )
|
||||
{
|
||||
// entrance
|
||||
if ( checkpointid == g_gangFacilities[ facility ] [ E_CHECKPOINT ] [ 0 ] )
|
||||
{
|
||||
new turfid = g_gangFacilities[ facility ] [ E_TURF_ID ];
|
||||
new facility_gangid = Turf_GetFacility( turfid );
|
||||
|
||||
// not in the gang / not a turf owner
|
||||
if ( ! ( Turf_GetOwner( turfid ) == gangid || facility_gangid == gangid ) )
|
||||
{
|
||||
if ( ! IsGangPrivate( facility_gangid ) && gangid == INVALID_GANG_ID )
|
||||
{
|
||||
SetPVarInt( playerid, "gang_facility_join", facility_gangid ); // store gang id
|
||||
return ShowPlayerDialog(
|
||||
playerid, DIALOG_GANG_JOIN, DIALOG_STYLE_MSGBOX,
|
||||
sprintf( "{%06x}%s", g_gangData[ facility_gangid ] [ E_COLOR ] >>> 8, g_gangData[ facility_gangid ] [ E_NAME ] ),
|
||||
""COL_WHITE"This gang is a public gang, would you like to join it?",
|
||||
"Yes", "No"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "You are not in the gang of this facility. Capture it to enter." );
|
||||
}
|
||||
}
|
||||
|
||||
new
|
||||
int_type = g_gangFacilities[ facility ] [ E_INTERIOR_TYPE ];
|
||||
|
||||
// begin entrance
|
||||
pauseToLoad( playerid );
|
||||
SetPVarInt( playerid, "in_facility", facility );
|
||||
PlayerPlaySound( playerid, 1, 0.0, 0.0, 0.0 );
|
||||
UpdatePlayerEntranceExitTick( playerid );
|
||||
SetPlayerPos( playerid, g_gangFacilityInterior[ int_type ] [ E_POS ] [ 0 ], g_gangFacilityInterior[ int_type ] [ E_POS ] [ 1 ], g_gangFacilityInterior[ int_type ] [ E_POS ] [ 2 ] );
|
||||
SetPlayerVirtualWorld( playerid, g_gangFacilities[ facility ] [ E_WORLD ] );
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
// exit
|
||||
else if ( checkpointid == g_gangFacilities[ facility ] [ E_CHECKPOINT ] [ 1 ] )
|
||||
{
|
||||
PlayerPlaySound( playerid, 0, 0.0, 0.0, 0.0 );
|
||||
TogglePlayerControllable( playerid, 0 );
|
||||
UpdatePlayerEntranceExitTick( playerid );
|
||||
SetTimerEx( "ope_Unfreeze", 1250, false, "d", playerid );
|
||||
SetPlayerPosEx( playerid, g_gangFacilities[ facility ] [ E_X ], g_gangFacilities[ facility ] [ E_Y ], g_gangFacilities[ facility ] [ E_Z ], 0 );
|
||||
SetPlayerVirtualWorld( playerid, 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
// ammunation
|
||||
else if ( checkpointid == g_gangFacilities[ facility ] [ E_AMMU_CP ] )
|
||||
{
|
||||
return ShowAmmunationMenu( playerid, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU );
|
||||
}
|
||||
|
||||
// shop
|
||||
else if ( checkpointid == g_gangFacilities[ facility ] [ E_SHOP_CP ] )
|
||||
{
|
||||
return ShowPlayerShopMenu( playerid );
|
||||
}
|
||||
|
||||
// fast travel
|
||||
else if ( checkpointid == g_gangFacilities[ facility ] [ E_TRAVEL_CP ] )
|
||||
{
|
||||
if ( GetPlayerWantedLevel( playerid ) )
|
||||
return SendError( playerid, "You cannot travel while you are wanted." );
|
||||
|
||||
return ShowPlayerAirportMenu( playerid );
|
||||
}
|
||||
|
||||
// orbital cannon
|
||||
else if ( checkpointid == g_gangFacilities[ facility ] [ E_CANNON_CP ] )
|
||||
{
|
||||
if ( GetPlayerCash( playerid ) < 250000 )
|
||||
return SendError( playerid, "You need at least $250,000 available to begin operating the orbital cannon." );
|
||||
|
||||
if ( GetPlayerClass( playerid ) != CLASS_CIVILIAN )
|
||||
return SendError( playerid, "You must be a civilian to use this feature." );
|
||||
|
||||
if ( StartPlayerOrbitalCannon( playerid, facility ) )
|
||||
{
|
||||
return SendServerMessage( playerid, "You are now operating this facility's orbital cannon." );
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "The orbital cannon of this facility is currently in use." );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_GANG_JOIN && response )
|
||||
{
|
||||
if ( p_GangID[ playerid ] != -1 ) {
|
||||
return SendServerMessage( playerid, "You are already in a gang." );
|
||||
}
|
||||
|
||||
new
|
||||
joining_gang = GetPVarInt( playerid, "gang_facility_join" );
|
||||
|
||||
if ( IsGangPrivate( joining_gang ) ) {
|
||||
return SendError( playerid, "You can no longer join this gang as it is private." );
|
||||
}
|
||||
|
||||
if ( ! SetPlayerGang( playerid, joining_gang ) ) {
|
||||
SendError( playerid, "You can no longer join this gang." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
else if ( dialogid == DIALOG_FACILITY_AMMU && response )
|
||||
{
|
||||
new player_gang = GetPlayerGang( playerid );
|
||||
|
||||
if ( ! Iter_Contains( gangs, player_gang ) )
|
||||
return SendError( playerid, "You are not in any gang." );
|
||||
|
||||
new Float: discount = ( FACILITY_AMMU_RESPECT - float( g_gangData[ player_gang ] [ E_RESPECT ] ) ) / FACILITY_AMMU_RESPECT;
|
||||
|
||||
SetPVarInt( playerid, "facility_weapon_cat", listitem );
|
||||
RedirectAmmunation( playerid, listitem, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU_BUY, discount );
|
||||
}
|
||||
|
||||
else if ( dialogid == DIALOG_FACILITY_AMMU_BUY )
|
||||
{
|
||||
if ( response )
|
||||
{
|
||||
new facility = GetPVarInt( playerid, "in_facility" );
|
||||
|
||||
if ( ! Iter_Contains( gangfacilities, facility ) )
|
||||
return SendError( playerid, "Cannot identify current gang facility. Please enter facility again." );
|
||||
|
||||
new facility_gangid = Turf_GetFacility( g_gangFacilities[ facility ] [ E_TURF_ID ] );
|
||||
|
||||
if ( ! Iter_Contains( gangs, facility_gangid ) ) return SendError( playerid, "You are not in any gang." );
|
||||
if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot buy weapons in jail." );
|
||||
if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot buy weapons in an event." );
|
||||
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED || !IsPlayerSpawned( playerid ) ) return SendError( playerid, "You are unable to purchase any weapons at this time." );
|
||||
|
||||
new gun_category = GetPVarInt( playerid, "facility_weapon_cat" );
|
||||
new Float: gun_discount = ( FACILITY_AMMU_RESPECT - float( g_gangData[ facility_gangid ] [ E_RESPECT ] ) ) / FACILITY_AMMU_RESPECT;
|
||||
|
||||
// make sure player doesnt get credited money lol
|
||||
if ( gun_discount < 0.0 ) {
|
||||
gun_discount = 0.0;
|
||||
}
|
||||
|
||||
for( new i, x = 0; i < sizeof( g_AmmunationWeapons ); i++ )
|
||||
{
|
||||
if ( g_AmmunationWeapons[ i ] [ E_MENU ] == gun_category )
|
||||
{
|
||||
if ( x == listitem )
|
||||
{
|
||||
new price = floatround( g_AmmunationWeapons[ i ] [ E_PRICE ] * gun_discount ); // Change the discount here!!
|
||||
|
||||
if ( price > GetPlayerCash( playerid ) )
|
||||
{
|
||||
SendError( playerid, "You don't have enough money for this." );
|
||||
RedirectAmmunation( playerid, gun_category, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU_BUY, gun_discount );
|
||||
return 1;
|
||||
}
|
||||
|
||||
GivePlayerCash( playerid, -price );
|
||||
|
||||
if ( g_AmmunationWeapons[ i ] [ E_WEPID ] == 101 ) SetPlayerArmour( playerid, float( g_AmmunationWeapons[ i ] [ E_AMMO ] ) );
|
||||
else GivePlayerWeapon( playerid, g_AmmunationWeapons[ i ] [ E_WEPID ], g_AmmunationWeapons[ i ] [ E_AMMO ] );
|
||||
|
||||
RedirectAmmunation( playerid, gun_category, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU_BUY, gun_discount );
|
||||
SendServerMessage( playerid, "You have purchased %s(%d) for "COL_GOLD"%s"COL_WHITE"%s.", g_AmmunationWeapons[ i ] [ E_NAME ], g_AmmunationWeapons[ i ] [ E_AMMO ], price > 0.0 ? number_format( price ) : ( "FREE" ) );
|
||||
break;
|
||||
}
|
||||
x ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else return ShowAmmunationMenu( playerid, "{FFFFFF}Gang Facility - Purchase Weapons", DIALOG_FACILITY_AMMU );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Threads ** */
|
||||
thread OnGangFaciltiesLoad( )
|
||||
{
|
||||
new rows;
|
||||
cache_get_data( rows, tmpVariable );
|
||||
|
||||
if ( rows )
|
||||
{
|
||||
new gang_name[ 30 ], join_msg[ 96 ];
|
||||
new Float: infront_x, Float: infront_y;
|
||||
|
||||
for ( new row = 0; row < rows; row ++ )
|
||||
{
|
||||
// new facility_sql_id = cache_get_field_content_int( row, "FACILITY_ID", dbHandle );
|
||||
new gang_sql_id = cache_get_field_content_int( row, "GANG_ID", dbHandle );
|
||||
new gangid = ITER_NONE;
|
||||
|
||||
// reset name and join message appropriately
|
||||
cache_get_field_content( row, "NAME", gang_name, dbHandle, sizeof( gang_name ) );
|
||||
cache_get_field_content( row, "JOIN_MSG", join_msg, dbHandle, sizeof( join_msg ) );
|
||||
|
||||
// check for existing gang
|
||||
foreach ( new g : gangs ) if ( g_gangData[ g ] [ E_SQL_ID ] == gang_sql_id ) {
|
||||
gangid = g;
|
||||
break;
|
||||
}
|
||||
|
||||
// create gang if not exists
|
||||
if ( gangid == ITER_NONE )
|
||||
{
|
||||
gangid = CreateGang( gang_name,
|
||||
cache_get_field_content_int( row, "LEADER", dbHandle ),
|
||||
cache_get_field_content_int( row, "COLOR", dbHandle ),
|
||||
cache_get_field_content_int( row, "KILLS", dbHandle ),
|
||||
cache_get_field_content_int( row, "DEATHS", dbHandle ),
|
||||
cache_get_field_content_int( row, "BANK", dbHandle ),
|
||||
cache_get_field_content_int( row, "SCORE", dbHandle ),
|
||||
cache_get_field_content_int( row, "RESPECT", dbHandle ),
|
||||
!! cache_get_field_content_int( row, "INVITE_ONLY", dbHandle ),
|
||||
join_msg, true, gang_sql_id
|
||||
);
|
||||
}
|
||||
|
||||
// process gang creation
|
||||
if ( gangid != ITER_NONE )
|
||||
{
|
||||
// create facility
|
||||
new id = Iter_Free( gangfacilities );
|
||||
|
||||
if ( id != ITER_NONE )
|
||||
{
|
||||
g_gangFacilities[ id ] [ E_GANG_SQL_ID ] = cache_get_field_content_int( row, "GANG_ID", dbHandle );
|
||||
|
||||
// create turf
|
||||
new turf_id = Turf_Create(
|
||||
cache_get_field_content_float( row, "ZONE_MIN_X", dbHandle ),
|
||||
cache_get_field_content_float( row, "ZONE_MIN_Y", dbHandle ),
|
||||
cache_get_field_content_float( row, "ZONE_MAX_X", dbHandle ),
|
||||
cache_get_field_content_float( row, "ZONE_MAX_Y", dbHandle ),
|
||||
gangid, setAlpha( g_gangData[ gangid ] [ E_COLOR ], 0x90 ), gangid
|
||||
);
|
||||
|
||||
// error check
|
||||
if ( turf_id == ITER_NONE ) printf("[GANG FACILITIES] [*CRITICAL ERROR*] Not enough turfs are available to create for facility %d.", g_gangFacilities[ id ] [ E_GANG_SQL_ID ] );
|
||||
|
||||
// add to iterator
|
||||
Iter_Add( gangfacilities, id );
|
||||
|
||||
// set variables
|
||||
g_gangFacilities[ id ] [ E_GANG_SQL_ID ] = gang_sql_id;
|
||||
g_gangFacilities[ id ] [ E_TURF_ID ] = turf_id;
|
||||
|
||||
g_gangFacilities[ id ] [ E_WORLD ] = id + 1;
|
||||
g_gangFacilities[ id ] [ E_INTERIOR_TYPE ] = GetFacilityInteriorType( gang_sql_id );
|
||||
g_gangFacilities[ id ] [ E_X ] = cache_get_field_content_float( row, "ENTER_X", dbHandle );
|
||||
g_gangFacilities[ id ] [ E_Y ] = cache_get_field_content_float( row, "ENTER_Y", dbHandle );
|
||||
g_gangFacilities[ id ] [ E_Z ] = cache_get_field_content_float( row, "ENTER_Z", dbHandle );
|
||||
|
||||
g_gangFacilities[ id ] [ E_CHECKPOINT ] [ 0 ] = CreateDynamicCP( g_gangFacilities[ id ] [ E_X ], g_gangFacilities[ id ] [ E_Y ], g_gangFacilities[ id ] [ E_Z ], 1.0, -1, -1, -1, 100.0 );
|
||||
|
||||
format( szNormalString, sizeof( szNormalString ), "Gang Facility\n"COL_WHITE" %s", gang_name );
|
||||
g_gangFacilities[ id ] [ E_LABEL ] [ 0 ] = CreateDynamic3DTextLabel( szNormalString, g_gangData[ gangid ] [ E_COLOR ], g_gangFacilities[ id ] [ E_X ], g_gangFacilities[ id ] [ E_Y ], g_gangFacilities[ id ] [ E_Z ], 20.0 );
|
||||
|
||||
// create interior
|
||||
new type = g_gangFacilities[ id ] [ E_INTERIOR_TYPE ];
|
||||
|
||||
g_gangFacilities[ id ] [ E_CHECKPOINT ] [ 1 ] = CreateDynamicCP( g_gangFacilityInterior[ type ] [ E_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_POS ] [ 2 ], 1.0, g_gangFacilities[ id ] [ E_WORLD ], -1, -1, 100.0 );
|
||||
g_gangFacilities[ id ] [ E_LABEL ] [ 1 ] = CreateDynamic3DTextLabel( "[EXIT]", COLOR_GOLD, g_gangFacilityInterior[ type ] [ E_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_POS ] [ 2 ], 20.0 );
|
||||
|
||||
// ammunation man
|
||||
CreateDynamicActor( 179, g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 2 ], g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 3 ], true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
infront_x = g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 0 ] + 2.0 * floatsin( -g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 3 ], degrees );
|
||||
infront_y = g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 1 ] + 2.0 * floatcos( -g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 3 ], degrees );
|
||||
|
||||
g_gangFacilities[ id ] [ E_AMMU_CP ] = CreateDynamicCP( infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 2 ], 1.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
CreateDynamic3DTextLabel( "[AMMU-NATION]", COLOR_GOLD, infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_AMMU_POS ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
// orbital cannon
|
||||
g_gangFacilities[ id ] [ E_CANNON_CP ] = CreateDynamicCP( g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 2 ], 1.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
CreateDynamic3DTextLabel( "[ORBITAL CANNON]", COLOR_GOLD, g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_CANNON_POS ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
// shop actor
|
||||
CreateDynamicActor( 211, g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 2 ], g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 3 ], true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
infront_x = g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 0 ] + 2.0 * floatsin( -g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 3 ], degrees );
|
||||
infront_y = g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 1 ] + 2.0 * floatcos( -g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 3 ], degrees );
|
||||
|
||||
g_gangFacilities[ id ] [ E_SHOP_CP ] = CreateDynamicCP( infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 2 ], 1.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
CreateDynamic3DTextLabel( "[24/7]", COLOR_GOLD, infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_SHOP_POS ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
// fast travel actor
|
||||
CreateDynamicActor( 61, g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 2 ], g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 3 ], true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
infront_x = g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 0 ] + 2.0 * floatsin( -g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 3 ], degrees );
|
||||
infront_y = g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 1 ] + 2.0 * floatcos( -g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 3 ], degrees );
|
||||
|
||||
g_gangFacilities[ id ] [ E_TRAVEL_CP ] = CreateDynamicCP( infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 2 ], 1.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
CreateDynamic3DTextLabel( "[FAST TRAVEL]", COLOR_GOLD, infront_x, infront_y, g_gangFacilityInterior[ type ] [ E_TRAVEL_POS ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
// create atm
|
||||
CreateATM( g_gangFacilityInterior[ type ] [ E_ATM_POS ] [ 0 ], g_gangFacilityInterior[ type ] [ E_ATM_POS ] [ 1 ], g_gangFacilityInterior[ type ] [ E_ATM_POS ] [ 2 ], g_gangFacilityInterior[ type ] [ E_ATM_POS ] [ 3 ], 0.0, g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
|
||||
// more actors
|
||||
CreateDynamicActor( 268, 244.6742, 1843.2554, 1858.7576, 0.000000, true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 70, 212.868576, 1819.894531, 1856.413818, 117.200050, true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] ), "COP_AMBIENT", "Coplook_loop", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 70, 213.705627, 1827.192993, 1856.413818, 60.300289, true, 100.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] ), "COP_AMBIENT", "Coplook_think", 4.1, 1, 1, 1, 1, 0 );
|
||||
|
||||
#if FACILITY_TAKEOVER_ENABLED == true
|
||||
// labels
|
||||
CreateDynamic3DTextLabel( "Server\n"COL_WHITE"Press ALT to Plant C4", COLOR_GREY, g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
CreateDynamic3DTextLabel( "Server\n"COL_WHITE"Press ALT to Plant C4", COLOR_GREY, g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ], 20.0, .worldid = g_gangFacilities[ id ] [ E_WORLD ] );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("[GANG FACILITIES] [ERROR] No more slows available to insert more facilities (%d)!", MAX_FACILITIES );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock SetPlayerToGangFacility( playerid, handle )
|
||||
{
|
||||
// preload interior
|
||||
pauseToLoad( playerid );
|
||||
UpdatePlayerEntranceExitTick( playerid );
|
||||
|
||||
// set player position
|
||||
SetPlayerPos( playerid, g_gangFacilities[ handle ] [ E_X ], g_gangFacilities[ handle ] [ E_Y ], g_gangFacilities[ handle ] [ E_Z ] );
|
||||
SetPlayerVirtualWorld( playerid, 0 );
|
||||
SetPlayerInterior( playerid, 0 );
|
||||
}
|
||||
|
||||
stock GetFacilityInteriorType( gang_sql_id )
|
||||
{
|
||||
#pragma unused gang_sql_id
|
||||
// todo
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if FACILITY_TAKEOVER_ENABLED == true
|
||||
CMD:plant( playerid, params[ ] ) {
|
||||
PlantFacilityC4( playerid, GetPVarInt( playerid, "in_facility" ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:war( playerid, params[ ] ) {
|
||||
StartFacilityWar( GetPVarInt( playerid, "in_facility" ), 0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define PROGRESS_FACILITY_PLANT 10
|
||||
stock PlantFacilityC4( playerid, facility )
|
||||
{
|
||||
new type = g_gangFacilities[ facility ] [ E_INTERIOR_TYPE ];
|
||||
new Float: infront_x, Float: infront_y, Float: infront_z;
|
||||
|
||||
if ( IsPlayerInRangeOfPoint( playerid, 2.0, g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ] ) )
|
||||
{
|
||||
if ( IsValidDynamicObject( g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ 0 ] ) )
|
||||
return 1;
|
||||
|
||||
infront_x = g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ] + 0.75 * floatsin( g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 3 ], degrees );
|
||||
infront_y = g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ] + 0.75 * floatcos( g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 3 ], degrees );
|
||||
infront_z = g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ] - 0.5;
|
||||
|
||||
SetPlayerFacingAngle( playerid, g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 3 ] );
|
||||
ShowProgressBar( playerid, "Planting C4", PROGRESS_FACILITY_PLANT, 3000, COLOR_RED, 0 );
|
||||
}
|
||||
|
||||
else if ( IsPlayerInRangeOfPoint( playerid, 2.0, g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ] ) )
|
||||
{
|
||||
if ( IsValidDynamicObject( g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ 1 ] ) )
|
||||
return 1;
|
||||
|
||||
infront_x = g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ] + 0.75 * floatsin( g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 3 ], degrees );
|
||||
infront_y = g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ] + 0.75 * floatcos( g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 3 ], degrees );
|
||||
infront_z = g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ] - 0.5;
|
||||
|
||||
SetPlayerFacingAngle( playerid, g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 3 ] );
|
||||
ShowProgressBar( playerid, "Planting C4", PROGRESS_FACILITY_PLANT, 3000, COLOR_RED, 1 );
|
||||
}
|
||||
|
||||
else return 1;
|
||||
|
||||
TogglePlayerControllable( playerid, 0 );
|
||||
SetPlayerPos( playerid, infront_x, infront_y, infront_z );
|
||||
|
||||
SetPVarInt( playerid, "planting_facility", facility );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnProgressCompleted( playerid, progressid, params )
|
||||
{
|
||||
if ( progressid == PROGRESS_FACILITY_PLANT )
|
||||
{
|
||||
new facility = GetPVarInt( playerid, "planting_facility" );
|
||||
|
||||
if ( ! Iter_Contains( gangfacilities, facility ) || ( params != 0 && params != 1 ) )
|
||||
return 0;
|
||||
|
||||
new type = g_gangFacilities[ facility ] [ E_INTERIOR_TYPE ];
|
||||
|
||||
// plant according to which site
|
||||
if ( ! params )
|
||||
{
|
||||
g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ 0 ] = CreateDynamicObject( 363,
|
||||
g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ],
|
||||
0.000000, 0.000000, g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 3 ],
|
||||
.worldid = g_gangFacilities[ facility ] [ E_WORLD ]
|
||||
);
|
||||
|
||||
// alarm
|
||||
foreach ( new i : Player ) if ( GetPVarInt( i, "in_facility" ) == facility ) {
|
||||
PlayerPlaySound( i, 14800, g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ 1 ] = CreateDynamicObject( 363,
|
||||
g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ],
|
||||
0.000000, 0.000000, g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 3 ],
|
||||
.worldid = g_gangFacilities[ facility ] [ E_WORLD ]
|
||||
);
|
||||
|
||||
// alarm
|
||||
foreach ( new i : Player ) if ( GetPVarInt( i, "in_facility" ) == facility ) {
|
||||
PlayerPlaySound( i, 14800, g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ] );
|
||||
}
|
||||
}
|
||||
|
||||
TogglePlayerControllable( playerid, 1 );
|
||||
g_gangFacilities[ facility ] [ E_BLOWN ] [ params ] = false;
|
||||
g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ params ] = FACILITY_BLOWUP_TIME + 1;
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
function OnFacilityWarUpdate( facility )
|
||||
{
|
||||
new
|
||||
type = g_gangFacilities[ facility ] [ E_INTERIOR_TYPE ];
|
||||
|
||||
// decrement timer
|
||||
if ( g_gangFacilities[ facility ] [ E_WAR_TICK ] -- <= 0 ) {
|
||||
print( "End Round" );
|
||||
}
|
||||
|
||||
// bomb timers
|
||||
for ( new siteid = 0; siteid < 2; siteid ++ ) if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ siteid ] >= 0 )
|
||||
{
|
||||
if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ siteid ] -- <= 0 && IsValidDynamicObject( g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ siteid ] ) )
|
||||
{
|
||||
if ( siteid == 0 ) {
|
||||
CreateExplosion( g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_1 ] [ 2 ], 0, 10.0 );
|
||||
} else if ( siteid == 1 ) {
|
||||
CreateExplosion( g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 0 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 1 ], g_gangFacilityInterior[ type ] [ E_BOMB_POS_2 ] [ 2 ], 0, 10.0 );
|
||||
}
|
||||
|
||||
Streamer_SetIntData( STREAMER_TYPE_OBJECT, g_gangFacilities[ facility ] [ E_BOMB_OBJECT ] [ siteid ], E_STREAMER_MODEL_ID, 18689 );
|
||||
g_gangFacilities[ facility ] [ E_BLOWN ] [ siteid ] = true;
|
||||
}
|
||||
}
|
||||
return ShowServerStatus( facility );
|
||||
}
|
||||
|
||||
stock StartFacilityWar( facility, attacker )
|
||||
{
|
||||
if ( g_gangFacilities[ facility ] [ E_WAR ] )
|
||||
return 0;
|
||||
|
||||
g_gangFacilities[ facility ] [ E_WAR ] = true;
|
||||
g_gangFacilities[ facility ] [ E_WAR_TICK ] = 300;
|
||||
g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 0 ] = FACILITY_BLOWUP_TIME + 1;
|
||||
g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 1 ] = FACILITY_BLOWUP_TIME + 1;
|
||||
g_gangFacilities[ facility ] [ E_WAR_TIMER ] = SetTimerEx( "OnFacilityWarUpdate", 960, true, "d", facility );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock EndFacilityWar( facility, bool: attacker_won )
|
||||
{
|
||||
if ( ! g_gangFacilities[ facility ] [ E_WAR ] )
|
||||
return 1;
|
||||
|
||||
g_gangFacilities[ facility ] [ E_WAR ] = 0;
|
||||
|
||||
// add respect
|
||||
if ( attacker_won )
|
||||
{
|
||||
new
|
||||
defender_facility_count = 0;
|
||||
|
||||
foreach ( new f : gangfacilities ) if ( g_gangFacilities[ f ] [ E_GANG_SQL_ID ] == g_gangFacilities[ facility ] [ E_GANG_SQL_ID ] ) {
|
||||
defender_facility_count ++;
|
||||
}
|
||||
|
||||
new
|
||||
respect_earned = floatround( float( g_gangFacilities[ attacker ] [ E_RESPECT ] ) * ( 0.25 / float( defender_facility_count ) ) );
|
||||
|
||||
printf("Earned %d respect (defender had %d facilities)", respect_earned, defender_facility_count);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static stock ShowServerStatus( facility )
|
||||
{
|
||||
new
|
||||
color[ 2 ] = "g";
|
||||
|
||||
if ( g_gangFacilities[ facility ] [ E_WAR_TICK ] < 150 ) color = "y";
|
||||
else if ( g_gangFacilities[ facility ] [ E_WAR_TICK ] < 30 ) color = "r";
|
||||
|
||||
format( szNormalString, sizeof( szNormalString ), "~%s~~h~Time Remaining: %s~w~~n~~n~Server 1: ", color, TimeConvert ( g_gangFacilities[ facility ] [ E_WAR_TICK ] ) );
|
||||
|
||||
// server 1
|
||||
if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 0 ] > FACILITY_BLOWUP_TIME ) {
|
||||
strcat( szNormalString, "~g~Secure~w~~n~" );
|
||||
} else if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 0 ] <= 0 ) {
|
||||
strcat( szNormalString, "~r~Blown~w~~n~" );
|
||||
} else {
|
||||
format( szNormalString, sizeof( szNormalString ), "%s~r~~h~~h~%d until blown~w~~n~", szNormalString, g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 0 ] );
|
||||
}
|
||||
|
||||
strcat( szNormalString, "Server 2: ");
|
||||
|
||||
// server 2
|
||||
if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 1 ] >= 10 ) {
|
||||
strcat( szNormalString, "~g~Secure~w~" );
|
||||
} else if ( g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 1 ] <= 0 ) {
|
||||
strcat( szNormalString, "~r~Blown~w~" );
|
||||
} else {
|
||||
format( szNormalString, sizeof( szNormalString ), "%s~r~~h~~h~%d until blown", szNormalString, g_gangFacilities[ facility ] [ E_BLOWUP_COUNT ] [ 1 ] );
|
||||
}
|
||||
|
||||
// alert
|
||||
foreach ( new i : Player ) if ( GetPVarInt( i, "in_facility" ) == facility ) {
|
||||
ShowPlayerHelpDialog( i, 0, szNormalString );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static stock initializeFacilityObjects( )
|
||||
{
|
||||
tmpVariable = CreateDynamicObject( 16647, 249.156005, 1860.953002, 1860.366943, 0.000000, 0.000000, 180.000000, -1, -1, -1, .streamdistance = -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 2, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 7, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 14, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 5, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 13, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 8, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 15, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 3587, "snpedhusxref", "comptwindo1", 0 );
|
||||
tmpVariable = CreateDynamicObject( 16643, 248.727005, 1869.989013, 1861.852050, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 16643, "none", "none", 1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 16643, "none", "none", 1 );
|
||||
CreateDynamicObject( 16651, 247.906005, 1825.625000, 1855.562011, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 16650, 247.703002, 1823.843994, 1856.555053, 0.000000, 0.000000, -90.000000, -1, -1, -1 ), 0, 5722, "sunrise01_lawn", "plainglass", 0 );
|
||||
tmpVariable = CreateDynamicObject( 16665, 223.429992, 1822.741943, 1856.406005, 0.000000, 0.000000, 0.000000, -1, -1, -1, .streamdistance = -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 0, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 2, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 8419, "vgsbldng1", "black32", 0 );
|
||||
CreateDynamicObject( 16648, 244.703002, 1905.211059, 1859.906005, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 16640, 263.429992, 1840.782958, 1857.109985, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
tmpVariable = CreateDynamicObject( 19786, 211.182998, 1822.728027, 1859.890991, 7.900000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "ACTIVE", 130, "ARIAL", 60, 1, 0, -16777216, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "\nACTIVE", 130, "ARIAL", 100, 1, -65536, -16777216, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19786, 211.244003, 1822.728027, 1860.186035, 7.900000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "ORBITAL CANNON", 130, "ARIAL", 50, 1, 0, 0, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "ORBITAL CANNON", 130, "ARIAL", 50, 1, -1, 0, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19786, 212.235000, 1818.493041, 1859.784057, 7.900000, 0.000000, 117.599998, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "\nACTIVE", 130, "arial", 110, 1, -65536, -16777216, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "\nACTIVE", 130, "arial", 110, 1, -16777216, -16777216, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19786, 212.212005, 1826.942993, 1859.744018, 7.900000, 0.000000, 62.299999, -1, -1, -1 ), 0, 1676, "wshxrefpump", "black64", 0 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19786, 212.212005, 1826.942993, 1859.744018, 7.900000, 0.000000, 62.299999, -1, -1, -1 ), 1, "\nACTIVE", 130, "arial", 110, 1, -65536, -16777216, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19786, 212.285003, 1818.517944, 1860.119018, 7.900000, 0.000000, 117.599998, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "ORBITAL CANNON", 130, "Arial", 50, 1, -1, 0, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "ORBITAL CANNON", 130, "Arial", 50, 1, 0, 0, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19786, 212.263000, 1826.916992, 1860.088989, 7.900000, 0.000000, 62.299999, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "ORBITAL CANNON", 130, "Arial", 50, 1, -1, 0, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "ORBITAL CANNON", 130, "Arial", 50, 1, 0, 0, 1 );
|
||||
CreateDynamicObject( 16782, 210.367004, 1822.741943, 1857.602050, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 16662, 211.934005, 1823.194946, 1856.639038, 0.000000, 0.000000, 63.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3526, 222.003005, 1828.145019, 1855.504028, 0.000000, 0.000000, 68.900001, -1, -1, -1 );
|
||||
CreateDynamicObject( 3526, 224.410995, 1826.500000, 1855.504028, 0.000000, 0.000000, 41.799999, -1, -1, -1 );
|
||||
CreateDynamicObject( 3526, 221.975997, 1817.296997, 1855.504028, 0.000000, 0.000000, -69.500000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3526, 224.350006, 1818.922973, 1855.504028, 0.000000, 0.000000, -41.700000, -1, -1, -1 );
|
||||
CreateDynamicObject( 964, 253.541000, 1797.566040, 1856.404052, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 964, 252.100997, 1797.566040, 1856.404052, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 964, 253.220993, 1797.251953, 1857.343994, 0.000000, 0.000000, -167.699996, -1, -1, -1 );
|
||||
CreateDynamicObject( 355, 254.179992, 1799.074951, 1856.722045, 0.000000, -90.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 355, 254.179992, 1798.395019, 1856.722045, 0.000000, -90.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 355, 254.179992, 1798.734985, 1856.722045, 0.000000, -90.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2358, 252.067993, 1797.734008, 1857.472045, 0.000000, 0.000000, -130.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2358, 253.134002, 1797.234985, 1858.391967, 0.000000, 0.000000, 175.800003, -1, -1, -1 );
|
||||
CreateDynamicObject( 2359, 251.667007, 1796.734008, 1857.501953, 0.000000, 0.000000, 14.500000, -1, -1, -1 );
|
||||
CreateDynamicObject( 923, 252.889007, 1805.036010, 1857.281982, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 923, 250.542999, 1804.788940, 1857.281982, 0.000000, 0.000000, 11.699999, -1, -1, -1 );
|
||||
CreateDynamicObject( 18637, 251.001998, 1796.952026, 1856.943969, 80.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 18637, 250.341995, 1796.952026, 1856.943969, 80.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2063, 241.001007, 1799.272949, 1857.303955, 0.000000, 0.000000, 134.600006, -1, -1, -1 ), 0, 2063, "none", "none", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2063, 244.800003, 1797.186035, 1857.303955, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 2063, "none", "none", 0 );
|
||||
CreateDynamicObject( 1271, 246.636001, 1797.443969, 1856.803955, 0.000000, 0.000000, 19.600000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1271, 242.404006, 1798.142944, 1856.803955, 0.000000, 0.000000, -74.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1271, 243.054000, 1797.572021, 1856.803955, 0.000000, 0.000000, -39.700000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1271, 242.751998, 1797.739013, 1857.463989, 0.000000, 0.000000, 154.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19602, 240.326995, 1799.930053, 1857.303955, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19602, 240.619995, 1799.656982, 1857.303955, 0.000000, 0.000000, 47.200000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19602, 240.996994, 1799.318969, 1857.303955, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2040, 241.138000, 1799.099975, 1858.183959, 0.000000, 0.000000, 45.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2040, 241.533996, 1798.703979, 1858.183959, 0.000000, 0.000000, 21.200000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2036, 244.300003, 1797.150024, 1857.254028, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2036, 245.289001, 1797.150024, 1857.693969, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2035, 244.819000, 1797.150024, 1856.784057, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2035, 245.429000, 1797.150024, 1858.104003, 0.000000, 0.000000, 11.600000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19515, 243.938995, 1797.230957, 1858.313964, 0.000000, -90.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19515, 244.578994, 1797.230957, 1858.313964, 0.000000, -90.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 359, 241.255996, 1798.937011, 1857.703979, 90.000000, 0.000000, 135.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 359, 239.716995, 1800.338989, 1857.154052, -8.399999, -88.400001, 138.899993, -1, -1, -1 );
|
||||
CreateDynamicObject( 359, 239.397003, 1800.671997, 1857.188964, -8.399999, -88.400001, 138.899993, -1, -1, -1 );
|
||||
CreateDynamicObject( 2056, 246.738006, 1797.470947, 1857.154052, -90.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2056, 246.554992, 1797.300048, 1857.173950, -90.000000, 0.000000, 43.099998, -1, -1, -1 );
|
||||
CreateDynamicObject( 1654, 241.621994, 1798.675048, 1857.404052, 0.000000, 0.000000, 124.300003, -1, -1, -1 );
|
||||
CreateDynamicObject( 1654, 241.350006, 1798.915039, 1857.404052, 0.000000, 0.000000, 175.399993, -1, -1, -1 );
|
||||
CreateDynamicObject( 370, 239.292999, 1801.390991, 1856.764038, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
tmpVariable = CreateDynamicObject( 16654, 248.358993, 1782.765991, 1856.819946, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 0, 18038, "vegas_munation", "mp_gun_floorred", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 18038, "vegas_munation", "mp_gun_floorred", 0 );
|
||||
CreateDynamicObject( 16646, 245.960998, 1865.586059, 1860.828002, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
tmpVariable = CreateDynamicObject( 16642, 247.242004, 1823.897949, 1858.843994, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 5, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 11, 6038, "lawwhitebuilds", "brwall_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 7, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 12, 17538, "losflor4_lae2", "tarmacplain_bank", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3384, 245.067001, 1827.708984, 1855.163940, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 3384, "none", "none", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3384, 246.557998, 1827.848999, 1855.163940, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 3384, "none", "none", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3384, 245.067001, 1816.129028, 1855.163940, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 3384, "none", "none", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3384, 246.548004, 1816.269042, 1855.163940, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 3384, "none", "none", 0 );
|
||||
CreateDynamicObject( 14532, 244.511001, 1818.031982, 1857.404052, 0.000000, 0.000000, -64.099998, -1, -1, -1 );
|
||||
CreateDynamicObject( 14532, 244.520996, 1829.708984, 1857.413940, 0.000000, 0.000000, -64.099998, -1, -1, -1 );
|
||||
CreateDynamicObject( 3388, 244.970993, 1825.399047, 1853.524047, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3388, 245.981002, 1825.399047, 1853.524047, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3388, 244.970993, 1818.328979, 1853.524047, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3388, 245.960998, 1818.328979, 1853.524047, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
tmpVariable = CreateDynamicObject( 16658, 283.406005, 1818.578002, 1855.991943, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 7, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 8, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 11, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
CreateDynamicObject( 16661, 287.554992, 1820.008056, 1855.218994, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 16659, 287.601989, 1819.647949, 1856.977050, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11714, 277.506011, 1821.741943, 1858.069946, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 262.069000, 1817.915039, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 272.069000, 1817.915039, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 282.069000, 1817.915039, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 292.058990, 1817.915039, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 302.049011, 1817.915039, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18765, 262.069000, 1827.906005, 1851.145019, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16640, "a51", "ws_castironwalk", -16 );
|
||||
CreateDynamicObject( 16641, 272.330993, 1805.993041, 1855.167968, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3397, 239.138000, 1829.255004, 1853.711059, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3397, 239.138000, 1816.213012, 1853.711059, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1989, 239.065994, 1822.729980, 1853.711059, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1989, 239.065994, 1823.711059, 1853.711059, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1989, 239.065994, 1821.739990, 1853.711059, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1714, 240.231002, 1816.511962, 1853.691040, 0.000000, 0.000000, -60.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1714, 240.320999, 1828.269042, 1853.691040, 0.000000, 0.000000, -110.199996, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19328, 238.559005, 1825.869018, 1855.470947, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16644, "a51_detailstuff", "a51_map", 0 );
|
||||
CreateDynamicObject( 2615, 238.597000, 1828.056030, 1855.931030, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 247.826004, 1811.739013, 1863.703979, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16656, "a51_labs", "ws_trainstationwin1", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 247.826004, 1821.369018, 1863.703979, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16656, "a51_labs", "ws_trainstationwin1", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 247.826004, 1831.000000, 1863.703979, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16656, "a51_labs", "ws_trainstationwin1", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 247.826004, 1833.501953, 1863.702026, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16656, "a51_labs", "ws_trainstationwin1", 0 );
|
||||
CreateDynamicObject( 11714, 297.735992, 1821.741943, 1858.069946, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11729, 249.175994, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11729, 248.505996, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11729, 247.845993, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11730, 247.186004, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11729, 246.535995, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11730, 245.886001, 1857.734008, 1863.093994, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 11730, "none", "none", -251658241 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2206, 246.013000, 1860.954956, 1863.024047, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 1675, "wshxrefhse", "greygreensubuild_128", 0 );
|
||||
CreateDynamicObject( 1714, 246.960998, 1859.885009, 1863.073974, 0.000000, 0.000000, -151.199996, -1, -1, -1 );
|
||||
CreateDynamicObject( 356, 246.848999, 1860.711059, 1864.024047, -89.900001, 2.500000, -1.399999, -1, -1, -1 );
|
||||
CreateDynamicObject( 2043, 246.582000, 1861.208007, 1864.063964, 0.000000, 0.000000, -59.299999, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2167, 242.563003, 1862.652954, 1863.104003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 1675, "wshxrefhse", "greygreensubuild_128", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2167, 241.652999, 1862.652954, 1863.104003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 1675, "wshxrefhse", "greygreensubuild_128", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19787, 241.391006, 1857.465942, 1864.854003, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 16150, "ufo_bar", "black32", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19787, 243.671005, 1857.465942, 1864.854003, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, 16150, "ufo_bar", "black32", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 11714, 238.455993, 1872.332031, 1859.208984, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 19799, "all_vault", "liftdoorsac256", -16 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 7909, 263.942993, 1861.439941, 1862.397949, 0.000000, 0.000000, -90.000000, -1, -1, -1 ), 0, "The Lost And Damned", 120, "impact", 48, 0, 0xFF964B00, 0, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19926, 248.494995, 1798.292968, 1856.375976, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 0, 4552, "ammu_lan2", "newall4-4", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 4552, "ammu_lan2", "newall4-4", 0 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 2662, 247.796997, 1806.805053, 1859.504028, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, "Ammunation", 120, "IMPACT", 84, 0, -13421773, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19327, 233.839004, 1821.076049, 1858.443969, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "Authorized personnel\nONLY", 120, "IMPACT", 25, 0, -4671304, 0, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19173, 245.843002, 1827.785034, 1857.543945, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "SERVERS", 120, "IMPACT", 84, 0, -13421773, 0, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "SERVERS", 120, "IMPACT", 84, 1, 0, 0, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 295.842010, 1821.823974, 1857.980957, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 279.122009, 1821.823974, 1857.980957, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16644, "a51_detailstuff", "concretegroundl1_256", -47 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19741, 249.591003, 1868.484985, 1857.511962, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16375, "des_boneyard", "roucghstone", -256 );
|
||||
CreateDynamicObject( 922, 242.257003, 1805.038940, 1857.333984, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 2662, 248.867004, 1842.296997, 1860.644042, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, "Server Room", 120, "IMPACT", 84, 0, -13421773, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 2662, 234.757003, 1822.738037, 1859.463989, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "Orbital Cannon", 120, "IMPACT", 84, 0, -13421773, 0, 1 );
|
||||
tmpVariable = CreateDynamicObject( 19173, 245.843002, 1816.214965, 1857.543945, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 0, "SERVERS", 120, "IMPACT", 84, 0, -13421773, 0, 1 );
|
||||
SetDynamicObjectMaterialText( tmpVariable, 1, "SERVERS", 120, "IMPACT", 84, 1, 0, 0, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19875, 238.533996, 1871.010986, 1860.458984, 0.000000, 0.000000, -90.000000, -1, -1, -1 ), 0, 16649, "a51", "a51_weedoors", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19875, 238.535003, 1873.715942, 1860.458984, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16649, "a51", "a51_weedoors", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3061, 247.550003, 1841.797973, 1868.943969, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 5722, "sunrise01_lawn", "plainglass", -16 );
|
||||
CreateDynamicObject( 18981, 252.274002, 1873.482055, 1857.004028, 0.000000, 90.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11400, 243.199996, 1850.332031, 1863.477050, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19917, 242.819000, 1850.366943, 1861.944946, -63.799999, 0.000000, -90.500000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19899, 241.804000, 1842.675048, 1857.727050, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19917, 239.598007, 1843.348022, 1857.727050, 0.000000, 0.000000, -73.400001, -1, -1, -1 );
|
||||
CreateDynamicObject( 3565, 249.134002, 1875.989990, 1859.078002, 0.000000, 0.000000, -12.500000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19817, 244.731994, 1855.046997, 1856.496948, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 12923, "sw_block05", "dustyconcrete", 0 );
|
||||
CreateDynamicObject( 19929, 238.908996, 1845.779052, 1857.732055, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2475, 238.576004, 1845.092041, 1857.786987, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2475, 238.576004, 1845.973022, 1857.786987, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19903, 238.886993, 1852.663940, 1857.744018, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19903, 238.886993, 1857.545043, 1857.744018, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19817, 244.731994, 1859.936035, 1856.505004, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 12923, "sw_block05", "dustyconcrete", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19817, 244.731994, 1850.213012, 1856.496948, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 12923, "sw_block05", "dustyconcrete", 0 );
|
||||
CreateDynamicObject( 1002, 238.729995, 1845.829956, 1860.006958, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1014, 238.535003, 1845.823974, 1859.274047, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1650, 239.013000, 1846.689941, 1858.963989, 0.000000, 0.000000, 25.200000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19921, 239.309997, 1845.805053, 1858.758056, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19621, 239.005004, 1844.909057, 1858.761962, 0.000000, 0.000000, -147.699996, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19355, 245.260803, 1842.088012, 1860.215576, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 10249, "ottos2_sfw", "ottos_pics_sfe", 0 );
|
||||
CreateDynamicObject( 19815, 238.535003, 1855.029052, 1860.095825, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19815, 238.535003, 1855.029052, 1859.104858, 0.000000, 180.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1999, 244.522003, 1843.942016, 1857.735961, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2059, 244.578002, 1844.083007, 1858.573974, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1984, 258.829010, 1851.767944, 1857.656005, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1848, 262.945007, 1855.573974, 1857.625976, 0.000000, 0.000000, 270.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 341, 256.651123, 1855.343017, 1858.655761, 0.000000, 28.199998, -109.299942, -1, -1, -1 );
|
||||
CreateDynamicObject( 1842, 259.781005, 1855.352050, 1858.107055, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1995, 256.463989, 1851.837036, 1857.586059, 0.000000, 0.000000, 270.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1995, 256.493988, 1852.828979, 1857.586059, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1995, 256.463989, 1854.759033, 1857.586059, 0.000000, 0.000000, 270.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1995, 256.493988, 1855.750976, 1857.586059, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 944, 251.302017, 1856.556518, 1858.638427, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 341, 256.467956, 1855.982666, 1858.664794, 0.000000, 28.199998, -107.400222, -1, -1, -1 );
|
||||
CreateDynamicObject( 918, 256.495544, 1851.684448, 1858.817626, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1650, 256.497772, 1852.841674, 1858.757568, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1650, 256.614929, 1853.054931, 1858.757568, 0.000000, 0.000000, -24.800024, -1, -1, -1 );
|
||||
CreateDynamicObject( 918, 256.495544, 1852.335083, 1858.817626, 0.000000, 0.000000, -66.499977, -1, -1, -1 );
|
||||
CreateDynamicObject( 19329, 259.889465, 1849.657836, 1859.798583, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2164, 261.189849, 1872.801391, 1857.736572, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2162, 263.488403, 1871.236206, 1857.736572, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2161, 263.488403, 1869.464477, 1857.736572, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2162, 263.488403, 1868.134765, 1857.736572, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2164, 259.419281, 1872.801391, 1857.736572, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2167, 258.498840, 1872.801391, 1857.736572, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2165, 260.386077, 1868.690551, 1857.736572, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2310, 259.283569, 1868.564941, 1858.307128, 0.000000, 0.000000, -137.900177, -1, -1, -1 );
|
||||
CreateDynamicObject( 2472, 263.625640, 1869.469970, 1859.107910, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1685, 257.151245, 1863.329711, 1858.477294, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3800, 260.969757, 1862.297241, 1857.726562, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 3798, 262.515991, 1862.757446, 1857.706542, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1348, 257.097320, 1864.635742, 1858.427246, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1891, 259.709838, 1859.312500, 1857.666503, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1885, 256.321441, 1859.682617, 1857.696533, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1885, 256.321441, 1858.931884, 1857.696533, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 2662, 238.587280, 1849.567504, 1860.304809, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "Gang Vehicles", 120, "Impact", 84, 0, -13421773, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 2662, 263.417633, 1869.281738, 1860.304809, 0.000000, 0.000000, -90.000000, -1, -1, -1 ), 0, "Fast Travel", 120, "Impact", 84, 0, -13421773, 0, 1 );
|
||||
}
|
||||
|
||||
/* ** SCHEMA ** */
|
||||
/*
|
||||
CREATE TABLE IF NOT EXISTS GANG_FACILITIES (
|
||||
ID int(11) AUTO_INCREMENT primary key,
|
||||
GANG_ID int(11),
|
||||
ENTER_X float,
|
||||
ENTER_Y float,
|
||||
ENTER_Z float,
|
||||
ZONE_MIN_X float,
|
||||
ZONE_MIN_Y float,
|
||||
ZONE_MAX_X float,
|
||||
ZONE_MAX_Y float
|
||||
);
|
||||
|
||||
TRUNCATE TABLE GANG_FACILITIES;
|
||||
INSERT INTO GANG_FACILITIES (GANG_ID, ENTER_X, ENTER_Y, ENTER_Z, ZONE_MIN_X, ZONE_MIN_Y, ZONE_MAX_X, ZONE_MAX_Y) VALUES
|
||||
(14, -2056.4568,453.9176,35.1719, -2068, 446.5, -2009, 501.5),
|
||||
(6977, -1697.5094,883.6597,24.8982, -1723, 857.5, -1642, 911.5),
|
||||
(3885, -1606.2400,773.2818,7.1875, -1642, 755.5, -1563, 829.5),
|
||||
(4011, -1715.8917,1018.1326,17.9178,-1803, 964.5, -1722, 1037.5),
|
||||
(4011, -2754.3115, 90.5159, 7.0313, -2763, 78.5, -2710, 154.5),
|
||||
(7138, -2588.1001,59.9101,4.3544,-2613, 49.5, -2532, 79.5);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS GANG_FACILITIES_VEHICLES (
|
||||
`ID` int(11) primary key auto_increment,
|
||||
`GANG_ID` int(11),
|
||||
`MODEL` int(3),
|
||||
`PRICE` int(11),
|
||||
`COLOR1` int(3),
|
||||
`COLOR2` int(3),
|
||||
`PAINTJOB` tinyjob(1)
|
||||
`MODS` varchar(96)
|
||||
);
|
||||
*/
|
87
gamemodes/irresistible/features/gangs/gangs.pwn
Normal file
87
gamemodes/irresistible/features/gangs/gangs.pwn
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: gangs.inc
|
||||
* Purpose: gang system
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_GANGS ( MAX_PLAYERS ) // safest is MAX_PLAYERS
|
||||
#define INVALID_GANG_ID ( -1 )
|
||||
|
||||
#define MAX_COLEADERS ( 3 )
|
||||
|
||||
/* ** Macros ** */
|
||||
#define IsGangPrivate(%0) ( g_gangData[ %0 ] [ E_INVITE_ONLY ] )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum e_gang_data
|
||||
{
|
||||
E_SQL_ID, E_NAME[ 30 ], E_LEADER,
|
||||
E_COLOR, E_SOFT_DELETE_TS,
|
||||
|
||||
E_BANK, E_KILLS, E_DEATHS,
|
||||
E_SCORE, E_RESPECT,
|
||||
|
||||
E_COLEADER[ MAX_COLEADERS ], bool: E_INVITE_ONLY, E_JOIN_MSG[ 96 ],
|
||||
|
||||
bool: E_HAS_FACILITY
|
||||
};
|
||||
|
||||
enum E_GANG_LEAVE_REASON
|
||||
{
|
||||
GANG_LEAVE_QUIT,
|
||||
GANG_LEAVE_KICK,
|
||||
GANG_LEAVE_UNKNOWN
|
||||
};
|
||||
|
||||
new
|
||||
g_gangColors[ ] = { 0x99FF00FF, 0x00CC00FF, 0x009999FF, 0x0033CCFF, 0x330099FF, 0x660099FF, 0xCC0099FF },
|
||||
|
||||
g_gangData [ MAX_GANGS ] [ e_gang_data ],
|
||||
g_sortedGangData [ MAX_GANGS ] [ e_gang_data ], // used for sorting only
|
||||
p_GangID [ MAX_PLAYERS ],
|
||||
|
||||
bool: p_gangInvited [ MAX_PLAYERS ] [ MAX_GANGS ],
|
||||
p_gangInviteTick [ MAX_PLAYERS ],
|
||||
|
||||
Iterator:gangs<MAX_GANGS>
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerLeaveGang( playerid, gangid, reason );
|
||||
forward ZoneTimer( );
|
||||
|
||||
/* ** Hooks ** */
|
||||
/*hook OnGameModeInit( )
|
||||
{
|
||||
#if !defined DEBUG_MODE
|
||||
// Remove inactive gang members
|
||||
// mysql_single_query( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE UNIX_TIMESTAMP()-`USERS`.`LASTLOGGED` > 1209600" );
|
||||
|
||||
// Remove gangs with a non existant gang leader / unmatched player gang id to gang leader id (***broken query***)
|
||||
// mysql_single_query( "DELETE g FROM GANGS g LEFT JOIN USERS u ON g.LEADER = u.ID WHERE (u.GANG_ID != g.ID OR u.ID IS NULL) AND g.LEADER >= 0" );
|
||||
#endif
|
||||
return 1;
|
||||
}*/
|
||||
|
||||
/* ** Functions ** */
|
||||
stock SetPlayerGang( playerid, joining_gang )
|
||||
{
|
||||
if ( ! Iter_Contains( gangs, joining_gang ) )
|
||||
return 0;
|
||||
|
||||
// remove from existing gang
|
||||
if ( p_GangID[ playerid ] != INVALID_GANG_ID ) {
|
||||
RemovePlayerFromGang( playerid, GANG_LEAVE_QUIT );
|
||||
}
|
||||
|
||||
p_GangID[ playerid ] = joining_gang;
|
||||
if ( GetPlayerWantedLevel( playerid ) < 1 ) SetPlayerColor( playerid, g_gangData[ joining_gang ] [ E_COLOR ] );
|
||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ joining_gang ] [ E_SQL_ID ], GetPlayerAccountID( playerid ) ) );
|
||||
SendClientMessageToGang( joining_gang, g_gangData[ joining_gang ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) has joined the gang.", ReturnPlayerName( playerid ), playerid );
|
||||
return 1;
|
||||
}
|
17
gamemodes/irresistible/features/gangs/gvehicles.pwn
Normal file
17
gamemodes/irresistible/features/gangs/gvehicles.pwn
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
|
||||
/* ** Variables ** */
|
||||
|
||||
/* ** Hooks ** */
|
||||
|
||||
/* ** Functions ** */
|
536
gamemodes/irresistible/features/gangs/turfs.pwn
Normal file
536
gamemodes/irresistible/features/gangs/turfs.pwn
Normal file
@ -0,0 +1,536 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#if defined MAX_FACILITIES
|
||||
#define MAX_TURFS ( sizeof( g_gangzoneData ) + MAX_FACILITIES )
|
||||
#else
|
||||
#define MAX_TURFS ( sizeof( g_gangzoneData ) )
|
||||
#endif
|
||||
|
||||
#define INVALID_GANG_TURF ( -1 )
|
||||
|
||||
#define TAKEOVER_NEEDED_PEOPLE ( 1 )
|
||||
|
||||
/*
|
||||
Mean (μ): 61551.012315113
|
||||
Median: 38190.51
|
||||
Modes: 36520.39 56000.00
|
||||
Lowest value: 1561.59
|
||||
Highest value: 663634.31
|
||||
Range: 662072.72
|
||||
Interquartile range: 54438.43
|
||||
First quartile: 19224.91
|
||||
Third quartile: 73663.34
|
||||
Variance (σ2): 5620059337.0135
|
||||
Standard deviation (σ): 74967.055010941
|
||||
Quartile deviation: 27219.215
|
||||
Mean absolute deviation (MAD): 47203.259159645
|
||||
*/
|
||||
|
||||
#define TURF_SIZE_SMALL 19224.91
|
||||
#define TURF_SIZE_LARGE 73663.34
|
||||
|
||||
/* ** Variables ** */
|
||||
enum e_GANG_ZONE_DATA
|
||||
{
|
||||
E_NAME[ 16 ],
|
||||
Float: E_MIN_X,
|
||||
Float: E_MIN_Y,
|
||||
Float: E_MAX_X,
|
||||
Float: E_MAX_Y,
|
||||
Float: E_SIZE,
|
||||
E_CITY
|
||||
};
|
||||
|
||||
new const
|
||||
g_gangzoneData[ ] [ e_GANG_ZONE_DATA ] =
|
||||
{
|
||||
{ "SF-CITY", -2076.0, 1036.5, -1873.0, 1088.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -2014.0, 937.5, -1873.0, 1036.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -2014.0, 829.5, -1886.0, 937.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1873.0, 937.5, -1787.0, 1112.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -2014.0, 719.5, -1886.0, 829.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1886.0, 829.5, -1788.0, 937.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1886.0, 719.5, -1788.0, 829.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1788.0, 829.5, -1723.0, 937.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1723.0, 829.5, -1642.0, 937.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1642.0, 829.5, -1564.0, 937.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1564.0, 828.5, -1421.0, 1015.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1667.0, 720.5, -1563.0, 829.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1788.0, 719.5, -1667.0, 829.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1787.0, 935.5, -1704.0, 1037.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -1787.0, 1037.5, -1704.0, 1112.5, TURF_SIZE_LARGE, CITY_SF },
|
||||
{ "SF-CITY", -2130.0, 816.5, -2014.0, 1036.5, TURF_SIZE_LARGE, CITY_SF }
|
||||
/*{ "ELS3c", 2381.677, -1494.030, 2421.030, -1454.348, 1561.60, CITY_LS },
|
||||
{ "LVA5", 1236.630, 1163.410, 1277.050, 1203.280, 1611.54, CITY_LV },
|
||||
{ "BINT3", 1277.050, 1044.687, 1315.348, 1087.630, 1644.62, CITY_LV },
|
||||
{ "SUN3c", 1252.328, -926.999, 1357.000, -910.169, 1761.63, CITY_LS },
|
||||
{ "LVA4", 1315.348, 1044.687, 1375.598, 1087.630, 2587.31, CITY_LV },
|
||||
{ "LFL1a", 2581.729, -1454.348, 2632.830, -1393.420, 3113.48, CITY_LS },
|
||||
{ "LDT1a", 1370.848, -1170.869, 1463.900, -1130.848, 3724.03, CITY_LS },
|
||||
{ "ESPE1", -1620.300, 1176.520, -1580.010, 1274.260, 3937.94, CITY_SF },
|
||||
{ "JEF1a", 2185.330, -1210.739, 2281.447, -1154.588, 5397.06, CITY_LS },
|
||||
{ "MUL7b", 1318.130, -910.169, 1357.000, -768.026, 5525.09, CITY_LS },
|
||||
{ "JEF3a", 1996.910, -1449.670, 2056.860, -1350.718, 5932.18, CITY_LS },
|
||||
{ "JTW2", 1236.630, 2142.860, 1297.468, 2243.229, 6106.24, CITY_LV },
|
||||
{ "JEF3c", 2124.656, -1494.030, 2266.208, -1449.670, 6279.24, CITY_LS },
|
||||
{ "JTN6", 1848.400, 2478.489, 1938.800, 2553.489, 6780.00, CITY_LV },
|
||||
{ "ROD4c", 422.678, -1570.197, 466.221, -1406.050, 7147.45, CITY_LS },
|
||||
{ "LDT1c", 1391.050, -1026.328, 1463.900, -926.999, 7236.11, CITY_LS },
|
||||
{ "REDW4", 1704.588, 2243.229, 1777.390, 2342.830, 7251.15, CITY_LV },
|
||||
{ "LMEX1b", 1758.900, -1722.260, 1812.619, -1577.588, 7771.63, CITY_LS },
|
||||
{ "BINT4", 1375.598, 823.228, 1457.390, 919.447, 7869.94, CITY_LV },
|
||||
{ "ROD1c", 334.502, -1501.947, 422.678, -1406.050, 8455.81, CITY_LS },
|
||||
{ "RIH6a", 225.164, -1369.619, 334.502, -1292.067, 8479.38, CITY_LS },
|
||||
{ "LDT6", 1724.760, -1250.900, 1812.619, -1150.869, 8788.62, CITY_LS },
|
||||
{ "STRIP4", 2027.400, 1703.229, 2137.395, 1783.229, 8799.59, CITY_LV },
|
||||
{ "LDT1b", 1378.328, -1130.848, 1463.900, -1026.328, 8943.98, CITY_LS },
|
||||
{ "BINT2", 1197.390, 1044.687, 1277.050, 1163.390, 9455.88, CITY_LV },
|
||||
{ "CONF1a", 1073.218, -1842.270, 1323.900, -1804.208, 9541.46, CITY_LS },
|
||||
{ "SILLY3", -2270.040, -430.276, -2178.687, -324.114, 9698.21, CITY_SF },
|
||||
{ "MUL5a", 1096.468, -910.169, 1169.130, -768.026, 10328.39, CITY_LS },
|
||||
{ "YBELL2", 1457.458, 2723.229, 1534.560, 2863.229, 10794.28, CITY_LV },
|
||||
{ "STRIP3", 2027.400, 1783.229, 2162.385, 1863.229, 10798.79, CITY_LV },
|
||||
{ "JEF1b", 2056.860, -1210.739, 2185.330, -1126.317, 10845.69, CITY_LS },
|
||||
{ "MUL5b", 952.604, -937.184, 1096.468, -860.619, 11014.94, CITY_LS },
|
||||
{ "ALDEA", -1372.140, 2498.520, -1277.588, 2615.350, 11046.51, CITY_DESERTS },
|
||||
{ "CHC2a", 2126.860, -1126.317, 2185.330, -934.489, 11216.17, CITY_LS },
|
||||
{ "CHC1a", 1994.328, -1100.817, 2056.860, -920.815, 11255.90, CITY_LS },
|
||||
{ "RIH5b", 647.557, -954.661, 768.692, -860.619, 11391.77, CITY_LS },
|
||||
{ "LVA3", 1277.050, 1087.630, 1375.598, 1203.280, 11397.07, CITY_LV },
|
||||
{ "JTN7", 1377.390, 2433.229, 1534.560, 2507.229, 11630.58, CITY_LV },
|
||||
{ "LIND2b", 2201.820, -2095.000, 2324.000, -1989.900, 12841.10, CITY_LS },
|
||||
{ "JTN8", 1704.588, 2342.830, 1848.400, 2433.229, 13000.45, CITY_LV },
|
||||
{ "SUN3a", 1252.328, -1130.848, 1378.328, -1026.328, 13169.52, CITY_LS },
|
||||
{ "LMEX1a", 1701.900, -1842.270, 1812.619, -1722.260, 13287.38, CITY_LS },
|
||||
{ "WESTP3", -2411.218, 373.539, -2253.540, 458.411, 13382.44, CITY_SF },
|
||||
{ "RIH6b", 225.164, -1292.067, 466.221, -1235.067, 13740.24, CITY_LS },
|
||||
{ "SUN3b", 1252.328, -1026.328, 1391.050, -926.999, 13779.11, CITY_LS },
|
||||
{ "ELS3b", 2266.260, -1494.030, 2381.677, -1372.040, 14079.71, CITY_LS },
|
||||
{ "JTE2", 2623.177, 943.234, 2749.895, 1055.958, 14284.16, CITY_LV },
|
||||
{ "LIND4c", 2541.697, -1941.400, 2703.580, -1852.869, 14331.66, CITY_LS },
|
||||
{ "CHC1b", 2056.860, -1126.317, 2126.860, -920.815, 14385.14, CITY_LS },
|
||||
{ "JTE3", 2625.156, 2202.760, 2685.156, 2442.550, 14387.40, CITY_LV },
|
||||
{ "ROD1b", 225.164, -1501.947, 334.502, -1369.619, 14468.48, CITY_LS },
|
||||
{ "JTE4", 2536.427, 2442.550, 2685.156, 2542.550, 14872.90, CITY_LV },
|
||||
{ "ROD2a", 334.502, -1406.050, 466.221, -1292.067, 15013.73, CITY_LS },
|
||||
{ "VIN1b", 647.557, -1227.280, 787.460, -1118.280, 15249.42, CITY_LS },
|
||||
{ "ROD3b", 422.678, -1684.650, 558.098, -1570.197, 15499.22, CITY_LS },
|
||||
{ "JTN1", 2498.208, 2542.550, 2685.156, 2626.550, 15703.63, CITY_LV },
|
||||
{ "LDT7", 1724.760, -1430.869, 1812.619, -1250.900, 15811.89, CITY_LS },
|
||||
{ "ROD1a", 225.164, -1684.650, 312.803, -1501.947, 16011.91, CITY_LS },
|
||||
{ "JEF3b", 2056.860, -1449.670, 2266.208, -1372.040, 16251.67, CITY_LS },
|
||||
{ "SUN4", 1096.468, -1130.838, 1252.328, -1026.328, 16288.92, CITY_LS },
|
||||
{ "VERO2", 1046.150, -1722.260, 1161.520, -1577.588, 16690.80, CITY_LS },
|
||||
{ "COM1a", 1323.900, -1722.260, 1440.900, -1577.588, 16926.62, CITY_LS },
|
||||
{ "MUL7a", 1357.000, -926.999, 1463.900, -768.026, 16994.22, CITY_LS },
|
||||
{ "ROD4b", 466.221, -1570.197, 558.098, -1385.067, 17009.19, CITY_LS },
|
||||
{ "MUL5c", 911.802, -860.619, 1096.468, -768.026, 17098.78, CITY_LS },
|
||||
{ "MUL4", 768.692, -954.661, 952.604, -860.619, 17295.44, CITY_LS },
|
||||
{ "JTS2", 2377.385, 788.893, 2537.385, 897.901, 17441.27, CITY_LV },
|
||||
{ "IWD3a", 1812.619, -1852.869, 1971.660, -1742.310, 17583.41, CITY_LS },
|
||||
{ "LDOC1a", 2089.000, -2394.330, 2201.820, -2235.840, 17880.85, CITY_LS },
|
||||
{ "COM1b", 1370.848, -1577.588, 1463.900, -1384.947, 17925.63, CITY_LS },
|
||||
{ "JTN3", 2121.395, 2508.229, 2237.395, 2663.166, 17972.69, CITY_LV },
|
||||
{ "SUN2", 1096.468, -1026.328, 1252.328, -910.169, 18104.53, CITY_LS },
|
||||
{ "GLN2a", 1812.619, -1449.670, 1996.910, -1350.718, 18235.96, CITY_LS },
|
||||
{ "SFAIR2", -1242.979, -50.096, -1213.910, 578.395, 18269.58, CITY_SF },
|
||||
{ "STRIP2", 2106.697, 1863.229, 2162.385, 2202.760, 18907.79, CITY_LV },
|
||||
{ "LIND4a", 2541.697, -2059.229, 2703.580, -1941.400, 19074.51, CITY_LS },
|
||||
{ "MAR2", 807.921, -1577.588, 926.921, -1416.250, 19199.22, CITY_LS },
|
||||
{ "VAIR3", 1457.369, 1143.208, 1777.400, 1203.280, 19224.91, CITY_LV },
|
||||
{ "IWD3b", 1812.619, -1742.310, 1951.660, -1602.310, 19465.74, CITY_LS },
|
||||
{ "ESPE2", -1580.010, 1025.979, -1499.890, 1274.260, 19892.27, CITY_SF },
|
||||
{ "LDT3", 1370.848, -1384.947, 1463.900, -1170.869, 19920.38, CITY_LS },
|
||||
{ "ROD3a", 312.803, -1684.650, 422.678, -1501.947, 20074.49, CITY_LS },
|
||||
{ "PER1", 1440.900, -1722.260, 1583.500, -1577.588, 20630.22, CITY_LS },
|
||||
{ "MUL1a", 687.802, -860.619, 911.802, -768.026, 20740.83, CITY_LS },
|
||||
{ "GANTB1", -2741.070, 1490.468, -2616.395, 1659.680, 21096.51, CITY_SF },
|
||||
{ "CHC2b", 2185.330, -1154.588, 2281.447, -934.489, 21155.24, CITY_LS },
|
||||
{ "MUL6", 1169.130, -910.169, 1318.130, -768.026, 21179.30, CITY_LS },
|
||||
{ "JTN4", 1938.800, 2508.229, 2121.395, 2624.229, 21181.01, CITY_LV },
|
||||
{ "COM3", 1667.958, -1577.588, 1812.619, -1430.869, 21224.51, CITY_LS },
|
||||
{ "ROD5a", 72.648, -1544.170, 225.164, -1404.968, 21230.53, CITY_LS },
|
||||
{ "ROCE2", 2536.427, 2202.760, 2625.156, 2442.550, 21276.33, CITY_LV },
|
||||
{ "ROD5b", 72.648, -1684.650, 225.164, -1544.170, 21425.44, CITY_LS },
|
||||
{ "MKT4", 952.663, -1310.208, 1072.660, -1130.848, 21522.66, CITY_LS },
|
||||
{ "CHC4b", 2632.739, -1135.040, 2747.739, -945.033, 21850.80, CITY_LS },
|
||||
{ "MUL1c", 861.085, -674.885, 1156.550, -600.895, 21861.45, CITY_COUNTRY },
|
||||
{ "THEA3", -2253.540, 373.539, -1993.280, 458.411, 22088.78, CITY_SF },
|
||||
{ "REDE3", 1848.400, 2342.830, 2011.937, 2478.489, 22185.25, CITY_LV },
|
||||
{ "SFDWT4", -1580.010, 744.267, -1499.890, 1025.979, 22570.76, CITY_SF },
|
||||
{ "CONF1b", 1046.150, -1804.208, 1323.900, -1722.260, 22761.05, CITY_LS },
|
||||
{ "RIH5a", 647.557, -1118.280, 787.460, -954.661, 22890.79, CITY_LS },
|
||||
{ "OCEAF1", -2994.489, 277.411, -2867.850, 458.411, 22921.64, CITY_SF },
|
||||
{ "GGC2", 964.390, 930.890, 1166.530, 1044.687, 23002.92, CITY_LV },
|
||||
{ "GLN1b", 1812.619, -1100.817, 1994.328, -973.380, 23156.44, CITY_LS },
|
||||
{ "LVA2", 1375.598, 919.447, 1457.369, 1203.280, 23209.30, CITY_LV },
|
||||
{ "TOM", -405.769, 1712.859, -276.717, 1892.750, 23215.29, CITY_DESERTS },
|
||||
{ "VERO3", 1161.520, -1722.260, 1323.900, -1577.588, 23491.83, CITY_LS },
|
||||
{ "ELS1a", 2281.447, -1372.040, 2381.677, -1135.040, 23754.50, CITY_LS },
|
||||
{ "CALI2", 2137.395, 1703.229, 2437.385, 1783.229, 23999.19, CITY_LV },
|
||||
{ "IWD4", 1951.660, -1742.310, 2124.656, -1602.310, 24219.43, CITY_LS },
|
||||
{ "PILL2", 2624.395, 1383.229, 2685.156, 1783.229, 24304.39, CITY_LV },
|
||||
{ "IWD2", 2124.656, -1742.310, 2222.560, -1494.030, 24307.62, CITY_LS },
|
||||
{ "WESTP1", -2533.040, 458.411, -2329.310, 578.395, 24444.33, CITY_SF },
|
||||
{ "SFDWT2", -1871.718, 1176.420, -1620.300, 1274.260, 24598.72, CITY_SF },
|
||||
{ "COM4", 1583.500, -1722.260, 1758.900, -1577.588, 25375.47, CITY_LS },
|
||||
{ "ELS1b", 2381.677, -1454.348, 2462.125, -1135.040, 25687.68, CITY_LS },
|
||||
{ "MAR1", 647.710, -1577.588, 807.921, -1416.250, 25848.12, CITY_LS },
|
||||
{ "RIH3a", 72.648, -1404.968, 225.164, -1235.067, 25912.61, CITY_LS },
|
||||
{ "VIN1a", 647.710, -1416.250, 787.460, -1227.280, 26408.55, CITY_LS },
|
||||
{ "ELS3a", 2222.560, -1628.530, 2421.030, -1494.030, 26694.21, CITY_LS },
|
||||
{ "ROD4a", 558.098, -1684.650, 647.520, -1384.930, 26801.55, CITY_LS },
|
||||
{ "ROD2b", 466.221, -1385.067, 647.520, -1235.067, 27194.85, CITY_LS },
|
||||
{ "REDE2", 1817.390, 2202.760, 2011.937, 2342.830, 27250.21, CITY_LV },
|
||||
{ "RING", 2162.385, 1783.229, 2437.385, 1883.229, 27500.00, CITY_LV },
|
||||
{ "IWD5", 1971.660, -1852.869, 2222.560, -1742.310, 27739.24, CITY_LS },
|
||||
{ "LIND1b", 2089.000, -2235.840, 2201.820, -1989.900, 27746.97, CITY_LS },
|
||||
{ "SUN1", 952.663, -1130.838, 1096.468, -937.184, 27848.41, CITY_LS },
|
||||
{ "PRP3", 1848.400, 2553.489, 1938.800, 2863.229, 28000.50, CITY_LV },
|
||||
{ "VERO4b", 930.221, -2006.780, 1073.218, -1804.208, 28967.19, CITY_LS },
|
||||
{ "BLUF1b", 1073.218, -2006.780, 1249.619, -1842.270, 29019.73, CITY_LS },
|
||||
{ "VIN2", 787.460, -1130.838, 952.604, -954.661, 29094.57, CITY_LS },
|
||||
{ "VIN3", 787.460, -1310.208, 952.663, -1130.838, 29632.46, CITY_LS },
|
||||
{ "COM2", 1463.900, -1577.588, 1667.958, -1430.869, 29939.18, CITY_LS },
|
||||
{ "MKT3", 787.460, -1416.250, 1072.660, -1310.208, 30243.17, CITY_LS },
|
||||
{ "RSW2", 2377.385, 596.348, 2537.385, 788.893, 30807.19, CITY_LV },
|
||||
{ "JTN2", 2237.395, 2542.550, 2498.208, 2663.166, 31458.21, CITY_LV },
|
||||
{ "EBE2a", 2632.830, -1668.130, 2747.739, -1393.420, 31566.62, CITY_LS },
|
||||
{ "LIND2a", 2089.000, -1989.900, 2324.000, -1852.869, 32202.28, CITY_LS },
|
||||
{ "CHINA", -2274.166, 578.395, -2078.666, 744.169, 32408.81, CITY_SF },
|
||||
{ "LDOC2", 2324.000, -2145.100, 2703.580, -2059.229, 32594.95, CITY_LS },
|
||||
{ "EBAY", -1132.817, -768.026, -956.476, -578.117, 33488.74, CITY_COUNTRY },
|
||||
{ "VISA2", 1817.390, 1703.229, 2027.400, 1863.229, 33601.60, CITY_LV },
|
||||
{ "OCEAF3", -2994.489, -430.276, -2831.885, -222.589, 33770.73, CITY_SF },
|
||||
{ "RIH1a", 321.355, -860.619, 687.802, -768.026, 33930.43, CITY_LS },
|
||||
{ "RIH1b", 321.355, -768.026, 700.794, -674.885, 35341.32, CITY_COUNTRY },
|
||||
{ "STAR1", 2162.385, 1883.229, 2437.385, 2012.180, 35461.53, CITY_LV },
|
||||
{ "EBE2b", 2747.739, -1668.130, 2959.350, -1498.619, 35870.40, CITY_LS },
|
||||
{ "JEF2", 2056.860, -1372.040, 2281.447, -1210.739, 36226.09, CITY_LS },
|
||||
{ "LDT4", 1463.900, -1290.869, 1724.760, -1150.869, 36520.39, CITY_LS },
|
||||
{ "LDT5", 1463.900, -1430.869, 1724.760, -1290.869, 36520.39, CITY_LS },
|
||||
{ "JTS1", 1457.390, 823.228, 2377.385, 863.229, 36800.69, CITY_LV },
|
||||
{ "ELS4", 2421.030, -1628.530, 2632.830, -1454.348, 36891.75, CITY_LS },
|
||||
{ "GGC1", 964.390, 1044.687, 1197.390, 1203.218, 36937.72, CITY_LV },
|
||||
{ "CHC4a", 2747.739, -1120.040, 2959.350, -945.033, 37033.42, CITY_LS },
|
||||
{ "MUL1b", 737.572, -768.026, 1142.290, -674.885, 37695.83, CITY_COUNTRY },
|
||||
{ "LDOC3b", 2201.820, -2730.875, 2324.000, -2418.330, 38186.71, CITY_LS },
|
||||
{ "ELS2", 2462.125, -1454.348, 2581.729, -1135.040, 38190.51, CITY_LS },
|
||||
{ "GAN1", 2222.560, -1722.328, 2632.830, -1628.530, 38482.49, CITY_LS },
|
||||
{ "CUNTC2", -2831.885, -430.276, -2646.395, -222.589, 38523.85, CITY_SF },
|
||||
{ "LIND1a", 1970.619, -2179.250, 2089.000, -1852.869, 38637.30, CITY_LS },
|
||||
{ "ESPN3", -1982.317, 1274.260, -1524.239, 1358.900, 38771.73, CITY_SF },
|
||||
{ "HIGH", 1817.390, 1283.229, 2027.390, 1469.229, 39060.00, CITY_LV },
|
||||
{ "LDOC1b", 2201.820, -2418.330, 2324.000, -2095.000, 39504.44, CITY_LS },
|
||||
{ "LDM", 1823.078, 596.348, 1997.218, 823.228, 39508.88, CITY_LV },
|
||||
{ "SUNMA", -2353.166, 2275.790, -2153.166, 2475.790, 40000.00, CITY_DESERTS },
|
||||
{ "THEA1", -2329.310, 458.411, -1993.280, 578.395, 40318.23, CITY_SF },
|
||||
{ "ELCO1", 1692.619, -2179.250, 1812.619, -1842.270, 40437.59, CITY_LS },
|
||||
{ "BFC1", 1375.598, 596.348, 1558.088, 823.228, 41403.32, CITY_LV },
|
||||
{ "PINK", 1817.390, 1083.229, 2027.390, 1283.229, 42000.00, CITY_LV },
|
||||
{ "JTW1", 1197.390, 1163.390, 1236.630, 2243.229, 42372.87, CITY_LV },
|
||||
{ "LFL1b", 2581.729, -1393.420, 2747.739, -1135.040, 42893.66, CITY_LS },
|
||||
{ "VISA1", 1817.390, 1863.229, 2106.697, 2011.828, 42990.73, CITY_LV },
|
||||
{ "PRP4", 1938.800, 2624.229, 2121.395, 2861.550, 43333.62, CITY_LV },
|
||||
{ "VERO1", 851.447, -1804.208, 1046.150, -1577.588, 44123.59, CITY_LS },
|
||||
{ "LDS", 2749.895, 943.234, 2923.385, 1198.989, 44370.93, CITY_LV },
|
||||
{ "LDOC3c", 2703.580, -2302.330, 2959.350, -2126.895, 44871.02, CITY_LS },
|
||||
{ "LIND3", 2324.000, -2059.229, 2541.697, -1852.869, 44923.95, CITY_LS },
|
||||
{ "THEA2", -2411.218, 265.243, -1993.280, 373.539, 45261.00, CITY_SF },
|
||||
{ "THALL1", 1323.900, -1842.270, 1701.900, -1722.260, 45363.78, CITY_LS },
|
||||
{ "MUL2b", 1269.130, -768.026, 1414.067, -452.424, 45742.41, CITY_COUNTRY },
|
||||
{ "MAR3", 647.710, -1804.208, 851.447, -1577.588, 46170.87, CITY_LS },
|
||||
{ "BATTP", -2741.070, 1268.410, -2533.040, 1490.468, 46194.73, CITY_SF },
|
||||
{ "DRAG", 1817.390, 863.231, 2027.390, 1083.229, 46199.57, CITY_LV },
|
||||
{ "BFLD1", 964.390, 1203.218, 1197.390, 1403.218, 46600.00, CITY_LV },
|
||||
{ "JTN5", 1534.560, 2433.229, 1848.400, 2583.229, 47075.99, CITY_LV },
|
||||
{ "YBELL1", 1117.400, 2723.229, 1457.458, 2863.229, 47608.11, CITY_LV },
|
||||
{ "IWD1", 1812.619, -1602.310, 2124.656, -1449.670, 47629.33, CITY_LS },
|
||||
{ "REDW1", 1297.468, 2142.860, 1777.390, 2243.229, 48169.24, CITY_LV },
|
||||
{ "DOH1", -2270.040, -324.114, -1794.920, -222.589, 48236.56, CITY_SF },
|
||||
{ "TOPFA", 967.382, -450.390, 1176.780, -217.899, 48683.15, CITY_COUNTRY },
|
||||
{ "BARRA", -926.130, 1398.729, -719.234, 1634.687, 48818.76, CITY_DESERTS },
|
||||
{ "PIRA", 1817.390, 1469.229, 2027.400, 1703.229, 49142.34, CITY_LV },
|
||||
{ "CITYS", -2867.850, 277.411, -2593.437, 458.411, 49668.76, CITY_SF },
|
||||
{ "SFGLF4", -2646.395, -355.493, -2270.040, -222.589, 50019.08, CITY_SF },
|
||||
{ "STRIP1", 2027.400, 863.229, 2087.385, 1703.229, 50387.38, CITY_LV },
|
||||
{ "HASH", -2593.437, -222.589, -2411.218, 54.722, 50531.33, CITY_SF },
|
||||
{ "LAIR2a", 1852.000, -2394.330, 2089.000, -2179.250, 50973.97, CITY_LS },
|
||||
{ "WWE1", 1098.310, 1726.218, 1197.390, 2243.229, 51225.42, CITY_LV },
|
||||
{ "SHERR", -789.736, 1659.680, -599.505, 1929.410, 51311.00, CITY_DESERTS },
|
||||
{ "ELCO2", 1812.619, -2179.250, 1970.619, -1852.869, 51568.19, CITY_LS },
|
||||
{ "SFDWT3", -1700.010, 744.267, -1580.010, 1176.520, 51870.35, CITY_SF },
|
||||
{ "VALLE", -936.668, 2611.437, -715.960, 2847.895, 52188.17, CITY_DESERTS },
|
||||
{ "PAYAS", -354.332, 2580.360, -133.625, 2816.820, 52188.36, CITY_DESERTS },
|
||||
{ "BINT1", 1166.530, 795.010, 1375.598, 1044.687, 52199.46, CITY_LV },
|
||||
{ "GAN2", 2222.560, -1852.869, 2632.830, -1722.328, 53557.06, CITY_LS },
|
||||
{ "REDE1", 1817.390, 2011.828, 2106.697, 2202.760, 55237.96, CITY_LV },
|
||||
{ "CALI1", 2087.385, 1543.229, 2437.385, 1703.229, 56000.00, CITY_LV },
|
||||
{ "ROY", 2087.385, 1383.229, 2437.385, 1543.229, 56000.00, CITY_LV },
|
||||
{ "RIH3b", 72.648, -1235.067, 321.355, -1008.150, 56435.84, CITY_LS },
|
||||
{ "STAR2", 2437.385, 1783.229, 2685.156, 2012.180, 56727.42, CITY_LV },
|
||||
{ "MUL2a", 1281.130, -452.424, 1641.130, -290.911, 58144.67, CITY_COUNTRY },
|
||||
{ "SFDWT1", -1982.317, 744.169, -1871.718, 1274.260, 58627.53, CITY_SF },
|
||||
{ "KACC", 2498.208, 2626.550, 2749.895, 2861.550, 59146.44, CITY_LV },
|
||||
{ "HGP", 1777.390, 863.231, 1817.390, 2342.830, 59183.96, CITY_LV },
|
||||
{ "LDOC3a", 2324.000, -2302.330, 2703.580, -2145.100, 59681.36, CITY_LS },
|
||||
{ "RIH2", 321.355, -1044.067, 647.557, -860.619, 59841.10, CITY_LS },
|
||||
{ "RIE", 1558.088, 596.348, 1823.078, 823.234, 60122.51, CITY_LV },
|
||||
{ "EBE3c", 2632.830, -1852.869, 2959.350, -1668.130, 60320.98, CITY_LS },
|
||||
{ "BLUEB", 19.607, -404.135, 349.605, -220.136, 60719.30, CITY_COUNTRY },
|
||||
{ "LST", 2749.895, 1198.989, 2923.385, 1548.989, 60721.49, CITY_LV },
|
||||
{ "GLN1", 1812.619, -1350.718, 2056.860, -1100.817, 61036.09, CITY_LS },
|
||||
{ "SFDWT6", -1993.280, 265.243, -1794.920, 578.395, 62116.82, CITY_SF },
|
||||
{ "REDW3", 1377.390, 2243.229, 1704.588, 2433.229, 62167.62, CITY_LV },
|
||||
{ "RIH4", 321.355, -1235.067, 647.520, -1044.067, 62297.51, CITY_LS },
|
||||
{ "GANTB", -2741.447, 1659.680, -2616.395, 2175.145, 64459.92, CITY_DESERTS },
|
||||
{ "FLINTI", -187.699, -1596.760, 17.062, -1276.598, 65556.68, CITY_COUNTRY },
|
||||
{ "CHC3", 2281.447, -1135.040, 2632.739, -945.033, 66747.94, CITY_LS },
|
||||
{ "SRY", 2749.895, 1548.989, 2923.385, 1937.250, 67359.39, CITY_LV },
|
||||
{ "ISLE", 2011.937, 2202.760, 2237.395, 2508.229, 68870.42, CITY_LV },
|
||||
{ "CIVI", -2741.070, 458.411, -2533.040, 793.411, 69690.06, CITY_SF },
|
||||
{ "PLS", 2703.580, -2126.895, 2959.350, -1852.869, 70087.63, CITY_LS },
|
||||
{ "MKT2", 926.921, -1577.588, 1370.848, -1416.250, 71622.29, CITY_LS },
|
||||
{ "WESTP2", -2593.437, 54.722, -2411.218, 458.411, 73559.80, CITY_SF },
|
||||
{ "PINT", 1098.390, 2243.229, 1377.390, 2507.229, 73656.00, CITY_LV },
|
||||
{ "FINA", -1871.718, 744.169, -1701.300, 1176.420, 73663.34, CITY_SF },
|
||||
{ "SPIN", 2121.395, 2663.166, 2498.208, 2861.550, 74753.67, CITY_LV },
|
||||
{ "PILL1", 2437.385, 1383.229, 2624.395, 1783.229, 74804.00, CITY_LV },
|
||||
{ "BFLD2", 964.390, 1403.218, 1197.390, 1726.218, 75259.00, CITY_LV },
|
||||
{ "BIGE", -410.019, 1403.338, -137.968, 1681.229, 75600.53, CITY_DESERTS },
|
||||
{ "DILLI", 580.794, -674.885, 861.085, -404.790, 75705.20, CITY_COUNTRY },
|
||||
{ "ELQUE", -1645.229, 2498.520, -1372.140, 2777.850, 76281.96, CITY_DESERTS },
|
||||
{ "ESPN1", -2533.040, 1358.900, -1996.660, 1501.208, 76331.15, CITY_SF },
|
||||
{ "SFAIR3", -1499.890, -50.096, -1242.979, 249.904, 77073.30, CITY_SF },
|
||||
{ "MUL3", 1414.067, -768.026, 1667.609, -452.424, 80018.35, CITY_COUNTRY },
|
||||
{ "EBE1", 2747.739, -1498.619, 2959.350, -1120.040, 80111.50, CITY_LS },
|
||||
{ "MKT1", 1072.660, -1416.250, 1370.848, -1130.848, 85103.44, CITY_LS },
|
||||
{ "RSW1", 1997.218, 596.348, 2377.385, 823.228, 86252.28, CITY_LV },
|
||||
{ "PRP1", 1534.560, 2583.229, 1848.400, 2863.229, 87875.18, CITY_LV },
|
||||
{ "EASB2", -1794.920, -50.096, -1499.890, 249.904, 88509.00, CITY_SF },
|
||||
{ "LEAFY", -1166.968, -1856.030, -815.624, -1602.067, 89228.38, CITY_COUNTRY },
|
||||
{ "LVA1", 1457.390, 863.229, 1777.400, 1143.208, 89596.08, CITY_LV },
|
||||
{ "PRP2", 1117.400, 2507.229, 1534.560, 2723.229, 90106.57, CITY_LV },
|
||||
{ "BLUEB1", 104.528, -220.136, 349.605, 152.235, 91259.20, CITY_COUNTRY },
|
||||
{ "SFDWT5", -2078.666, 578.395, -1499.890, 744.267, 96002.73, CITY_SF },
|
||||
{ "RSE", 2537.385, 676.549, 2902.350, 943.234, 97330.71, CITY_LV },
|
||||
{ "SANB1", -2616.395, 1501.208, -1996.660, 1659.680, 98210.67, CITY_SF },
|
||||
{ "PARA", -2741.070, 793.411, -2533.040, 1268.410, 98814.06, CITY_SF },
|
||||
{ "CAM", 2087.385, 1203.229, 2640.395, 1383.229, 99541.80, CITY_LV },
|
||||
{ "OVS", 2162.385, 2012.180, 2685.156, 2202.760, 99629.67, CITY_LV },
|
||||
{ "JUNIHI", -2533.040, 578.395, -2274.166, 968.369, 100954.14, CITY_SF },
|
||||
{ "JUNIHO", -2533.040, 968.369, -2274.166, 1358.900, 101098.33, CITY_SF },
|
||||
{ "ROCE1", 2237.395, 2202.760, 2536.427, 2542.550, 101608.08, CITY_LV },
|
||||
{ "JTE1", 2685.156, 1055.958, 2749.895, 2626.550, 101678.57, CITY_LV },
|
||||
{ "VERO4a", 647.710, -2173.290, 930.221, -1804.208, 104269.72, CITY_LS },
|
||||
{ "SILLY4", -2178.687, -599.882, -1794.920, -324.114, 105830.64, CITY_SF },
|
||||
{ "ARCO", -901.129, 2221.860, -592.090, 2571.968, 108197.00, CITY_DESERTS },
|
||||
{ "HAUL", -792.254, -698.554, -452.403, -380.040, 108247.30, CITY_COUNTRY },
|
||||
{ "DAM", -968.770, 1929.410, -481.126, 2155.260, 110134.39, CITY_DESERTS },
|
||||
{ "ESPN2", -1996.660, 1358.900, -1524.239, 1592.510, 110362.26, CITY_SF },
|
||||
{ "ESPE3", -1499.890, 578.395, -1339.890, 1274.260, 111338.39, CITY_SF },
|
||||
{ "GARC", -2411.218, -222.589, -2173.040, 265.243, 116190.84, CITY_SF },
|
||||
{ "MONT", 1119.510, 119.526, 1451.400, 493.321, 124058.83, CITY_COUNTRY },
|
||||
{ "CREE", 2749.895, 1937.250, 2921.620, 2669.790, 125795.50, CITY_LV },
|
||||
{ "LAIR1", 1249.619, -2394.330, 1852.000, -2179.250, 129560.14, CITY_LS },
|
||||
{ "SMB2", 72.648, -2173.290, 342.648, -1684.650, 131932.79, CITY_LS },
|
||||
{ "MULINT", 1463.900, -1150.869, 1812.619, -768.026, 133504.62, CITY_LS },
|
||||
{ "ANGPI", -2324.937, -2584.290, -1964.218, -2212.110, 134252.37, CITY_COUNTRY },
|
||||
{ "MEAD", 37.032, 2337.177, 435.988, 2677.895, 135931.50, CITY_DESERTS },
|
||||
{ "OCTAN", 338.657, 1228.510, 664.307, 1655.050, 138902.76, CITY_DESERTS },
|
||||
{ "LOT", 2087.385, 943.234, 2623.177, 1203.229, 139303.23, CITY_LV },
|
||||
{ "REDW2", 1236.630, 1883.109, 1777.390, 2142.860, 140463.00, CITY_LV },
|
||||
{ "SMB1", 342.648, -2173.290, 647.710, -1684.650, 149065.50, CITY_LS },
|
||||
{ "BLUF2", 1249.619, -2179.250, 1692.619, -1842.270, 149282.12, CITY_LS },
|
||||
{ "VAIR1", 1236.630, 1203.280, 1457.369, 1883.109, 150064.78, CITY_LV },
|
||||
{ "FLINTR", -594.190, -1648.550, -187.699, -1276.598, 151195.15, CITY_COUNTRY },
|
||||
{ "BLUF1a", 930.221, -2488.416, 1249.619, -2006.780, 153833.57, CITY_LS },
|
||||
{ "PALO", 2160.218, -149.003, 2576.916, 228.322, 157230.57, CITY_COUNTRY },
|
||||
{ "LDOC4", 2373.770, -2697.090, 2809.218, -2330.458, 159649.20, CITY_LS },
|
||||
{ "FARM", -1209.670, -1317.098, -908.161, -787.390, 159711.75, CITY_COUNTRY },
|
||||
{ "SFAIR5", -1213.910, -50.096, -947.979, 578.395, 167135.26, CITY_COUNTRY },
|
||||
{ "QUARY", 337.243, 710.840, 860.554, 1031.708, 167913.75, CITY_DESERTS },
|
||||
{ "WWE", 883.307, 1726.218, 1098.310, 2507.229, 167919.75, CITY_LV },
|
||||
{ "CALT", -2274.166, 744.169, -1982.317, 1358.900, 179408.62, CITY_SF },
|
||||
{ "EASB1", -1794.920, 249.904, -1242.979, 578.395, 181307.67, CITY_SF },
|
||||
{ "DOH2", -2173.040, -222.589, -1794.920, 265.243, 184459.04, CITY_SF },
|
||||
{ "CARSO", -376.233, 826.325, 123.717, 1220.437, 197036.29, CITY_DESERTS },
|
||||
{ "SILLY1", -2178.687, -1115.578, -1794.920, -599.882, 197907.07, CITY_SF },
|
||||
{ "OCEAF2", -2994.489, -222.589, -2593.437, 277.411, 200526.00, CITY_SF },
|
||||
{ "FERN", 508.187, -139.259, 1306.660, 119.526, 206632.84, CITY_COUNTRY },
|
||||
{ "SUNNN", -2741.070, 2175.145, -2353.166, 2722.790, 212433.71, CITY_DESERTS },
|
||||
{ "VAIR2", 1457.369, 1203.280, 1777.390, 1883.109, 217559.54, CITY_LV },
|
||||
{ "BLUAC", -319.674, -220.136, 104.528, 293.324, 217811.28, CITY_COUNTRY },
|
||||
{ "BAYV", -2994.489, 458.411, -2741.070, 1339.609, 223312.26, CITY_SF },
|
||||
{ "REST", -91.583, 1655.050, 421.234, 2123.010, 239977.82, CITY_DESERTS },
|
||||
{ "NROCK", 2285.370, -768.026, 2770.590, -269.739, 241778.79, CITY_COUNTRY },
|
||||
{ "LAIR2b", 1382.729, -2730.875, 2201.820, -2394.330, 275660.93, CITY_LS },
|
||||
{ "HILLP", -2994.489, -811.276, -2178.687, -430.276, 310820.56, CITY_SF },
|
||||
{ "SANB2", -2616.395, 1659.680, -1996.660, 2175.145, 319451.68, CITY_DESERTS },
|
||||
{ "SFAIR1", -1794.920, -730.117, -1213.910, -50.096, 395099.00, CITY_SF },
|
||||
{ "PANOP", -947.979, -304.320, -319.674, 327.071, 396706.12, CITY_COUNTRY },
|
||||
{ "CREEK", -1820.640, -2643.677, -1226.780, -1771.660, 517855.96, CITY_COUNTRY },
|
||||
{ "BACKO", -1166.968, -2641.187, -321.743, -1856.030, 663634.31, CITY_COUNTRY }*/
|
||||
}
|
||||
;
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_TURF_ZONE_DATA {
|
||||
E_ID,
|
||||
|
||||
E_OWNER,
|
||||
E_COLOR,
|
||||
|
||||
E_AREA,
|
||||
E_FACILITY_GANG
|
||||
};
|
||||
|
||||
new
|
||||
g_gangTurfData [ MAX_TURFS ] [ E_TURF_ZONE_DATA ],
|
||||
Iterator: turfs < MAX_TURFS >,
|
||||
|
||||
g_gangzoneAttacker [ MAX_TURFS ] = { INVALID_GANG_ID, ... },
|
||||
g_gangzoneAttackCount [ MAX_TURFS ],
|
||||
g_gangzoneAttackTimeout [ MAX_TURFS ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnPlayerUpdateGangZone( playerid, zoneid );
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
/* ** Gangzone Allocation ** */
|
||||
for ( new i = 0; i < sizeof( g_gangzoneData ); i++ ) {
|
||||
Turf_Create( g_gangzoneData[ i ] [ E_MIN_X ], g_gangzoneData[ i ] [ E_MIN_Y ], g_gangzoneData[ i ] [ E_MAX_X ], g_gangzoneData[ i ] [ E_MAX_Y ], INVALID_GANG_ID, COLOR_GANGZONE );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerEnterDynArea( playerid, areaid )
|
||||
{
|
||||
if ( ! IsPlayerNPC( playerid ) )
|
||||
{
|
||||
new
|
||||
first_turf = Turf_GetFirstTurf( playerid );
|
||||
|
||||
CallLocalFunction( "OnPlayerUpdateGangZone", "dd", playerid, first_turf );
|
||||
}
|
||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||
}
|
||||
|
||||
hook OnPlayerLeaveDynArea( playerid, areaid )
|
||||
{
|
||||
if ( ! IsPlayerNPC( playerid ) )
|
||||
{
|
||||
new
|
||||
total_areas = GetPlayerNumberDynamicAreas( playerid );
|
||||
|
||||
// reduced to another area
|
||||
if ( total_areas )
|
||||
{
|
||||
new
|
||||
first_turf = Turf_GetFirstTurf( playerid );
|
||||
|
||||
CallLocalFunction( "OnPlayerUpdateGangZone", "dd", playerid, first_turf );
|
||||
}
|
||||
|
||||
// if the player is in no areas, then they left
|
||||
else CallLocalFunction( "OnPlayerUpdateGangZone", "dd", playerid, INVALID_GANG_TURF );
|
||||
}
|
||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock Turf_Create( Float: min_x, Float: min_y, Float: max_x, Float: max_y, owner_id = INVALID_GANG_ID, color = COLOR_GANGZONE, facility_gang_id = INVALID_GANG_ID )
|
||||
{
|
||||
new
|
||||
id = Iter_Free( turfs );
|
||||
|
||||
if ( id != ITER_NONE )
|
||||
{
|
||||
// set turf owners
|
||||
g_gangTurfData[ id ] [ E_OWNER ] = owner_id;
|
||||
g_gangTurfData[ id ] [ E_COLOR ] = color;
|
||||
g_gangTurfData[ id ] [ E_FACILITY_GANG ] = facility_gang_id;
|
||||
|
||||
// create area
|
||||
g_gangTurfData[ id ] [ E_ID ] = GangZoneCreate( min_x, min_y, max_x, max_y );
|
||||
g_gangTurfData[ id ] [ E_AREA ] = CreateDynamicRectangle( min_x, min_y, max_x, max_y, 0, 0 );
|
||||
|
||||
// add to iterator
|
||||
Iter_Add( turfs, id );
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
stock Turf_GetOwner( id ) {
|
||||
return g_gangTurfData[ id ] [ E_OWNER ];
|
||||
}
|
||||
|
||||
stock Turf_GetFacility( id ) {
|
||||
return g_gangTurfData[ id ] [ E_FACILITY_GANG ];
|
||||
}
|
||||
|
||||
stock Turf_GetFirstTurf( playerid )
|
||||
{
|
||||
new
|
||||
current_areas[ 4 ];
|
||||
|
||||
GetPlayerDynamicAreas( playerid, current_areas );
|
||||
|
||||
foreach( new i : Reverse(turfs) )
|
||||
{
|
||||
if ( current_areas[ 0 ] == g_gangTurfData[ i ] [ E_AREA ] || current_areas[ 1 ] == g_gangTurfData[ i ] [ E_AREA ] || current_areas[ 2 ] == g_gangTurfData[ i ] [ E_AREA ] || current_areas[ 3 ] == g_gangTurfData[ i ] [ E_AREA ] )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
stock Turf_GetProfitability( zoneid, gang_members, Float: default_pay = 4500.0 )
|
||||
{
|
||||
// size adjustments
|
||||
//if ( g_gangzoneData[ zoneid ] [ E_SIZE ] < TURF_SIZE_SMALL ) // lower than 1st quartile, decrease pay
|
||||
// default_pay *= 0.75;
|
||||
|
||||
// Normal Gang Zones
|
||||
if ( zoneid < sizeof( g_gangzoneData ) )
|
||||
{
|
||||
if ( g_gangzoneData[ zoneid ] [ E_SIZE ] > TURF_SIZE_LARGE ) // higher than 1st quartile, increase pay
|
||||
default_pay *= 1.25;
|
||||
|
||||
// city adjustments
|
||||
if ( g_gangzoneData[ zoneid ] [ E_CITY ] == CITY_SF )
|
||||
default_pay *= 1.25;
|
||||
|
||||
if ( g_gangzoneData[ zoneid ] [ E_CITY ] == CITY_COUNTRY || g_gangzoneData[ zoneid ] [ E_CITY ] == CITY_DESERTS )
|
||||
default_pay *= 1.1;
|
||||
}
|
||||
|
||||
// facility 2x
|
||||
if ( g_gangTurfData[ zoneid ] [ E_FACILITY_GANG ] != INVALID_GANG_ID )
|
||||
default_pay *= 2;
|
||||
|
||||
// get online players
|
||||
new Float: player_boost = 0.0;
|
||||
|
||||
if ( gang_members >= 10 ) player_boost = 1.5;
|
||||
else if ( gang_members > 1 ) player_boost = 1.0 + float( gang_members - 1 ) * 0.05;
|
||||
|
||||
// max boost
|
||||
default_pay *= player_boost > 1.5 ? 1.5 : player_boost;
|
||||
|
||||
// return rounded number
|
||||
return floatround( default_pay );
|
||||
}
|
213
gamemodes/irresistible/features/pilot.pwn
Normal file
213
gamemodes/irresistible/features/pilot.pwn
Normal file
@ -0,0 +1,213 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Stev
|
||||
* Module: pilot.pwn
|
||||
* Purpose: Pilot mini-job
|
||||
*/
|
||||
|
||||
#include <YSI\y_hooks>
|
||||
|
||||
// ** ENUMS
|
||||
|
||||
enum taskEnum
|
||||
{
|
||||
taskName[64],
|
||||
Float:taskStart[3],
|
||||
Float:taskFinish[3],
|
||||
taskReward[2],
|
||||
};
|
||||
|
||||
// ** VARIABLES
|
||||
|
||||
new bool:playerWorking[MAX_PLAYERS char] = false;
|
||||
new playerTaskCheckpoint[MAX_PLAYERS];
|
||||
new playerTaskMapIcon[MAX_PLAYERS];
|
||||
new playerTaskProgress[MAX_PLAYERS];
|
||||
new playerTask[MAX_PLAYERS];
|
||||
new playerTaskDistance[MAX_PLAYERS char];
|
||||
|
||||
new playerPilotTasks[MAX_PLAYERS char]; // DATABASE FOR HIGHEST SCORE
|
||||
|
||||
new taskInfo[][taskEnum] =
|
||||
{
|
||||
{"Weapons", {324.0082, 2501.9749, 17.2114}, {1773.6418, -2492.8054, 14.2744}, {2250, 6000}},
|
||||
{"Weapons", {324.0082, 2501.9749, 17.2114}, {-1452.0604, 40.2788, 14.8709}, {2000, 6000}},
|
||||
{"Passengers", {324.0082, 2501.9749, 17.2114}, {1478.1902, 1653.5984, 11.5396}, {2000, 6000}},
|
||||
{"Drugs", {1478.1902, 1653.5984, 11.5396}, {-1452.0604, 40.2788, 14.8709}, {2000, 6000}},
|
||||
{"Weapons", {1478.1902, 1653.5984, 11.5396}, {1773.6418, -2492.8054, 14.2744}, {2250, 6000}},
|
||||
{"Drinks", {1478.1902, 1653.5984, 11.5396}, {324.0082, 2501.9749, 17.2114}, {1500, 6000}},
|
||||
{"Passengers", {-1452.0604, 40.2788, 14.8709}, {1773.6418, -2492.8054, 14.2744}, {1500, 6000}},
|
||||
{"Passengers", {-1452.0604, 40.2788, 14.8709}, {324.0082, 2501.9749, 17.2114}, {2000, 6000}},
|
||||
{"Passengers", {-1452.0604, 40.2788, 14.8709}, {1478.1902, 1653.5984, 11.5396}, {2250, 6000}},
|
||||
{"Drugs", {1773.6418, -2492.8054, 14.2744}, {324.0082, 2501.9749, 17.2114}, {2000, 6000}},
|
||||
{"Ammo", {1773.6418, -2492.8054, 14.2744}, {-1452.0604, 40.2788, 14.8709}, {2000, 6000}},
|
||||
{"Food", {1773.6418, -2492.8054, 14.2744}, {1478.1902, 1653.5984, 11.5396}, {2250, 6000}}
|
||||
};
|
||||
|
||||
// ** HOOKS
|
||||
|
||||
hook OnPlayerStateChange(playerid, newstate, oldstate)
|
||||
{
|
||||
if (newstate == PLAYER_STATE_DRIVER && IsPlayerInAnyVehicle(playerid))
|
||||
{
|
||||
new vehicleid = GetPlayerVehicleID(playerid);
|
||||
if (GetVehicleModel(vehicleid) == 519 && !playerWorking{playerid})
|
||||
{
|
||||
ShowPlayerHelpDialog(playerid, 3000, "You can begin a pilot job by typing ~g~/work");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hook OnPlayerExitVehicle(playerid, vehicleid)
|
||||
{
|
||||
if (playerWorking{playerid} && playerTask[playerid] > 0)
|
||||
{
|
||||
SendServerMessage(playerid, "Your pilot mission has been stopped.");
|
||||
|
||||
playerTask[playerid] = -1;
|
||||
playerTaskProgress[playerid] = 0;
|
||||
pTaskDistance{playerid} = 0;
|
||||
playerWorking{playerid} = false;
|
||||
|
||||
DestroyDynamicRaceCP(playerTaskCheckpoint[playerid]);
|
||||
DestroyDynamicMapIcon(playerTaskMapIcon[playerid]);
|
||||
}
|
||||
}
|
||||
|
||||
hook OnPlayerUpdate(playerid)
|
||||
{
|
||||
UpdatePilotTask(playerid);
|
||||
}
|
||||
|
||||
hook OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
|
||||
{
|
||||
if (playerWorking{playerid} && playerTask[playerid] > 0)
|
||||
{
|
||||
new index = playerTask[playerid];
|
||||
switch (playerTaskProgress[playerid])
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
|
||||
return SendError(playerid, "You must be the driver of the vehicle to continue this mission.");
|
||||
|
||||
playerTaskProgress[playerid] ++;
|
||||
|
||||
DestroyDynamicRaceCP(playerTaskCheckpoint[playerid]);
|
||||
DestroyDynamicMapIcon(playerTaskMapIcon[playerid]);
|
||||
|
||||
playerTaskCheckpoint[playerid] = CreateDynamicRaceCP(1, taskInfo[index][taskFinish][0], taskInfo[index][taskFinish][2], taskInfo[index][taskFinish][2], 0.0, 0.0, 0.0, 5.0, 0, 0, playerid);
|
||||
playerTaskMapIcon[playerid] = CreateDynamicMapIcon(taskInfo[index][taskFinish][0], taskInfo[index][taskFinish][1], taskInfo[index][taskFinish][2], 5, -1, 0, 0, playerid);
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
|
||||
return SendError(playerid, "You must be the driver of the vehicle to complete this mission.");
|
||||
|
||||
new reward = RandomEx(taskInfo[index][taskReward][0], taskInfo[index][taskReward][1]);
|
||||
|
||||
ShowPlayerHelpDialog(playerid, 5000, "You have earned ~y~$%s ~w~for transporting %s!", taskInfo[index][taskName], number_format(reward));
|
||||
|
||||
GivePlayerMoney(playerid, reward);
|
||||
// GIVE THE XP
|
||||
// GIVE THE SCORE ASWELL (IF YOU WANT)
|
||||
|
||||
playerTask[playerid] = -1;
|
||||
playerTaskProgress[playerid] = 0;
|
||||
pTaskDistance{playerid} = 0;
|
||||
playerWorking{playerid} = false;
|
||||
|
||||
DestroyDynamicRaceCP(playerTaskCheckpoint[playerid]);
|
||||
DestroyDynamicMapIcon(playerTaskMapIcon[playerid]);
|
||||
|
||||
playerPilotTasks{playerid} ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ** COMMANDS
|
||||
|
||||
CMD:work(playerid, params[])
|
||||
{
|
||||
if (playerWorking{playerid})
|
||||
return SendError(playerid, "You are already doing a task.");
|
||||
|
||||
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
|
||||
return SendError(playerid, "You must be the driver of the vehicle to start a task.");
|
||||
|
||||
if (GetVehicleModel(GetPlayerVehicleID(playerid)) != 519)
|
||||
return SendError(playerid, "There are currently no jobs for this particular vehicle.");
|
||||
|
||||
new index = RandomEx(0, sizeof(taskInfo));
|
||||
|
||||
playerTaskProgress[playerid] = 0;
|
||||
pTaskDistance{playerid} = 0;
|
||||
playerTask[playerid] = index;
|
||||
playerWorking{playerid} = true;
|
||||
|
||||
ShowPlayerHelpDialog(playerid, 5000, "A ~g~air blip~w~ has been shown on your radar. Go to where the air blip is pick up the %s.", taskInfo[index][taskName]);
|
||||
|
||||
playerTaskCheckpoint[playerid] = CreateDynamicRaceCP(1, taskInfo[index][taskStart][0], taskInfo[index][taskStart][1], taskInfo[index][taskStart][2], taskInfo[index][taskFinish][0], taskInfo[index][taskFinish][1], taskInfo[index][taskFinish][2], 5.0, 0, 0, playerid, 100.0);
|
||||
playerTaskMapIcon[playerid] = CreateDynamicMapIcon(taskInfo[index][taskStart][0], taskInfo[index][taskStart][1], taskInfo[index][taskStart][2], 5, -1, 0, 0, playerid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ** FUNCTIONS
|
||||
|
||||
ShowAirportLocation(Float:fX, Float:fY, Float:fZ)
|
||||
{
|
||||
enum e_ZoneData
|
||||
{
|
||||
e_ZoneName[32 char],
|
||||
Float:e_ZoneArea[6]
|
||||
};
|
||||
new const g_arrZoneData[][e_ZoneData] =
|
||||
{
|
||||
{!"SF Airport", {-1499.80, -50.00, -0.00, -1242.90, 249.90, 200.00}},
|
||||
{!"SF Airport", {-1794.90, -730.10, -3.00, -1213.90, -50.00, 200.00}},
|
||||
{!"SF Airport", {-1213.90, -730.10, 0.00, -1132.80, -50.00, 200.00}},
|
||||
{!"SF Airport", {-1242.90, -50.00, 0.00, -1213.90, 578.30, 200.00}},
|
||||
{!"SF Airport", {-1213.90, -50.00, -4.50, -947.90, 578.30, 200.00}},
|
||||
{!"SF Airport", {-1315.40, -405.30, 15.40, -1264.40, -209.50, 25.40}},
|
||||
{!"SF Airport", {-1354.30, -287.30, 15.40, -1315.40, -209.50, 25.40}},
|
||||
{!"SF Airport", {-1490.30, -209.50, 15.40, -1264.40, -148.30, 25.40}},
|
||||
{!"LV Airport", {1236.60, 1203.20, -89.00, 1457.30, 1883.10, 110.90}},
|
||||
{!"LV Airport", {1457.30, 1203.20, -89.00, 1777.30, 1883.10, 110.90}},
|
||||
{!"LV Airport", {1457.30, 1143.20, -89.00, 1777.40, 1203.20, 110.90}},
|
||||
{!"LV Airport", {1515.80, 1586.40, -12.50, 1729.90, 1714.50, 87.50}},
|
||||
{!"LS Airport", {1249.60, -2394.30, -89.00, 1852.00, -2179.20, 110.90}},
|
||||
{!"LS Airport", {1852.00, -2394.30, -89.00, 2089.00, -2179.20, 110.90}},
|
||||
{!"LS Airport", {1382.70, -2730.80, -89.00, 2201.80, -2394.30, 110.90}},
|
||||
{!"LS Airport", {1974.60, -2394.30, -39.00, 2089.00, -2256.50, 60.90}},
|
||||
{!"LS Airport", {1400.90, -2669.20, -39.00, 2189.80, -2597.20, 60.90}},
|
||||
{!"LS Airport", {2051.60, -2597.20, -39.00, 2152.40, -2394.30, 60.90}},
|
||||
{!"Verdant Meadows", {37.00, 2337.10, -3.00, 435.90, 2677.90, 200.00}}
|
||||
};
|
||||
new
|
||||
szName[32] = "No-where";
|
||||
|
||||
for (new i = 0; i != sizeof(g_arrZoneData); i ++) if ((fX >= g_arrZoneData[i][e_ZoneArea][0] && fX <= g_arrZoneData[i][e_ZoneArea][3]) && (fY >= g_arrZoneData[i][e_ZoneArea][1] && fY <= g_arrZoneData[i][e_ZoneArea][4]) && (fZ >= g_arrZoneData[i][e_ZoneArea][2] && fZ <= g_arrZoneData[i][e_ZoneArea][5])) {
|
||||
strunpack(szName, g_arrZoneData[i][e_ZoneName]);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return szName;
|
||||
}
|
||||
|
||||
UpdatePilotTask(playerid)
|
||||
{
|
||||
new index = playerTask[playerid];
|
||||
|
||||
switch (playerTaskProgress[playerid])
|
||||
{
|
||||
case 0: pTaskDistance{playerid} = floatround(GetPlayerDistanceFromPoint(playerid, taskInfo[index][taskStart][0], taskInfo[index][taskStart][1], taskInfo[index][taskStart][2]));
|
||||
case 1: pTaskDistance{playerid} = floatround(GetPlayerDistanceFromPoint(playerid, taskInfo[index][taskFinish][0], taskInfo[index][taskFinish][1], taskInfo[index][taskFinish][2]));
|
||||
}
|
||||
|
||||
format(szNormalString, sizeof(szNormalString), "~b~Location:~w~ %s~n~~b~Distance:~w~ %dm", (playerTaskProgress[playerid] == 1 ? (ShowAirportLocation(taskInfo[index][taskFinish][0], taskInfo[index][taskFinish][1], taskInfo[index][taskFinish][2])) : (ShowAirportLocation(taskInfo[index][taskStart][0], taskInfo[index][taskStart][1], taskInfo[index][taskStart][2]))), pTaskDistance{playerid});
|
||||
TextDrawSetString(p_TruckingTD[playerid], szNormalString);
|
||||
|
||||
return 1;
|
||||
}
|
100
gamemodes/irresistible/features/radio.pwn
Normal file
100
gamemodes/irresistible/features/radio.pwn
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: radio.inc
|
||||
* Purpose: radio related feature
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Error Checking ** */
|
||||
#if !defined VIP_REGULAR
|
||||
#error "This module requires a V.I.P system!"
|
||||
#endif
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define IsPlayerUsingRadio(%0) (p_UsingRadio{%0})
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_RADIO_DATA
|
||||
{
|
||||
E_NAME [ 16 ],
|
||||
E_URL [ 60 ]
|
||||
};
|
||||
|
||||
new
|
||||
g_RadioData[ ] [ E_RADIO_DATA ] =
|
||||
{
|
||||
{ "Country", "http://sc3c-sjc.1.fm:7806" },
|
||||
{ "Electronic", "http://useless.streams.enation.fm:8000" },
|
||||
{ "Metal", "http://ice.somafm.com/metal" },
|
||||
{ "Hip Hop", "http://www.stationzilla.com/stationzilla.m3u" },
|
||||
{ "Pop", "http://listen.radionomy.com/airradiofreestyleslow" },
|
||||
{ "Reggae", "http://whatisland.macchiatomedia.org:8118" },
|
||||
{ "Rock", "http://sorradio.org:5005/live" },
|
||||
{ "Jamz 1.FM", "http://sc1c-sjc.1.fm:8052" },
|
||||
{ "XLTRAX FM", "http://xltrax.com:8000" },
|
||||
{ "Groove Salad", "http://ice.somafm.com/groovesalad" },
|
||||
{ ".977 Hits", "http://7609.live.streamtheworld.com:80/977_HITS_SC" }
|
||||
},
|
||||
g_RadioStations [ 190 ] = ""COL_GREY"Custom URL "COL_GOLD"[V.I.P]"COL_WHITE"\n",
|
||||
bool: p_UsingRadio [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// format radio station string
|
||||
for( new i = 0; i < sizeof( g_RadioData ); i++ ) {
|
||||
format( g_RadioStations, sizeof( g_RadioStations ), "%s%s\n", g_RadioStations, g_RadioData[ i ] [ E_NAME ] );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( ( dialogid == DIALOG_RADIO ) && response )
|
||||
{
|
||||
if ( listitem == 0 )
|
||||
{
|
||||
if ( GetPlayerVIPLevel( playerid ) < VIP_REGULAR )
|
||||
return SendError( playerid, "You must be a V.I.P to use this, to become one visit "COL_GREY"donate.irresistiblegaming.com" ), 1;
|
||||
|
||||
ShowPlayerDialog(playerid, DIALOG_RADIO_CUSTOM, DIALOG_STYLE_INPUT, "{FFFFFF}Custom Radio", ""COL_WHITE"Enter the URL below, and streaming will begin.\n\n"COL_ORANGE"Please note, if there isn't a response. It's likely to be an invalid URL.", "Stream", "Back");
|
||||
return 1;
|
||||
}
|
||||
p_UsingRadio{ playerid } = true;
|
||||
StopAudioStreamForPlayer( playerid );
|
||||
PlayAudioStreamForPlayer( playerid, g_RadioData[ listitem - 1 ] [ E_URL ] );
|
||||
SendServerMessage( playerid, "If the radio doesn't respond then it must be offline. Use "COL_GREY"/stopradio"COL_WHITE" to stop the radio." );
|
||||
}
|
||||
else if ( dialogid == DIALOG_RADIO_CUSTOM )
|
||||
{
|
||||
if ( !response ) return cmd_radio( playerid, "" );
|
||||
p_UsingRadio{ playerid } = true;
|
||||
StopAudioStreamForPlayer( playerid );
|
||||
PlayAudioStreamForPlayer( playerid, inputtext );
|
||||
SendServerMessage( playerid, "If the radio doesn't respond then it must be offline. Use "COL_GREY"/stopradio"COL_WHITE" to stop the radio." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason ) {
|
||||
p_UsingRadio{ playerid } = false;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:radio( playerid, params[ ] )
|
||||
{
|
||||
ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "{FFFFFF}Radio Stations - List", g_RadioStations, "Select", "Close");
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:stopradio( playerid, params[ ] )
|
||||
{
|
||||
if ( IsPlayerUsingRadio( playerid ) ) p_UsingRadio{ playerid } = false;
|
||||
StopAudioStreamForPlayer( playerid );
|
||||
return 1;
|
||||
}
|
15
gamemodes/irresistible/features/visage/_visage.pwn
Normal file
15
gamemodes/irresistible/features/visage/_visage.pwn
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: visage/visage.pwn
|
||||
* Purpose: encloses all visage/casino related modules (warning: order of includes is very important)
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include "irresistible\features\visage\roulette.pwn"
|
||||
#include "irresistible\features\visage\blackjack.pwn"
|
||||
#include "irresistible\features\visage\poker.pwn"
|
||||
#include "irresistible\features\visage\fireworks.pwn"
|
||||
#include "irresistible\features\visage\casino.pwn"
|
||||
#include "irresistible\features\visage\apartments.pwn"
|
||||
#include "irresistible\features\visage\boxing.pwn"
|
1776
gamemodes/irresistible/features/visage/apartments.pwn
Normal file
1776
gamemodes/irresistible/features/visage/apartments.pwn
Normal file
File diff suppressed because it is too large
Load Diff
859
gamemodes/irresistible/features/visage/blackjack.pwn
Normal file
859
gamemodes/irresistible/features/visage/blackjack.pwn
Normal file
@ -0,0 +1,859 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: blackjack.inc
|
||||
* Purpose: a sa-mp blackjack minigame implementation
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Error checking ** */
|
||||
#if !defined __irresistible_servervars
|
||||
#error "You need server variables enabled to track betting."
|
||||
#endif
|
||||
|
||||
/*#if !defined _merrandom_included
|
||||
#define MRandom random
|
||||
#endif*/
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_BLACKJACK_TABLES ( 50 ) // 33
|
||||
#define MAX_BLACKJACK_CARDS ( 5 )
|
||||
#define MAX_BLACKJACK_PLAYERS ( 3 )
|
||||
#define BLACKJACK_DEALER_WAIT ( 500 )
|
||||
#define BLACKJACK_PLAYER_WAIT ( 10 )
|
||||
|
||||
#define BLACKJACK_STATE_NONE ( 0 )
|
||||
#define BLACKJACK_STATE_TURN ( 1 )
|
||||
#define BLACKJACK_STATE_BUST ( 2 )
|
||||
#define BLACKJACK_STATE_STAND ( 3 )
|
||||
#define BLACKJACK_STATE_WIN ( 4 )
|
||||
|
||||
/* ** Constants ** */
|
||||
stock const g_cardTextdrawData[ 52 ] [ ] = {
|
||||
"LD_CARD:cd1c", // A Clubs - 0
|
||||
"LD_CARD:cd2c", // 2 Clubs - 1
|
||||
"LD_CARD:cd3c", // 3 Clubs - 2
|
||||
"LD_CARD:cd4c", // 4 Clubs - 3
|
||||
"LD_CARD:cd5c", // 5 Clubs - 4
|
||||
"LD_CARD:cd6c", // 6 Clubs - 5
|
||||
"LD_CARD:cd7c", // 7 Clubs - 6
|
||||
"LD_CARD:cd8c", // 8 Clubs - 7
|
||||
"LD_CARD:cd9c", // 9 Clubs - 8
|
||||
"LD_CARD:cd10c", // 10 Clubs - 9
|
||||
"LD_CARD:cd11c", // J Clubs - 10
|
||||
"LD_CARD:cd12c", // Q Clubs - 11
|
||||
"LD_CARD:cd13c", // K Clubs - 12
|
||||
"LD_CARD:cd1d", // A Diamonds - 13
|
||||
"LD_CARD:cd2d", // 2 Diamonds - 14
|
||||
"LD_CARD:cd3d", // 3 Diamonds - 15
|
||||
"LD_CARD:cd4d", // 4 Diamonds - 16
|
||||
"LD_CARD:cd5d", // 5 Diamonds - 17
|
||||
"LD_CARD:cd6d", // 6 Diamonds - 18
|
||||
"LD_CARD:cd7d", // 7 Diamonds - 19
|
||||
"LD_CARD:cd8d", // 8 Diamonds - 20
|
||||
"LD_CARD:cd9d", // 9 Diamonds - 21
|
||||
"LD_CARD:cd10d", // 10 Diamonds - 22
|
||||
"LD_CARD:cd11d", // J Diamonds - 23
|
||||
"LD_CARD:cd12d", // Q Diamonds - 24
|
||||
"LD_CARD:cd13d", // K Diamonds - 25
|
||||
"LD_CARD:cd1h", // A Heats - 26
|
||||
"LD_CARD:cd2h", // 2 Heats - 27
|
||||
"LD_CARD:cd3h", // 3 Heats - 28
|
||||
"LD_CARD:cd4h", // 4 Heats - 29
|
||||
"LD_CARD:cd5h", // 5 Heats - 30
|
||||
"LD_CARD:cd6h", // 6 Heats - 31
|
||||
"LD_CARD:cd7h", // 7 Heats - 32
|
||||
"LD_CARD:cd8h", // 8 Heats - 33
|
||||
"LD_CARD:cd9h", // 9 Heats - 34
|
||||
"LD_CARD:cd10h", // 10 Heats - 35
|
||||
"LD_CARD:cd11h", // J Heats - 36
|
||||
"LD_CARD:cd12h", // Q Heats - 37
|
||||
"LD_CARD:cd13h", // K Heats - 38
|
||||
"LD_CARD:cd1s", // A Spades - 39
|
||||
"LD_CARD:cd2s", // 2 Spades - 40
|
||||
"LD_CARD:cd3s", // 3 Spades - 41
|
||||
"LD_CARD:cd4s", // 4 Spades - 42
|
||||
"LD_CARD:cd5s", // 5 Spades - 43
|
||||
"LD_CARD:cd6s", // 6 Spades - 44
|
||||
"LD_CARD:cd7s", // 7 Spades - 45
|
||||
"LD_CARD:cd8s", // 8 Spades - 46
|
||||
"LD_CARD:cd9s", // 9 Spades - 47
|
||||
"LD_CARD:cd10s", // 10 Spades - 48
|
||||
"LD_CARD:cd11s", // J Spades - 49
|
||||
"LD_CARD:cd12s", // Q Spades - 50
|
||||
"LD_CARD:cd13s" // K Spades - 51
|
||||
};
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_BLACKJACK_DATA
|
||||
{
|
||||
bool: E_GAME_STARTED, E_CARDS_DRAWN, E_GAME_TIMER,
|
||||
E_PAYOUT, E_WORLD, E_RESET_TIMER,
|
||||
E_DRAW_CARD_TIMER,
|
||||
|
||||
E_OBJECT, E_ACTOR,
|
||||
|
||||
Float: E_X, Float: E_Y, Float: E_Z,
|
||||
Float: E_ROTATION,
|
||||
|
||||
Text3D: E_DEALER_LABEL, Text3D: E_PLAYER_LABEL[ MAX_BLACKJACK_PLAYERS ]
|
||||
};
|
||||
|
||||
new
|
||||
g_blackjackData [ MAX_BLACKJACK_TABLES ] [ E_BLACKJACK_DATA ],
|
||||
Text: g_blackjackTurnTD [ MAX_BLACKJACK_TABLES ] = { Text: INVALID_TEXT_DRAW, ... },
|
||||
Text: g_blackjackPlayerCards [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_CARDS ] [ MAX_BLACKJACK_PLAYERS ],
|
||||
Text: g_blackjackDealerCards [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_CARDS ],
|
||||
g_blackjackDealerCardIndex [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_CARDS ],
|
||||
g_blackjackPlayerCardIndex [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_CARDS ] [ MAX_BLACKJACK_PLAYERS ],
|
||||
g_blackjackPlayerState [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_PLAYERS ],
|
||||
g_blackjackSlotData [ MAX_BLACKJACK_TABLES ] [ MAX_BLACKJACK_PLAYERS ],
|
||||
p_blackjackTable [ MAX_PLAYERS ] = { -1, ... },
|
||||
Iterator: blackjacktables < MAX_BLACKJACK_TABLES >
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// for tracking bets
|
||||
AddServerVariable( "blackjack_bets", "0.0", GLOBAL_VARTYPE_FLOAT );
|
||||
AddServerVariable( "blackjack_wins", "0.0", GLOBAL_VARTYPE_FLOAT );
|
||||
|
||||
// Reset Textdraw Variables
|
||||
for ( new i = 0; i < MAX_BLACKJACK_TABLES; i ++ ) {
|
||||
for ( new x = 0; x < MAX_BLACKJACK_CARDS; x ++ ) {
|
||||
g_blackjackDealerCards[ i ] [ x ] = Text: INVALID_TEXT_DRAW;
|
||||
for ( new p = 0; p < MAX_BLACKJACK_PLAYERS; p ++ ) {
|
||||
g_blackjackPlayerCards[ i ] [ x ] [ p ] = Text: INVALID_TEXT_DRAW;
|
||||
g_blackjackSlotData[ i ] [ p ] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create blackjack tables
|
||||
CreateBlackjackTable( 2500, 2230.37500, 1602.75000, 1006.15631, 0.00000, 82 );
|
||||
CreateBlackjackTable( 5000, 2232.18750, 1604.43750, 1006.15631, 90.0000, 82 );
|
||||
CreateBlackjackTable( 10000, 2228.49219, 1604.45313, 1006.15631, -90.000, 82 );
|
||||
CreateBlackjackTable( 25000, 2230.37500, 1606.27344, 1006.15631, 180.000, 82 );
|
||||
CreateBlackjackTable( 50000, 2241.31250, 1602.75000, 1006.15631, 0.00000, 82 );
|
||||
CreateBlackjackTable( 75000, 2243.12500, 1604.43750, 1006.15631, 90.0000, 82 );
|
||||
CreateBlackjackTable( 100000, 2239.42969, 1604.45313, 1006.15631, -90.000, 82 );
|
||||
CreateBlackjackTable( 125000, 2241.31250, 1606.27344, 1006.15631, 180.000, 82 );
|
||||
|
||||
// 4 dragons
|
||||
CreateBlackjackTable( 25000, 1960.36719, 1015.66412, 992.46881, -90.0000, 23 );
|
||||
CreateBlackjackTable( 50000, 1962.34375, 1015.66412, 992.46881, 90.00000, 23 );
|
||||
CreateBlackjackTable( 100000, 1962.34375, 1020.17969, 992.46881, 90.00000, 23 );
|
||||
CreateBlackjackTable( 250000, 1960.36719, 1020.17188, 992.46881, -90.00000, 23 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
RemovePlayerFromBlackjack( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
#endif
|
||||
{
|
||||
RemovePlayerFromBlackjack( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
{
|
||||
static
|
||||
Float: X, Float: Y, Float: Z;
|
||||
|
||||
if ( IsPlayerInCasino( playerid ) )
|
||||
{
|
||||
new
|
||||
blackjack_table = p_blackjackTable[ playerid ];
|
||||
|
||||
// Blackjack
|
||||
if ( blackjack_table != -1 )
|
||||
{
|
||||
new
|
||||
player_index = GetBlackjackPlayerIndex( blackjack_table, playerid );
|
||||
|
||||
if ( player_index == -1 )
|
||||
return SendError( playerid, "You don't seem to be playing any blackjack table." );
|
||||
|
||||
if ( PRESSED( KEY_SPRINT ) ) {
|
||||
|
||||
if ( ! g_blackjackData[ blackjack_table ] [ E_CARDS_DRAWN ] && g_blackjackData[ blackjack_table ] [ E_GAME_TIMER ] == -1 )
|
||||
return ( g_blackjackData[ blackjack_table ] [ E_GAME_TIMER ] = SetTimerEx( "BeginBlackJackTurn", BLACKJACK_DEALER_WAIT, false, "d", blackjack_table ) ), 1;
|
||||
|
||||
if ( g_blackjackPlayerState[ blackjack_table ] [ player_index ] == BLACKJACK_STATE_TURN ) {
|
||||
g_blackjackPlayerState[ blackjack_table ] [ player_index ] = BLACKJACK_STATE_STAND;
|
||||
SendClientMessageToBlackjack( blackjack_table, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has decided to stand.", ReturnPlayerName( playerid ), playerid );
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( PRESSED( KEY_CTRL_BACK ) )
|
||||
{
|
||||
if ( g_blackjackPlayerState[ blackjack_table ] [ player_index ] != BLACKJACK_STATE_TURN )
|
||||
return SendError( playerid, "It's not your turn to hit. Please wait!" );
|
||||
|
||||
DrawPlayerBlackjackCard( blackjack_table, player_index );
|
||||
CheckForBlackjack( blackjack_table );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( PRESSED( KEY_SECONDARY_ATTACK ) )
|
||||
{
|
||||
if ( p_blackjackTable[ playerid ] != -1 ) {
|
||||
if ( g_blackjackData[ blackjack_table ] [ E_CARDS_DRAWN ] ) return SendError( playerid, "You cannot exit while you are playing your blackjack hand." );
|
||||
return RemovePlayerFromBlackjack( playerid, .reset_cam = 1 );
|
||||
}
|
||||
|
||||
foreach(new id : blackjacktables) if ( GetPlayerVirtualWorld( playerid ) == g_blackjackData[ id ] [ E_WORLD ] )
|
||||
{
|
||||
if ( IsPlayerInRangeOfPoint( playerid, 3.0, g_blackjackData[ id ] [ E_X ], g_blackjackData[ id ] [ E_Y ], g_blackjackData[ id ] [ E_Z ] ) ) {
|
||||
|
||||
new
|
||||
player_index;
|
||||
|
||||
for ( ; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ )
|
||||
if ( g_blackjackSlotData[ id ] [ player_index ] == -1 )
|
||||
break;
|
||||
|
||||
if ( player_index >= MAX_BLACKJACK_PLAYERS || g_blackjackSlotData[ id ] [ player_index ] != -1 )
|
||||
return SendError( playerid, "There are no more vacant slots for this table." );
|
||||
|
||||
if ( GetPlayerCash( playerid ) < g_blackjackData[ id ] [ E_PAYOUT ] )
|
||||
return SendError( playerid, "You don't have any money to wager." );
|
||||
|
||||
new
|
||||
Float: lookatX, Float: lookatY, Float: lookatZ,
|
||||
Float: tmpX, Float: tmpY, Float: tmpZ
|
||||
;
|
||||
|
||||
GetPlayerCameraPos( playerid, X, Y, Z );
|
||||
GetPlayerCameraFrontVector( playerid, lookatX, lookatY, lookatZ );
|
||||
|
||||
tmpX = g_blackjackData[ id ] [ E_X ] - 1.3 * floatcos( g_blackjackData[ id ] [ E_ROTATION ] + 90.0, degrees );
|
||||
tmpY = g_blackjackData[ id ] [ E_Y ] - 1.3 * floatsin( g_blackjackData[ id ] [ E_ROTATION ] + 90.0, degrees );
|
||||
tmpZ = g_blackjackData[ id ] [ E_Z ] + 1.7;
|
||||
|
||||
InterpolateCameraPos( playerid, X, Y, Z, tmpX, tmpY, tmpZ, 1000, CAMERA_MOVE );
|
||||
|
||||
X += floatmul( lookatX, 20.0 );
|
||||
Y += floatmul( lookatY, 20.0 );
|
||||
Z += floatmul( lookatZ, 20.0 );
|
||||
|
||||
InterpolateCameraLookAt( playerid, X, Y, Z, g_blackjackData[ id ] [ E_X ], g_blackjackData[ id ] [ E_Y ], g_blackjackData[ id ] [ E_Z ] - 1.0, 1000, CAMERA_MOVE );
|
||||
|
||||
p_blackjackTable[ playerid ] = id;
|
||||
g_blackjackSlotData[ id ] [ player_index ] = playerid;
|
||||
|
||||
// reset player cards
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ )
|
||||
g_blackjackPlayerCardIndex[ id ] [ c ] [ player_index ] = -1;
|
||||
|
||||
// set player card values
|
||||
SetBlackjackPlayerLabelValue( id, player_index, 0 );
|
||||
|
||||
// show cards to players
|
||||
for ( new player = 0; player < MAX_BLACKJACK_PLAYERS; player ++ )
|
||||
{
|
||||
new
|
||||
gamerid = g_blackjackSlotData[ id ] [ player ];
|
||||
|
||||
// deal only first two cards
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ )
|
||||
{
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackDealerCards[ id ] [ c ] );
|
||||
|
||||
// show two player cards only
|
||||
if ( c >= 2 )
|
||||
continue;
|
||||
|
||||
for ( new p = 0; p < GetBlackjackPlayers( id ); p ++ ) {
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackPlayerCards[ id ] [ c ] [ p ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
szBigString = "~y~~k~~PED_SPRINT~~w~ - Begin game/Stand~n~~y~~k~~GROUP_CONTROL_BWD~~w~ - Hit~n~~y~~k~~VEHICLE_ENTER_EXIT~~w~ - Exit";
|
||||
ShowPlayerHelpDialog( playerid, 0, szBigString );
|
||||
|
||||
SendServerMessage( playerid, "You have entered the %s hand blackjack table.", number_format( g_blackjackData[ id ] [ E_PAYOUT ] ) );
|
||||
ApplyAnimation( playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0, 1 );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook InitializeTextDraws( )
|
||||
{
|
||||
for ( new i = 0; i < MAX_BLACKJACK_TABLES; i ++ ) {
|
||||
initializeBlackjackTextdraws( i );
|
||||
}
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock CreateBlackjackTable( payout, Float: X, Float: Y, Float: Z, Float: Angle, world )
|
||||
{
|
||||
new
|
||||
id = Iter_Free(blackjacktables);
|
||||
|
||||
if ( id != ITER_NONE )
|
||||
{
|
||||
g_blackjackData[ id ] [ E_X ] = X;
|
||||
g_blackjackData[ id ] [ E_Y ] = Y;
|
||||
g_blackjackData[ id ] [ E_Z ] = Z;
|
||||
g_blackjackData[ id ] [ E_ROTATION ] = Angle;
|
||||
g_blackjackData[ id ] [ E_WORLD ] = world;
|
||||
|
||||
g_blackjackData[ id ] [ E_DRAW_CARD_TIMER ] = -1;
|
||||
g_blackjackData[ id ] [ E_RESET_TIMER ] = -1;
|
||||
g_blackjackData[ id ] [ E_GAME_TIMER ] = -1;
|
||||
g_blackjackData[ id ] [ E_PAYOUT ] = payout;
|
||||
g_blackjackData[ id ] [ E_OBJECT ] = CreateDynamicObject( 2188, X, Y, Z, 0.00000, 0.00000, Angle, .worldid = world, .priority = 9999 );
|
||||
g_blackjackData[ id ] [ E_ACTOR ] = CreateDynamicActor( 171, X - 0.4 * floatcos( Angle - 90.0, degrees ), Y - 0.4 * floatsin( Angle - 90.0, degrees ), Z, Angle + 180.0, .worldid = world );
|
||||
g_blackjackData[ id ] [ E_DEALER_LABEL ] = CreateDynamic3DTextLabel( sprintf( "Press ENTER To Play Blackjack\n"COL_WHITE"%s Minimum", number_format( payout ) ), COLOR_GREY, X, Y, Z + 0.25, 15.0, .testlos = 0, .worldid = world );
|
||||
|
||||
g_blackjackData[ id ] [ E_PLAYER_LABEL ] [ 0 ] = CreateDynamic3DTextLabel( "Player 0", 0, X + 0.7 * floatcos( Angle - 90.0, degrees ), Y + 0.7 * floatsin( Angle - 90.0, degrees ), Z + 0.05, 15.0, .testlos = 0, .worldid = world );
|
||||
g_blackjackData[ id ] [ E_PLAYER_LABEL ] [ 1 ] = CreateDynamic3DTextLabel( "Player 1", 0, X + 0.7 * floatcos( Angle - 90.0 - 22.5, degrees ), Y + 0.7 * floatsin( Angle - 90.0 - 22.5, degrees ), Z + 0.05, 15.0, .testlos = 0, .worldid = world );
|
||||
g_blackjackData[ id ] [ E_PLAYER_LABEL ] [ 2 ] = CreateDynamic3DTextLabel( "Player 2", 0, X + 0.7 * floatcos( Angle - 90.0 + 22.5, degrees ), Y + 0.7 * floatsin( Angle - 90.0 + 22.5, degrees ), Z + 0.05, 15.0, .testlos = 0, .worldid = world );
|
||||
|
||||
SetDynamicActorInvulnerable( g_blackjackData[ id ] [ E_ACTOR ], true );
|
||||
SetDynamicActorVirtualWorld( g_blackjackData[ id ] [ E_ACTOR ], world );
|
||||
|
||||
ResetBlackjackTable( id );
|
||||
Iter_Add( blackjacktables, id );
|
||||
}
|
||||
else
|
||||
{
|
||||
static overflow;
|
||||
printf("[BLACKJACK ERROR] Reached limit of %d blackjack tables, increase to %d to fix.", MAX_BLACKJACK_TABLES, MAX_BLACKJACK_TABLES + ( ++ overflow ) );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
function DrawPlayerBlackjackCard( tableid, player_index )
|
||||
{
|
||||
new
|
||||
randomCard = MRandom( sizeof( g_blackjackDealerCards ) );
|
||||
|
||||
for ( new cardid = 0; cardid < MAX_BLACKJACK_CARDS; cardid ++ ) if ( g_blackjackPlayerCardIndex[ tableid ] [ cardid ] [ player_index ] == -1 ) {
|
||||
TextDrawSetString( g_blackjackPlayerCards[ tableid ] [ cardid ] [ player_index ], g_cardTextdrawData[ randomCard ] );
|
||||
foreach (new gamerid : Player) if ( p_blackjackTable[ gamerid ] == tableid ) {
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackPlayerCards[ tableid ] [ cardid ] [ player_index ] );
|
||||
PlayerPlaySound( gamerid, 1145, 0.0, 0.0, 0.0 );
|
||||
}
|
||||
g_blackjackPlayerCardIndex[ tableid ] [ cardid ] [ player_index ] = randomCard;
|
||||
SetBlackjackPlayerLabelValue( tableid, player_index, CalculatePlayerHand( tableid, player_index ) );
|
||||
break;
|
||||
}
|
||||
return randomCard;
|
||||
}
|
||||
|
||||
function BeginBlackJackTurn( tableid )
|
||||
{
|
||||
new
|
||||
cardid = g_blackjackData[ tableid ] [ E_CARDS_DRAWN ] ++;
|
||||
|
||||
if ( cardid >= MAX_BLACKJACK_CARDS ) {
|
||||
ResetBlackjackTable( tableid );
|
||||
return;
|
||||
}
|
||||
|
||||
new
|
||||
randomCard = MRandom( sizeof( g_blackjackDealerCards ) );
|
||||
|
||||
// dealer cards
|
||||
ApplyDynamicActorAnimation( g_blackjackData[ tableid ] [ E_ACTOR ], "CASINO", "dealone", 4.1, 0, 0, 0, 0, 0 );
|
||||
ApplyDynamicActorAnimation( g_blackjackData[ tableid ] [ E_ACTOR ], "CASINO", "dealone", 4.1, 0, 0, 0, 0, 0 );
|
||||
TextDrawSetString( g_blackjackDealerCards[ tableid ] [ cardid ], g_cardTextdrawData[ randomCard ] );
|
||||
g_blackjackDealerCardIndex[ tableid ] [ cardid ] = randomCard;
|
||||
SetBlackjackDealerLabelValue( tableid, CalculateDealerHand( tableid ) );
|
||||
|
||||
// noise
|
||||
foreach (new gamerid : Player) if ( p_blackjackTable[ gamerid ] != -1 ) {
|
||||
PlayerPlaySound( gamerid, 1145, 0.0, 0.0, 0.0 );
|
||||
}
|
||||
|
||||
// deal player first card
|
||||
if ( cardid == 0 )
|
||||
{
|
||||
new blackjack_players = GetBlackjackPlayers( tableid );
|
||||
new bet_amount = 0;
|
||||
|
||||
for ( new player_index = 0; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ ) if ( g_blackjackSlotData[ tableid ] [ player_index ] != -1 )
|
||||
{
|
||||
new
|
||||
gamerid = g_blackjackSlotData[ tableid ] [ player_index ];
|
||||
|
||||
if ( GetPlayerCash( gamerid ) < g_blackjackData[ tableid ] [ E_PAYOUT ] ) {
|
||||
SendError( gamerid, "You don't have any money to wager." );
|
||||
RemovePlayerFromBlackjack( gamerid, .reset_cam = 1 );
|
||||
if ( blackjack_players - 1 <= 0 ) return; // no point having an empty table
|
||||
continue;
|
||||
}
|
||||
|
||||
bet_amount += g_blackjackData[ tableid ] [ E_PAYOUT ];
|
||||
GivePlayerCash( gamerid, -g_blackjackData[ tableid ] [ E_PAYOUT ] );
|
||||
DrawPlayerBlackjackCard( tableid, player_index );
|
||||
if ( cardid < 1 ) { // distribute first two cards to players
|
||||
g_blackjackData[ tableid ] [ E_DRAW_CARD_TIMER ] = SetTimerEx( "DrawPlayerBlackjackCard", BLACKJACK_DEALER_WAIT, false, "dd", tableid, player_index );
|
||||
}
|
||||
}
|
||||
|
||||
UpdateServerVariable( "blackjack_bets", 0, GetGVarFloat( "blackjack_bets" ) + ( float( bet_amount ) / 1000000.0 ), "", GLOBAL_VARTYPE_FLOAT );
|
||||
|
||||
// begin turns
|
||||
new
|
||||
first_player = GetNextAvailableBlackjackPlayer( tableid ),
|
||||
first_player_index = GetBlackjackPlayerIndex( tableid, first_player )
|
||||
;
|
||||
|
||||
if ( first_player_index != -1 )
|
||||
g_blackjackPlayerState[ tableid ] [ first_player_index ] = BLACKJACK_STATE_TURN;
|
||||
|
||||
g_blackjackData[ tableid ] [ E_GAME_TIMER ] = SetTimerEx( "BlackjackPlayerTurn", BLACKJACK_DEALER_WAIT + 500, false, "ddd", tableid, first_player, BLACKJACK_PLAYER_WAIT );
|
||||
}
|
||||
|
||||
// check for blackjack on players & bot
|
||||
new
|
||||
dealer_score = CheckForBlackjack( tableid );
|
||||
|
||||
// pull more cards
|
||||
if ( cardid >= 1 && dealer_score < 17 )
|
||||
g_blackjackData[ tableid ] [ E_GAME_TIMER ] = SetTimerEx( "BeginBlackJackTurn", BLACKJACK_DEALER_WAIT, false, "d", tableid );
|
||||
|
||||
if ( dealer_score >= 17 ) {
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" Table will reset in 5 seconds as all hands have been dealt." );
|
||||
g_blackjackData[ tableid ] [ E_RESET_TIMER ] = SetTimerEx( "ResetBlackjackTable", 5000, false, "d", tableid );
|
||||
}
|
||||
}
|
||||
|
||||
stock GetNextAvailableBlackjackPlayer( tableid, exclude = INVALID_PLAYER_ID )
|
||||
{
|
||||
new
|
||||
playerid = INVALID_PLAYER_ID;
|
||||
|
||||
for ( new player_index = 0; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ ) if ( g_blackjackSlotData[ tableid ] [ player_index ] != -1 && g_blackjackPlayerState[ tableid ] [ player_index ] == BLACKJACK_STATE_NONE && exclude != g_blackjackSlotData[ tableid ] [ player_index ] && g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] != -1 ) {
|
||||
playerid = g_blackjackSlotData[ tableid ] [ player_index ];
|
||||
break;
|
||||
}
|
||||
return playerid;
|
||||
}
|
||||
|
||||
function BlackjackPlayerTurn( tableid, playerid, seconds_left )
|
||||
{
|
||||
new
|
||||
player_index = GetBlackjackPlayerIndex( tableid, playerid );
|
||||
|
||||
if ( IsPlayerConnected( playerid ) && player_index != -1 && seconds_left >= 0 && g_blackjackPlayerState[ tableid ] [ player_index ] == BLACKJACK_STATE_TURN )
|
||||
{
|
||||
foreach (new gamerid : Player) if ( p_blackjackTable[ gamerid ] == tableid ) {
|
||||
TextDrawSetString( g_blackjackTurnTD[ tableid ], sprintf( "%s has %d seconds left", ReturnPlayerName( playerid ), seconds_left ) );
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackTurnTD[ tableid ] );
|
||||
}
|
||||
g_blackjackData[ tableid ] [ E_GAME_TIMER ] = SetTimerEx( "BlackjackPlayerTurn", 960, false, "ddd", tableid, playerid, seconds_left - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
new
|
||||
next_player = GetNextAvailableBlackjackPlayer( tableid, playerid );
|
||||
|
||||
if ( next_player == INVALID_PLAYER_ID )
|
||||
{
|
||||
TextDrawHideForAll( g_blackjackTurnTD[ tableid ] );
|
||||
g_blackjackData[ tableid ] [ E_GAME_TIMER ] = SetTimerEx( "BeginBlackJackTurn", BLACKJACK_DEALER_WAIT, false, "d", tableid );
|
||||
}
|
||||
else
|
||||
{
|
||||
new
|
||||
next_player_index = GetBlackjackPlayerIndex( tableid, next_player );
|
||||
|
||||
// otherwise winning hands will get reissued prizes
|
||||
if ( player_index != -1 && g_blackjackPlayerState[ tableid ] [ player_index ] != BLACKJACK_STATE_WIN && g_blackjackPlayerState[ tableid ] [ player_index ] != BLACKJACK_STATE_BUST )
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_STAND;
|
||||
|
||||
g_blackjackPlayerState[ tableid ] [ next_player_index ] = BLACKJACK_STATE_TURN;
|
||||
g_blackjackData[ tableid ] [ E_GAME_TIMER ] = SetTimerEx( "BlackjackPlayerTurn", 960, false, "ddd", tableid, next_player, BLACKJACK_PLAYER_WAIT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ResetBlackjackTable( tableid )
|
||||
{
|
||||
if ( tableid == -1 )
|
||||
return;
|
||||
|
||||
// variables
|
||||
SetBlackjackDealerLabelValue( tableid, -1 );
|
||||
KillTimer( g_blackjackData[ tableid ] [ E_RESET_TIMER ] ), g_blackjackData[ tableid ] [ E_RESET_TIMER ] = -1;
|
||||
KillTimer( g_blackjackData[ tableid ] [ E_GAME_TIMER ] ), g_blackjackData[ tableid ] [ E_GAME_TIMER ] = -1;
|
||||
KillTimer( g_blackjackData[ tableid ] [ E_DRAW_CARD_TIMER ] ), g_blackjackData[ tableid ] [ E_DRAW_CARD_TIMER ] = -1;
|
||||
g_blackjackData[ tableid ] [ E_CARDS_DRAWN ] = 0;
|
||||
|
||||
// card data
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ ) {
|
||||
g_blackjackDealerCardIndex[ tableid ] [ c ] = -1;
|
||||
TextDrawSetString( g_blackjackDealerCards[ tableid ] [ c ], "ld_card:cdback" );
|
||||
|
||||
for ( new p = 0; p < MAX_BLACKJACK_PLAYERS; p ++ ) {
|
||||
g_blackjackPlayerState[ tableid ] [ p ] = BLACKJACK_STATE_NONE;
|
||||
g_blackjackPlayerCardIndex[ tableid ] [ c ] [ p ] = -1;
|
||||
TextDrawSetString( g_blackjackPlayerCards[ tableid ] [ c ] [ p ], "ld_card:cdback" );
|
||||
if ( c > 1 ) TextDrawHideForAll( g_blackjackPlayerCards[ tableid ] [ c ] [ p ] );
|
||||
}
|
||||
}
|
||||
|
||||
// reshow textdraws to players
|
||||
for ( new player_index = 0; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ )
|
||||
{
|
||||
if ( g_blackjackSlotData[ tableid ] [ player_index ] != -1 )
|
||||
{
|
||||
new
|
||||
gamerid = g_blackjackSlotData[ tableid ] [ player_index ];
|
||||
|
||||
// reset label
|
||||
SetBlackjackPlayerLabelValue( tableid, player_index, 0 );
|
||||
|
||||
// deal only first two cards
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ )
|
||||
{
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackDealerCards[ tableid ] [ c ] );
|
||||
|
||||
// show two player cards only
|
||||
if ( c >= 2 )
|
||||
continue;
|
||||
|
||||
for ( new p = 0; p < GetBlackjackPlayers( tableid ); p ++ ) {
|
||||
TextDrawShowForPlayer( gamerid, g_blackjackPlayerCards[ tableid ] [ c ] [ p ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else SetBlackjackPlayerLabelValue( tableid, player_index, -1 );
|
||||
}
|
||||
}
|
||||
|
||||
stock CheckForBlackjack( tableid )
|
||||
{
|
||||
new
|
||||
dealer_score = CalculateDealerHand( tableid );
|
||||
|
||||
//if ( g_blackjackData[ tableid ] [ E_CARDS_DRAWN ] <= 1 )
|
||||
// return dealer_score;
|
||||
|
||||
//printf("The Dealer score is %d", dealer_score );
|
||||
SetBlackjackDealerLabelValue( tableid, dealer_score );
|
||||
|
||||
// calculate player score
|
||||
for ( new player_index = 0; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ ) if ( g_blackjackSlotData[ tableid ] [ player_index ] != -1 && g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] != -1 )
|
||||
{
|
||||
new playerid = g_blackjackSlotData[ tableid ] [ player_index ];
|
||||
new player_score = CalculatePlayerHand( tableid, player_index );
|
||||
|
||||
SetBlackjackPlayerLabelValue( tableid, player_index, player_score );
|
||||
|
||||
if ( g_blackjackPlayerState[ tableid ] [ player_index ] != BLACKJACK_STATE_BUST && g_blackjackPlayerState[ tableid ] [ player_index ] != BLACKJACK_STATE_WIN )
|
||||
{
|
||||
new
|
||||
payout = floatround( float( g_blackjackData[ tableid ] [ E_PAYOUT ] ) * 2.0 );
|
||||
|
||||
// check for win
|
||||
if ( dealer_score == player_score && dealer_score >= 17 ) {
|
||||
payout = g_blackjackData[ tableid ] [ E_PAYOUT ];
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has been returned %s due to a push.", ReturnPlayerName( playerid ), playerid, number_format( payout ) );
|
||||
GameTextForPlayer( playerid, sprintf( "~n~~n~~y~%s returned!", number_format( payout ) ), 4000, 3 );
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
GivePlayerCash( playerid, payout );
|
||||
}
|
||||
else if ( player_score == 21 ) {
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
|
||||
if ( IsPlayerHandBlackjack( tableid, player_index, player_score ) ) {
|
||||
payout = floatround( float( g_blackjackData[ tableid ] [ E_PAYOUT ] ) * 2.5 );
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" Blackjack! %s(%d) has won %s!", ReturnPlayerName( playerid ), playerid, number_format( payout ) );
|
||||
} else {
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a card count of 21!", ReturnPlayerName( playerid ), playerid, number_format( payout ) );
|
||||
}
|
||||
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", number_format( payout ) ), 4000, 3 );
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
GivePlayerCash( playerid, payout );
|
||||
}
|
||||
else if ( dealer_score == 21 ) {
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a dealer %s.", ReturnPlayerName( playerid ), playerid, number_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ), IsDealerHandBlackjack( tableid, dealer_score ) ? ( "blackjack" ) : ( "21" ) );
|
||||
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
|
||||
}
|
||||
else if ( player_score > 21 ) {
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, number_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
|
||||
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
|
||||
}
|
||||
else if ( dealer_score > 21 ) {
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, number_format( payout ) );
|
||||
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", number_format( payout ) ), 4000, 3 );
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
GivePlayerCash( playerid, payout );
|
||||
}
|
||||
else if ( player_score < dealer_score && dealer_score >= 17 ) {
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, number_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
|
||||
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
|
||||
}
|
||||
else if ( player_score > dealer_score && dealer_score >= 17 ) {
|
||||
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
|
||||
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, number_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
|
||||
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", number_format( payout ) ), 4000, 3 );
|
||||
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
|
||||
GivePlayerCash( playerid, payout );
|
||||
}
|
||||
|
||||
// alert world
|
||||
if ( g_blackjackPlayerState[ tableid ] [ player_index ] == BLACKJACK_STATE_WIN && payout > g_blackjackData[ tableid ] [ E_PAYOUT ] && payout >= 10000 ) {
|
||||
UpdateServerVariable( "blackjack_wins", 0, GetGVarFloat( "blackjack_wins" ) + ( float( payout ) / 1000000.0 ), "", GLOBAL_VARTYPE_FLOAT );
|
||||
SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from blackjack!", ReturnPlayerName( playerid ), playerid, number_format( payout ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return dealer_score;
|
||||
}
|
||||
|
||||
stock RemovePlayerFromBlackjack( playerid, reset_cam = 0 )
|
||||
{
|
||||
if ( ! ( 0 <= playerid < MAX_PLAYERS ) )
|
||||
return 0;
|
||||
|
||||
new
|
||||
blackjack_table = p_blackjackTable[ playerid ];
|
||||
|
||||
if ( blackjack_table == -1 )
|
||||
return 0;
|
||||
|
||||
// hide textdraws & reset
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ ) {
|
||||
TextDrawHideForPlayer( playerid, g_blackjackDealerCards[ blackjack_table ] [ c ] );
|
||||
|
||||
for ( new p = 0; p < MAX_BLACKJACK_PLAYERS; p ++ ) {
|
||||
TextDrawHideForPlayer( playerid, g_blackjackPlayerCards[ blackjack_table ] [ c ] [ p ] );
|
||||
}
|
||||
}
|
||||
TextDrawHideForPlayer( playerid, g_blackjackTurnTD[ blackjack_table ] );
|
||||
|
||||
// check if it is a player
|
||||
new
|
||||
player_index = GetBlackjackPlayerIndex( blackjack_table, playerid );
|
||||
|
||||
if ( player_index != -1 )
|
||||
{
|
||||
foreach (new i : Player) if ( p_blackjackTable[ i ] == blackjack_table ) {
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ ) {
|
||||
g_blackjackPlayerCardIndex[ blackjack_table ] [ c ] [ player_index ] = -1;
|
||||
g_blackjackPlayerState[ blackjack_table ] [ player_index ] = BLACKJACK_STATE_NONE;
|
||||
TextDrawSetString( g_blackjackPlayerCards[ blackjack_table ] [ c ] [ player_index ], "ld_card:cdback" );
|
||||
TextDrawHideForPlayer( i, g_blackjackPlayerCards[ blackjack_table ] [ c ] [ player_index ] );
|
||||
}
|
||||
}
|
||||
g_blackjackSlotData[ blackjack_table ] [ player_index ] = -1;
|
||||
SetBlackjackPlayerLabelValue( blackjack_table, player_index, -1 );
|
||||
}
|
||||
|
||||
// reset camera?
|
||||
if ( reset_cam ) {
|
||||
TogglePlayerControllable( playerid, 1 );
|
||||
ClearAnimations( playerid );
|
||||
SetCameraBehindPlayer( playerid );
|
||||
HidePlayerHelpDialog( playerid );
|
||||
}
|
||||
|
||||
// reset variables
|
||||
p_blackjackTable[ playerid ] = -1;
|
||||
|
||||
// reset table just incase empty
|
||||
if ( GetBlackjackPlayers( blackjack_table ) <= 0 )
|
||||
ResetBlackjackTable( blackjack_table );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock SendClientMessageToBlackjack( tableid, colour, format[ ], va_args<> )
|
||||
{
|
||||
static
|
||||
out[ 144 ];
|
||||
|
||||
va_format( out, sizeof( out ), format, va_start<3> );
|
||||
|
||||
for(new i = 0; i < 10; i++) if ( p_blackjackTable[ i ] == tableid ) {
|
||||
SendClientMessage( i, colour, out );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock initializeBlackjackTextdraws( id )
|
||||
{
|
||||
g_blackjackTurnTD[ id ] = TextDrawCreate(330.000000, 204.000000, "Lorenc has 5 seconds");
|
||||
TextDrawAlignment(g_blackjackTurnTD[ id ], 2);
|
||||
TextDrawBackgroundColor(g_blackjackTurnTD[ id ], 255);
|
||||
TextDrawFont(g_blackjackTurnTD[ id ], 1);
|
||||
TextDrawLetterSize(g_blackjackTurnTD[ id ], 0.260000, 1.200000);
|
||||
TextDrawColor(g_blackjackTurnTD[ id ], 16711935);
|
||||
TextDrawSetOutline(g_blackjackTurnTD[ id ], 1);
|
||||
TextDrawSetProportional(g_blackjackTurnTD[ id ], 1);
|
||||
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ )
|
||||
{
|
||||
g_blackjackDealerCards[ id ] [ c ] = TextDrawCreate(243.000000 + 35.0 * float( c ), 138.000000, "ld_card:cdback");
|
||||
TextDrawBackgroundColor( g_blackjackDealerCards[ id ] [ c ], 255);
|
||||
TextDrawFont( g_blackjackDealerCards[ id ] [ c ], 4);
|
||||
TextDrawLetterSize( g_blackjackDealerCards[ id ] [ c ], 0.500000, 1.000000);
|
||||
TextDrawUseBox( g_blackjackDealerCards[ id ] [ c ], 1);
|
||||
TextDrawBoxColor( g_blackjackDealerCards[ id ] [ c ], 255);
|
||||
TextDrawTextSize( g_blackjackDealerCards[ id ] [ c ], 30.000000, 51.000000);
|
||||
}
|
||||
|
||||
new
|
||||
Float: g_blackjackPlayerPosition[ MAX_BLACKJACK_PLAYERS ] [ 2 ] = { { 295.0, 334.0 }, { 205.0, 319.0 }, { 390.0, 329.0 } };
|
||||
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ )
|
||||
{
|
||||
for ( new p = 0; p < MAX_BLACKJACK_PLAYERS; p ++ )
|
||||
{
|
||||
g_blackjackPlayerCards[ id ] [ c ] [ p ] = TextDrawCreate( g_blackjackPlayerPosition[ p ] [ 0 ] + 10.0 * float( c ), g_blackjackPlayerPosition[ p ] [ 1 ] - 16.0 * float( c ), "ld_card:cdback" );
|
||||
TextDrawBackgroundColor( g_blackjackPlayerCards[ id ] [ c ] [ p ], 255 );
|
||||
TextDrawFont( g_blackjackPlayerCards[ id ] [ c ] [ p ], 4 );
|
||||
TextDrawLetterSize( g_blackjackPlayerCards[ id ] [ c ] [ p ], 0.5, 0.7 );
|
||||
TextDrawUseBox( g_blackjackPlayerCards[ id ] [ c ] [ p ], 1 );
|
||||
TextDrawBoxColor( g_blackjackPlayerCards[ id ] [ c ] [ p ], 255 );
|
||||
TextDrawTextSize( g_blackjackPlayerCards[ id ] [ c ] [ p ], 22.000000, 37.000000 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock IsPlayerHandBlackjack( tableid, player_index, card_count )
|
||||
{
|
||||
if ( card_count == 21 && ( g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] == 0 || g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] == 13 || g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] == 26 || g_blackjackPlayerCardIndex[ tableid ] [ 0 ] [ player_index ] == 39 ) )
|
||||
return true;
|
||||
|
||||
if ( card_count == 21 && ( g_blackjackPlayerCardIndex[ tableid ] [ 1 ] [ player_index ] == 0 || g_blackjackPlayerCardIndex[ tableid ] [ 1 ] [ player_index ] == 13 || g_blackjackPlayerCardIndex[ tableid ] [ 1 ] [ player_index ] == 26 || g_blackjackPlayerCardIndex[ tableid ] [ 1 ] [ player_index ] == 39 ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
stock IsDealerHandBlackjack( tableid, card_count )
|
||||
{
|
||||
if ( card_count == 21 && ( g_blackjackDealerCardIndex[ tableid ] [ 0 ] == 0 || g_blackjackDealerCardIndex[ tableid ] [ 0 ] == 13 || g_blackjackDealerCardIndex[ tableid ] [ 0 ] == 26 || g_blackjackDealerCardIndex[ tableid ] [ 0 ] == 39 ) )
|
||||
return true;
|
||||
|
||||
if ( card_count == 21 && ( g_blackjackDealerCardIndex[ tableid ] [ 1 ] == 0 || g_blackjackDealerCardIndex[ tableid ] [ 1 ] == 13 || g_blackjackDealerCardIndex[ tableid ] [ 1 ] == 26 || g_blackjackDealerCardIndex[ tableid ] [ 1 ] == 39 ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
stock GetBlackjackCardValue( card_index )
|
||||
{
|
||||
new
|
||||
card_value = 0;
|
||||
|
||||
switch ( card_index )
|
||||
{
|
||||
case 0, 13, 26, 39: card_value = 1;
|
||||
case 1, 14, 27, 40: card_value = 2;
|
||||
case 2, 15, 28, 41: card_value = 3;
|
||||
case 3, 16, 29, 42: card_value = 4;
|
||||
case 4, 17, 30, 43: card_value = 5;
|
||||
case 5, 18, 31, 44: card_value = 6;
|
||||
case 6, 19, 32, 45: card_value = 7;
|
||||
case 7, 20, 33, 46: card_value = 8;
|
||||
case 8, 21, 34, 47: card_value = 9;
|
||||
case 9, 22, 35, 48, 10, 23, 36, 49, 11, 24, 37, 50, 12, 25, 38, 51: card_value = 10;
|
||||
}
|
||||
return card_value;
|
||||
}
|
||||
|
||||
stock GetBlackjackPlayerIndex( tableid, playerid )
|
||||
{
|
||||
for ( new player_index = 0; player_index < MAX_BLACKJACK_PLAYERS; player_index ++ ) if ( playerid == g_blackjackSlotData[ tableid ] [ player_index ] ) {
|
||||
return player_index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
stock GetBlackjackPlayers( tableid ) {
|
||||
new
|
||||
count = 0;
|
||||
|
||||
for ( new p = 0; p < MAX_BLACKJACK_PLAYERS; p ++ ) if ( g_blackjackSlotData[ tableid ] [ p ] != -1 )
|
||||
count ++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
stock SetBlackjackPlayerLabelValue( tableid, player_index, score ) {
|
||||
if ( score != -1 ) {
|
||||
new playerid = g_blackjackSlotData[ tableid ] [ player_index ];
|
||||
UpdateDynamic3DTextLabelText( g_blackjackData[ tableid ] [ E_PLAYER_LABEL ] [ player_index ], COLOR_GOLD, sprintf( "%s\n"COL_GREY"Score:"COL_WHITE" %d", ReturnPlayerName( playerid ), score ) );
|
||||
} else {
|
||||
UpdateDynamic3DTextLabelText( g_blackjackData[ tableid ] [ E_PLAYER_LABEL ] [ player_index ], 0, sprintf( "Player %d", player_index ) );
|
||||
}
|
||||
}
|
||||
|
||||
stock SetBlackjackDealerLabelValue( tableid, score ) {
|
||||
if ( score != -1 ) {
|
||||
UpdateDynamic3DTextLabelText( g_blackjackData[ tableid ] [ E_DEALER_LABEL ], COLOR_GREY, sprintf( "Dealer\nScore:"COL_WHITE" %d", score ) );
|
||||
} else {
|
||||
UpdateDynamic3DTextLabelText( g_blackjackData[ tableid ] [ E_DEALER_LABEL ], COLOR_WHITE, sprintf( "Press ENTER To Play Blackjack\n"COL_WHITE"%s Minimum", number_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
stock CalculatePlayerHand( tableid, player_index )
|
||||
{
|
||||
new
|
||||
player_score = 0;
|
||||
|
||||
// add player cards
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ ) if ( g_blackjackPlayerCardIndex[ tableid ] [ c ] [ player_index ] != -1 ) {
|
||||
player_score += GetBlackjackCardValue( g_blackjackPlayerCardIndex[ tableid ] [ c ] [ player_index ] ); // aces will add as 1 anyway
|
||||
}
|
||||
|
||||
// double check aces
|
||||
for ( new a = 0; a < MAX_BLACKJACK_CARDS; a ++ ) if ( GetBlackjackCardValue( g_blackjackPlayerCardIndex[ tableid ] [ a ] [ player_index ] ) == 1 ) {
|
||||
if ( player_score + 10 <= 21 ) player_score += 10; // if there's aces, just use one as an 11. if count stays under 21 of course
|
||||
break;
|
||||
}
|
||||
return player_score;
|
||||
}
|
||||
|
||||
stock CalculateDealerHand( tableid )
|
||||
{
|
||||
new
|
||||
dealer_score = 0;
|
||||
|
||||
// add dealer score
|
||||
for ( new c = 0; c < MAX_BLACKJACK_CARDS; c ++ ) if ( g_blackjackDealerCardIndex[ tableid ] [ c ] != -1 ) {
|
||||
dealer_score += GetBlackjackCardValue( g_blackjackDealerCardIndex[ tableid ] [ c ] ); // aces will add as 1 anyway
|
||||
}
|
||||
|
||||
// double check aces
|
||||
for ( new a = 0; a < MAX_BLACKJACK_CARDS; a ++ ) if ( GetBlackjackCardValue( g_blackjackDealerCardIndex[ tableid ] [ a ] ) == 1 ) {
|
||||
// if there's aces, just use one as an 11. if count stays under 21 of course
|
||||
if ( dealer_score + 10 <= 21 ) dealer_score += 10;
|
||||
break;
|
||||
}
|
||||
return dealer_score;
|
||||
}
|
504
gamemodes/irresistible/features/visage/boxing.pwn
Normal file
504
gamemodes/irresistible/features/visage/boxing.pwn
Normal file
@ -0,0 +1,504 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Damen, Lorenc
|
||||
* Module: Boxing
|
||||
* Purpose: Boxing for Visage
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define IsPlayerBoxing(%0) (g_boxingPlayerData[ %0 ] [ E_FIGHTING ])
|
||||
#define SendBoxing(%0,%1) (SendClientMessageFormatted( %0, -1, "{B74AFF}[BOXING] {FFFFFF}" # %1))
|
||||
#define SendBoxingGlobal(%0) (SendClientMessageFormatted( INVALID_PLAYER_ID, -1, "{B74AFF}[BOXING] {FFFFFF}" # %0))
|
||||
#define IsPlayerNearBoxingArena(%0) (GetPlayerDistanceFromPoint( %0, 2654.885986, 1613.157958, 1506.269042 ) < 25.0)
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_BOXER_DATA {
|
||||
bool: E_FIGHTING,
|
||||
E_OPPONENT,
|
||||
bool: E_INVITED,
|
||||
E_INVITE_TIMESTAMP,
|
||||
E_ROUNDS_SET,
|
||||
E_BET_AMOUNT_SET,
|
||||
bool: E_IS_HOST,
|
||||
E_SCORE,
|
||||
Float: E_PRIOR_HEALTH,
|
||||
Float: E_PRIOR_ARMOUR,
|
||||
E_PRIOR_WEP[ 12 ],
|
||||
E_PRIOR_WEP_AMMO[ 12 ],
|
||||
E_PRIOR_SKIN
|
||||
};
|
||||
|
||||
enum E_ARENA_DATA {
|
||||
bool: E_OCCUPIED,
|
||||
E_CD_TIMER,
|
||||
E_CURRENT_ROUNDS,
|
||||
E_ROUNDS,
|
||||
E_BET
|
||||
};
|
||||
|
||||
new g_boxingPlayerData [ MAX_PLAYERS ] [ E_BOXER_DATA ];
|
||||
new g_boxingArenaData [ E_ARENA_DATA ];
|
||||
new Text3D: arenaLabel = Text3D: INVALID_3DTEXT_ID;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( ) {
|
||||
print( "-> Boxing System - By: Damen" );
|
||||
arenaLabel = CreateDynamic3DTextLabel( "Boxing Arena\n{FFFFFF}/boxing fight", COLOR_GREY, 2655.3022, 1613.6146, 1507.0977, 15.0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid ) {
|
||||
g_boxingPlayerData[ playerid ] [ E_FIGHTING ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_OPPONENT ] = -1;
|
||||
g_boxingPlayerData[ playerid ] [ E_INVITED ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] = 1;
|
||||
g_boxingPlayerData[ playerid ] [ E_BET_AMOUNT_SET ] = 0;
|
||||
g_boxingPlayerData[ playerid ] [ E_IS_HOST ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_SCORE ] = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason ) {
|
||||
boxing_ForfeitMatch( playerid, g_boxingPlayerData[ playerid ] [ E_OPPONENT ] );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
#endif
|
||||
{
|
||||
boxing_ForfeitMatch( playerid, g_boxingPlayerData[ playerid ] [ E_OPPONENT ] );
|
||||
// printf("BOXING MATCH DEATH BY %s -> RETURN %d", ReturnPlayerName(playerid), );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:boxing( playerid, params[ ] ) {
|
||||
|
||||
if ( !IsPlayerNearBoxingArena( playerid ) )
|
||||
return SendError( playerid, "You must be within 25 meters of the arena to use this command." );
|
||||
|
||||
if ( g_boxingArenaData[ E_OCCUPIED ] == true )
|
||||
return SendError( playerid, "The arena is currently occupied. Please wait for the arena to clear." );
|
||||
|
||||
if ( GetPlayerWantedLevel( playerid ) )
|
||||
return SendError( playerid, "You cannot box while you are currently wanted." );
|
||||
|
||||
if ( !strcmp( params, "fight", true, 5 ) ) {
|
||||
|
||||
new targetID, betAmount, rounds;
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_FIGHTING ] == true )
|
||||
return SendError( playerid, "You are currently fighting an opponent. Please finish your fight." );
|
||||
|
||||
if ( sscanf( params[ 6 ], "uD(0)D(3)", targetID, betAmount, rounds ) )
|
||||
return SendUsage( playerid, "/boxing fight [PLAYER_ID] [BET_AMOUNT (0)] [ROUNDS (3)]" );
|
||||
|
||||
if ( ! IsPlayerConnected( targetID ) )
|
||||
return SendError( playerid, "Player is not connected." );
|
||||
|
||||
if ( targetID == playerid )
|
||||
return SendError( playerid, "You cannot invite yourself to a boxing match." );
|
||||
|
||||
if ( !IsPlayerNearBoxingArena( targetID ) )
|
||||
return SendError( playerid, "The player you have invited to a boxing match is not near the boxing arena." );
|
||||
|
||||
if ( GetPlayerCash( targetID ) < betAmount )
|
||||
return SendError( playerid, "The player you invited does not have enough money to wager that amount." );
|
||||
|
||||
if ( ! ( 0 <= betAmount <= 10000000 ) )
|
||||
return SendError( playerid, "Please specify an amount between $0 and $10,000,000." );
|
||||
|
||||
if ( rounds != 1 && rounds != 3 && rounds != 5 && rounds != 9 )
|
||||
return SendError( playerid, "Please choose between 1, 3, 5, or 9 rounds." );
|
||||
|
||||
if ( g_boxingPlayerData[ targetID ] [ E_INVITED ] == true )
|
||||
return SendError( playerid, "That player has already been invited to a fight." );
|
||||
|
||||
if ( g_boxingPlayerData[ targetID ] [ E_FIGHTING ] == true )
|
||||
return SendError( playerid, "That player is currently fighting another opponent. Please wait until after their match to reinvite them." );
|
||||
|
||||
if ( GetPlayerWantedLevel( targetID ) )
|
||||
return SendError( playerid, "You cannot box a wanted player." );
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_INVITED ] == true ) {
|
||||
SendBoxing( playerid, "You have cancelled your invite to %s.", ReturnPlayerName( g_boxingPlayerData[ playerid ] [ E_OPPONENT ] ) );
|
||||
SendBoxing( g_boxingPlayerData[ playerid ] [ E_OPPONENT ], "%s has cancelled the match invite.", ReturnPlayerName( playerid ) );
|
||||
ResetBoxingPlayerVariables( playerid, g_boxingPlayerData[ playerid ] [ E_OPPONENT ] );
|
||||
}
|
||||
|
||||
g_boxingPlayerData[ playerid ] [ E_INVITED ] = true;
|
||||
g_boxingPlayerData[ playerid ] [ E_OPPONENT ] = targetID;
|
||||
g_boxingPlayerData[ playerid ] [ E_IS_HOST ] = true;
|
||||
g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] = rounds;
|
||||
g_boxingPlayerData[ playerid ] [ E_BET_AMOUNT_SET ] = betAmount;
|
||||
g_boxingPlayerData[ targetID ] [ E_INVITED ] = true;
|
||||
g_boxingPlayerData[ targetID ] [ E_OPPONENT ] = playerid;
|
||||
g_boxingPlayerData[ targetID ] [ E_INVITE_TIMESTAMP ] = GetServerTime( ) + 30000;
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_BET_AMOUNT_SET ] == 0 ) {
|
||||
|
||||
SendBoxing( playerid, "You have invited %s to a boxing match with no wager through %i round(s).", ReturnPlayerName( targetID ), g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] );
|
||||
SendBoxing( playerid, "To cancel your invite, use /boxing [CANCEL]." );
|
||||
|
||||
SendBoxing( targetID, "%s has invited you to a boxing match with no wager through %i round(s).", ReturnPlayerName( playerid ), g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] );
|
||||
SendBoxing( targetID, "To accept or decline the invite, use /boxing [ACCEPT/DECLINE]." );
|
||||
|
||||
} else {
|
||||
|
||||
SendBoxing( playerid, "You have invited %s to a boxing match with a %s wager through %i round(s).", ReturnPlayerName( targetID ), number_format( g_boxingPlayerData[ playerid ] [ E_BET_AMOUNT_SET ] ), g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] );
|
||||
SendBoxing( playerid, "To cancel your invite, use /boxing [CANCEL]." );
|
||||
|
||||
SendBoxing( targetID, "%s has invited you to a boxing match with a %s wager through %i round(s).", ReturnPlayerName( playerid ), number_format( g_boxingPlayerData[ playerid ] [ E_BET_AMOUNT_SET ] ), g_boxingPlayerData[ playerid ] [ E_ROUNDS_SET ] );
|
||||
SendBoxing( targetID, "To accept or decline the invite, use /boxing [ACCEPT/DECLINE]." );
|
||||
|
||||
}
|
||||
return 1;
|
||||
|
||||
} else if ( !strcmp( params, "cancel", true, 6 ) ) {
|
||||
|
||||
new opponent = g_boxingPlayerData[ playerid ] [ E_OPPONENT ];
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_FIGHTING ] == true )
|
||||
return SendError( playerid, "You're currently in a boxing match. Use /boxing [FORFEIT] if you would like to forfeit the match." );
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_IS_HOST ] == false )
|
||||
return SendError( playerid, "You have no boxing match invites to cancel." );
|
||||
|
||||
SendBoxing( opponent, "%s has cancelled the boxing match invitation.", ReturnPlayerName( playerid ) );
|
||||
SendBoxing( playerid, "You have cancelled the boxing match invitation sent to %s.", ReturnPlayerName( opponent ) );
|
||||
ResetBoxingPlayerVariables( playerid, opponent );
|
||||
return 1;
|
||||
|
||||
} else if ( !strcmp( params, "accept", true, 6 ) ) {
|
||||
|
||||
new opponent = g_boxingPlayerData[ playerid ] [ E_OPPONENT ];
|
||||
|
||||
if ( GetServerTime( ) > g_boxingPlayerData[ playerid ] [ E_INVITE_TIMESTAMP ] && g_boxingPlayerData[ playerid ] [ E_INVITED ] ) {
|
||||
SendServerMessage( opponent, "%s has attempted to accept your boxing invite after it has expired.", ReturnPlayerName( playerid ) );
|
||||
ResetBoxingPlayerVariables( playerid, opponent );
|
||||
return SendError( playerid, "This invitation has expired." );
|
||||
}
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_INVITED ] == false )
|
||||
return SendError( playerid, "You do not have any boxing match invitations to accept." );
|
||||
|
||||
if ( opponent == -1 )
|
||||
return SendError( playerid, "Your opponent is no longer available to fight." );
|
||||
|
||||
if ( !IsPlayerNearBoxingArena( opponent ) ) {
|
||||
|
||||
SendError( playerid, "%s is no longer near the arena. Your invitation has been cancelled.", ReturnPlayerName( opponent ) );
|
||||
SendBoxing( opponent, "%s has attempted to accept your invite while you were not near the arena.", ReturnPlayerName( playerid ) );
|
||||
return ResetBoxingPlayerVariables( playerid, opponent );
|
||||
|
||||
}
|
||||
|
||||
if ( GetPlayerCash( playerid ) < g_boxingPlayerData[ opponent ] [ E_BET_AMOUNT_SET ] ) {
|
||||
|
||||
SendError( playerid, "You do not have enough money to participate in the match with the bet amount set." );
|
||||
SendError( opponent, "%s does not have enough money to participate in the match with the bet amount set.", ReturnPlayerName( playerid ) );
|
||||
return ResetBoxingPlayerVariables( playerid, opponent );
|
||||
|
||||
} else if ( GetPlayerCash( opponent ) < g_boxingPlayerData[ opponent ] [ E_BET_AMOUNT_SET ] ) {
|
||||
|
||||
SendError( opponent, "You do not have enough money to participate in the match with the bet amount set." );
|
||||
SendError( playerid, "%s does not have enough money to participate in the match with the bet amount set.", ReturnPlayerName( opponent ) );
|
||||
return ResetBoxingPlayerVariables( playerid, opponent );
|
||||
|
||||
}
|
||||
|
||||
g_boxingArenaData[ E_OCCUPIED ] = true;
|
||||
|
||||
g_boxingPlayerData[ playerid ] [ E_FIGHTING ] = true;
|
||||
g_boxingPlayerData[ playerid ] [ E_INVITED ] = false;
|
||||
|
||||
g_boxingPlayerData[ opponent ] [ E_FIGHTING ] = true;
|
||||
g_boxingPlayerData[ opponent ] [ E_INVITED ] = false;
|
||||
g_boxingPlayerData[ opponent ] [ E_IS_HOST ] = true;
|
||||
|
||||
return StartMatch( playerid, opponent );
|
||||
|
||||
} else if ( !strcmp( params, "decline", true, 7 ) ) {
|
||||
|
||||
new opponent = g_boxingPlayerData[ playerid ] [ E_OPPONENT ];
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_INVITED ] == false )
|
||||
return SendError( playerid, "You do not have any boxing match invitations to decline." );
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_OPPONENT ] == -1 )
|
||||
return SendError( playerid, "Your opponent is no longer available to fight." );
|
||||
|
||||
SendBoxing( opponent, "%s has declined your invitation.", ReturnPlayerName( playerid ) );
|
||||
|
||||
SendBoxing( playerid, "You have declined %s's invitation.", ReturnPlayerName( opponent ) );
|
||||
|
||||
return ResetBoxingPlayerVariables( playerid, opponent );
|
||||
|
||||
} else if ( !strcmp( params, "forfeit", true, 7 ) ) {
|
||||
if ( ! boxing_ForfeitMatch( playerid, g_boxingPlayerData[ playerid ] [ E_OPPONENT ] ) ) {
|
||||
return SendError( playerid, "You're not fighting anyone." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return SendUsage( playerid, "/boxing [FIGHT/CANCEL/ACCEPT/DECLINE/FORFEIT]" );
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock StartMatch( playerid, targetID ) {
|
||||
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_FIGHTING ] && g_boxingPlayerData[ targetID ] [ E_FIGHTING ] ) {
|
||||
|
||||
new Float:health_P, Float:armour_P, Float:health_T, Float:armour_T;
|
||||
|
||||
ClearAnimations( playerid );
|
||||
GetPlayerHealth( playerid, health_P );
|
||||
GetPlayerArmour( playerid, armour_P );
|
||||
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_NONE );
|
||||
g_boxingPlayerData[ playerid ] [ E_PRIOR_HEALTH ] = health_P;
|
||||
g_boxingPlayerData[ playerid ] [ E_PRIOR_ARMOUR ] = armour_P;
|
||||
g_boxingPlayerData[ playerid ] [ E_PRIOR_SKIN ] = GetPlayerSkin( playerid );
|
||||
SetPlayerSkin( playerid, 81 );
|
||||
|
||||
ClearAnimations( targetID );
|
||||
GetPlayerHealth( targetID, health_T );
|
||||
GetPlayerArmour( targetID, armour_T );
|
||||
SetPlayerSpecialAction( targetID, SPECIAL_ACTION_NONE );
|
||||
g_boxingPlayerData[ targetID ] [ E_PRIOR_HEALTH ] = health_T;
|
||||
g_boxingPlayerData[ targetID ] [ E_PRIOR_ARMOUR ] = armour_T;
|
||||
g_boxingPlayerData[ targetID ] [ E_PRIOR_SKIN ] = GetPlayerSkin( targetID );
|
||||
SetPlayerSkin( targetID, 80 );
|
||||
|
||||
// save weapons
|
||||
for( new iSlot = 0; iSlot != 12; iSlot++ ) {
|
||||
GetPlayerWeaponData( playerid, iSlot, g_boxingPlayerData[ playerid ] [ E_PRIOR_WEP ] [ iSlot ], g_boxingPlayerData[ playerid ] [ E_PRIOR_WEP_AMMO ] [ iSlot ] );
|
||||
GetPlayerWeaponData( targetID, iSlot, g_boxingPlayerData[ targetID ] [ E_PRIOR_WEP ] [ iSlot ], g_boxingPlayerData[ targetID ] [ E_PRIOR_WEP_AMMO ] [ iSlot ] );
|
||||
}
|
||||
|
||||
g_boxingArenaData[ E_ROUNDS ] = g_boxingPlayerData[ targetID ] [ E_ROUNDS_SET ];
|
||||
g_boxingArenaData[ E_BET ] = g_boxingPlayerData[ targetID ] [ E_BET_AMOUNT_SET ];
|
||||
|
||||
if ( g_boxingArenaData[ E_BET ] > 0 ) {
|
||||
GivePlayerCash( playerid, -g_boxingArenaData[ E_BET ] );
|
||||
GivePlayerCash( targetID, -g_boxingArenaData[ E_BET ] );
|
||||
}
|
||||
|
||||
SetBoxingPlayerConfig( playerid, targetID );
|
||||
|
||||
KillTimer( g_boxingArenaData[ E_CD_TIMER ] );
|
||||
g_boxingArenaData[ E_CD_TIMER ] = SetTimerEx( "boxingCountDown", 960, false, "d", 5 );
|
||||
|
||||
SendBoxing( playerid, "You are fighting %s through the best of %i round(s). Good luck!", ReturnPlayerName( targetID ), g_boxingArenaData[ E_ROUNDS ] );
|
||||
SendBoxing( targetID, "You are fighting %s through the best of %i round(s). Good luck!", ReturnPlayerName( playerid ), g_boxingArenaData[ E_ROUNDS ] );
|
||||
|
||||
UpdateArenaScoreLabel( playerid, targetID );
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return SendError( playerid, "I'm sorry. Something has gone terribly wrong with starting the match. Please try again." );
|
||||
}
|
||||
}
|
||||
|
||||
stock NextRound( playerid, targetID )
|
||||
{
|
||||
UpdateArenaScoreLabel( playerid, targetID );
|
||||
SetBoxingPlayerConfig( playerid, targetID );
|
||||
KillTimer( g_boxingArenaData[ E_CD_TIMER ] );
|
||||
g_boxingArenaData[ E_CD_TIMER ] = SetTimerEx( "boxingCountDown", 960, false, "d", 5 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock EndMatch( playerid, targetID ) {
|
||||
|
||||
new winnerid = g_boxingPlayerData[ targetID ] [ E_SCORE ] > g_boxingPlayerData[ playerid ] [ E_SCORE ] ? targetID : playerid;
|
||||
new loserid = winnerid == playerid ? targetID : playerid;
|
||||
|
||||
if ( g_boxingArenaData[ E_BET ] <= 0 ) {
|
||||
SendBoxingGlobal( "%s has won a boxing match against %s with a final score of %i!", ReturnPlayerName( winnerid ), ReturnPlayerName( loserid ), g_boxingPlayerData[ winnerid ] [ E_SCORE ] );
|
||||
} else {
|
||||
new winning_prize = floatround( float( g_boxingArenaData[ E_BET ] ) * 1.9 ); // We take 5% of the total pot
|
||||
GivePlayerCash( winnerid, winning_prize );
|
||||
SendBoxingGlobal( "%s has won a boxing match against %s for %s with a final score of %i!", ReturnPlayerName( winnerid ), ReturnPlayerName( loserid ), number_format( g_boxingArenaData[ E_BET ] ), g_boxingPlayerData[ winnerid ] [ E_SCORE ] );
|
||||
}
|
||||
|
||||
boxing_RestorePlayer( playerid );
|
||||
boxing_RestorePlayer( targetID );
|
||||
|
||||
SetPlayerPos( playerid, 2658.3181, 1607.2100, 1507.1793 );
|
||||
SetPlayerPos( targetID, 2652.0947, 1607.2100, 1507.1793 );
|
||||
|
||||
ResetBoxingArenaVariables();
|
||||
ResetBoxingPlayerVariables( playerid, targetID );
|
||||
UpdateDynamic3DTextLabelText( arenaLabel, COLOR_GREY, "Boxing Arena\n"COL_WHITE"/boxing fight" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock boxing_RestorePlayer( playerid )
|
||||
{
|
||||
// user reported 0xff health, maybe spawn protection
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_PRIOR_HEALTH ] > 100.0 ) g_boxingPlayerData[ playerid ] [ E_PRIOR_HEALTH ] = 100.0;
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_PRIOR_ARMOUR ] > 100.0 ) g_boxingPlayerData[ playerid ] [ E_PRIOR_ARMOUR ] = 100.0;
|
||||
|
||||
// set prior health
|
||||
SetPlayerHealth( playerid, g_boxingPlayerData[ playerid ] [ E_PRIOR_HEALTH ] );
|
||||
SetPlayerArmour( playerid, g_boxingPlayerData[ playerid ] [ E_PRIOR_ARMOUR ] );
|
||||
SetPlayerSkin( playerid, g_boxingPlayerData[ playerid ] [ E_PRIOR_SKIN ] );
|
||||
ResetPlayerWeapons( playerid );
|
||||
|
||||
for ( new iSlot = 0; iSlot != 12; iSlot++ ) {
|
||||
GivePlayerWeapon( playerid, g_boxingPlayerData[ playerid ] [ E_PRIOR_WEP ] [ iSlot ], g_boxingPlayerData[ playerid ] [ E_PRIOR_WEP_AMMO ] [ iSlot ] );
|
||||
}
|
||||
}
|
||||
|
||||
stock boxing_ForfeitMatch( playerid, targetID ) {
|
||||
if ( ! g_boxingPlayerData[ playerid ] [ E_FIGHTING ] ) return 0;
|
||||
|
||||
if ( g_boxingArenaData[ E_BET ] == 0 ) {
|
||||
SendBoxingGlobal( "%s has won a boxing match by forfeit against %s.", ReturnPlayerName( targetID ), ReturnPlayerName( playerid ) );
|
||||
} else if ( g_boxingArenaData[ E_BET ] > 0 ) {
|
||||
GivePlayerCash( targetID, g_boxingArenaData[ E_BET ] );
|
||||
SendBoxingGlobal( "%s has won a boxing match by forfeit against %s for %s.", ReturnPlayerName( targetID ), ReturnPlayerName( playerid ), number_format( g_boxingArenaData[ E_BET ] ) );
|
||||
}
|
||||
|
||||
boxing_RestorePlayer( playerid );
|
||||
SetPlayerPos( playerid, 2658.3181, 1607.2100, 1507.1793 );
|
||||
|
||||
if ( 0 <= targetID < MAX_PLAYERS ) {
|
||||
boxing_RestorePlayer( targetID );
|
||||
SetPlayerPos( targetID, 2652.0947, 1607.2100, 1507.1793 );
|
||||
}
|
||||
|
||||
ResetBoxingArenaVariables();
|
||||
ResetBoxingPlayerVariables( playerid, targetID );
|
||||
UpdateDynamic3DTextLabelText( arenaLabel, COLOR_GREY, "Boxing Arena\n"COL_WHITE"/boxing fight" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock SetBoxingPlayerConfig( playerid, targetID ) {
|
||||
|
||||
SetPlayerPos( playerid, 2657.4133, 1615.7841, 1507.0977 );
|
||||
SetPlayerPos( targetID, 2653.1357, 1611.4575, 1507.0977 );
|
||||
|
||||
SetPlayerFacingAngle( playerid, 136 );
|
||||
SetPlayerFacingAngle( targetID, 315 );
|
||||
|
||||
SetCameraBehindPlayer( playerid );
|
||||
SetCameraBehindPlayer( targetID );
|
||||
|
||||
SetPlayerHealth( playerid, 100.0 );
|
||||
SetPlayerHealth( targetID, 100.0 );
|
||||
|
||||
SetPlayerArmour( playerid, 100.0 );
|
||||
SetPlayerArmour( targetID, 100.0 );
|
||||
|
||||
ResetPlayerWeapons( playerid );
|
||||
ResetPlayerWeapons( targetID );
|
||||
|
||||
TogglePlayerControllable( playerid, 0 );
|
||||
TogglePlayerControllable( targetID, 0 );
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
function boxingCountDown( time ) {
|
||||
|
||||
if ( !time ) {
|
||||
foreach( new playerid : Player ) {
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_FIGHTING ] == true ) {
|
||||
format( szNormalString, sizeof( szNormalString ), "~r~FIGHT!", time );
|
||||
GameTextForPlayer( playerid, szNormalString, 2000, 3 );
|
||||
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 );
|
||||
TogglePlayerControllable( playerid, 1 );
|
||||
}
|
||||
}
|
||||
g_boxingArenaData[ E_CD_TIMER ] = -1;
|
||||
|
||||
} else {
|
||||
foreach( new playerid : Player ) {
|
||||
if ( g_boxingPlayerData[ playerid ] [ E_FIGHTING ] == true ) {
|
||||
format( szNormalString, sizeof( szNormalString ), "~y~%d", time );
|
||||
GameTextForPlayer( playerid, szNormalString, 2000, 3 );
|
||||
PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 );
|
||||
}
|
||||
}
|
||||
g_boxingArenaData[ E_CD_TIMER ] = SetTimerEx( "boxingCountDown", 960, false, "d", time - 1 );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock UpdateArenaScoreLabel( playerid, opponent ) {
|
||||
format( szNormalString, sizeof( szNormalString ), "%s [ %i ] - [ %i ] %s", ReturnPlayerName( playerid ), g_boxingPlayerData[ playerid ] [ E_SCORE ], g_boxingPlayerData[ opponent ] [ E_SCORE ], ReturnPlayerName( opponent ) );
|
||||
return UpdateDynamic3DTextLabelText( arenaLabel, COLOR_GOLD, szNormalString );
|
||||
}
|
||||
|
||||
stock ResetBoxingPlayerVariables( playerid, targetID ) {
|
||||
|
||||
g_boxingPlayerData[ playerid ] [ E_INVITED ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_OPPONENT ] = -1;
|
||||
g_boxingPlayerData[ playerid ] [ E_IS_HOST ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_FIGHTING ] = false;
|
||||
g_boxingPlayerData[ playerid ] [ E_SCORE ] = 0;
|
||||
TogglePlayerControllable( playerid, 1 );
|
||||
|
||||
if ( 0 <= targetID < MAX_PLAYERS )
|
||||
{
|
||||
g_boxingPlayerData[ targetID ] [ E_INVITED ] = false;
|
||||
g_boxingPlayerData[ targetID ] [ E_OPPONENT ] = -1;
|
||||
g_boxingPlayerData[ targetID ] [ E_IS_HOST ] = false;
|
||||
g_boxingPlayerData[ targetID ] [ E_FIGHTING ] = false;
|
||||
g_boxingPlayerData[ targetID ] [ E_SCORE ] = 0;
|
||||
TogglePlayerControllable( targetID, 1 );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
stock ResetBoxingArenaVariables() {
|
||||
g_boxingArenaData[ E_OCCUPIED ] = false;
|
||||
g_boxingArenaData[ E_CURRENT_ROUNDS ] = 0;
|
||||
g_boxingArenaData[ E_ROUNDS ] = 0;
|
||||
g_boxingArenaData[ E_BET ] = 0;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/* Hooks */
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDamagePlayer( playerid, damagedid, Float: amount, weaponid, bodypart )
|
||||
#else
|
||||
hook OnPlayerGiveDamage( playerid, damagedid, Float: amount, weaponid, bodypart )
|
||||
#endif
|
||||
{
|
||||
if ( g_boxingPlayerData[ damagedid ] [ E_FIGHTING ] == true ) {
|
||||
|
||||
new Float:currentArmour;
|
||||
|
||||
GetPlayerArmour( damagedid, currentArmour );
|
||||
|
||||
if ( currentArmour <= 0.0 ) {
|
||||
|
||||
new opponent = g_boxingPlayerData[ damagedid ] [ E_OPPONENT ];
|
||||
|
||||
g_boxingPlayerData[ opponent ] [ E_SCORE ] ++;
|
||||
g_boxingArenaData[ E_CURRENT_ROUNDS ] ++;
|
||||
|
||||
if ( g_boxingArenaData[ E_CURRENT_ROUNDS ] == g_boxingArenaData[ E_ROUNDS ] ) {
|
||||
return EndMatch( damagedid, opponent );
|
||||
}
|
||||
|
||||
SendBoxing( damagedid, "You have lost the round. Let the next round begin." );
|
||||
SendBoxing( opponent, "You have won the round. Let the next round begin." );
|
||||
|
||||
SendBoxing( damagedid, "Best of %i - [ %s: %i ] - [ %s: %i ]", g_boxingArenaData[ E_ROUNDS ], ReturnPlayerName( damagedid ), g_boxingPlayerData[ damagedid ] [ E_SCORE ], ReturnPlayerName( opponent ), g_boxingPlayerData[ opponent ] [ E_SCORE ] );
|
||||
SendBoxing( opponent, "Best of %i - [ %s: %i ] - [ %s: %i ]", g_boxingArenaData[ E_ROUNDS ], ReturnPlayerName( damagedid ), g_boxingPlayerData[ damagedid ] [ E_SCORE ], ReturnPlayerName( opponent ), g_boxingPlayerData[ opponent ] [ E_SCORE ] );
|
||||
|
||||
NextRound( damagedid, opponent );
|
||||
}
|
||||
}
|
||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||
|
||||
}
|
361
gamemodes/irresistible/features/visage/casino.pwn
Normal file
361
gamemodes/irresistible/features/visage/casino.pwn
Normal file
@ -0,0 +1,361 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: casino.inc
|
||||
* Purpose: related to implementing the casino of visage
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Constants ** */
|
||||
stock VISAGE_ENTRANCE = ITER_NONE;
|
||||
stock const VISAGE_INTERIOR = 15;
|
||||
stock const VISAGE_WORLD = 79;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// Initialize Interior
|
||||
InitializeCasinoInterior( );
|
||||
|
||||
// Create Entrance
|
||||
VISAGE_ENTRANCE = CreateEntrance( "[VISAGE CASINO]", 2017.1334, 1916.4141, 12.3424, 2633.7986, 1714.6560, 1512.4630, VISAGE_INTERIOR, VISAGE_WORLD, true, false, 44 );
|
||||
|
||||
// Create Poker Tables
|
||||
CreatePokerTable( 25000000, 250000, 2584.122070, 1593.588012, 1505.522949, 6, VISAGE_WORLD, VISAGE_INTERIOR ); // super high roller
|
||||
CreatePokerTable( 10000000, 100000, 2566.893066, 1616.395019, 1505.532958, 4, VISAGE_WORLD, VISAGE_INTERIOR ); // highroller
|
||||
CreatePokerTable( 7500000, 75000, 2566.893066, 1609.832031, 1505.532958, 4, VISAGE_WORLD, VISAGE_INTERIOR ); // highroller
|
||||
CreatePokerTable( 5000000, 50000, 2572.893066, 1609.832031, 1505.532958, 4, VISAGE_WORLD, VISAGE_INTERIOR ); // highroller
|
||||
CreatePokerTable( 2500000, 25000, 2572.893066, 1616.395019, 1505.532958, 4, VISAGE_WORLD, VISAGE_INTERIOR ); // highroller
|
||||
CreatePokerTable( 1000000, 10000, 2619.504882, 1591.672973, 1505.548950, 6, VISAGE_WORLD, VISAGE_INTERIOR );
|
||||
CreatePokerTable( 500000, 5000, 2619.504882, 1597.672973, 1505.548950, 6, VISAGE_WORLD, VISAGE_INTERIOR );
|
||||
CreatePokerTable( 250000, 2500, 2619.504882, 1603.672973, 1505.548950, 6, VISAGE_WORLD, VISAGE_INTERIOR );
|
||||
CreatePokerTable( 100000, 1000, 2619.504882, 1609.672973, 1505.548950, 6, VISAGE_WORLD, VISAGE_INTERIOR );
|
||||
CreatePokerTable( 50000, 500, 2619.504882, 1615.672973, 1505.548950, 6, VISAGE_WORLD, VISAGE_INTERIOR );
|
||||
|
||||
// Robbery Info
|
||||
CreateRobberyNPC( "Visage Cashier", 2500, 2601.9226, 1567.5959, 1508.3521, 0.0, 11, VISAGE_WORLD ); // Mafia
|
||||
CreateRobberyNPC( "Visage Cashier", 2500, 2607.0059, 1567.5959, 1508.3521, 0.0, 172, VISAGE_WORLD ); // Mafia
|
||||
CreateRobberyCheckpoint( "Visage Casino - Safe 1", 4000, 2609.208984, 1566.640014, 1507.802001, -90.00000, VISAGE_WORLD );
|
||||
CreateRobberyCheckpoint( "Visage Casino - Safe 2", 4000, 2609.208984, 1565.798950, 1507.802001, -90.00000, VISAGE_WORLD );
|
||||
|
||||
// Create ATM
|
||||
CreateATM( 2557.137939, 1576.037963, 1508.003051, -90.000000 );
|
||||
CreateATM( 2630.107177, 1647.757324, 1507.968750, -90.000000 );
|
||||
CreateATM( 2641.666992, 1649.718994, 1507.968750, 90.0000000 );
|
||||
|
||||
// Create Roulette Tables
|
||||
CreateRouletteTable( 2641.445068, 1619.609008, 1506.227050, 90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2641.445068, 1614.555053, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2630.570068, 1619.656005, 1506.227050, 90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2630.570068, 1589.187988, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2630.520996, 1614.555053, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2641.366943, 1589.187988, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2641.366943, 1594.758056, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2630.566894, 1594.758056, 1506.227050, -90.000000, VISAGE_WORLD, .maxbet = 250000 );
|
||||
CreateRouletteTable( 2579.751953, 1610.387939, 1506.203002, -90.000000, VISAGE_WORLD, .maxbet = 1000000 ); // high roller
|
||||
CreateRouletteTable( 2579.751953, 1615.537963, 1506.203002, -90.000000, VISAGE_WORLD, .maxbet = 1000000 ); // high roller
|
||||
|
||||
// Create Blackjack Tables
|
||||
CreateBlackjackTable( 2500000, 2607.080078, 1604.453002, 1506.156005, -90.0000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 1000000, 2608.962890, 1602.750000, 1506.156005, 0.000000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 750000, 2610.774902, 1604.437988, 1506.156005, 90.00000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 500000, 2608.962890, 1606.272949, 1506.156005, 180.0000, VISAGE_WORLD );
|
||||
|
||||
CreateBlackjackTable( 250000, 2632.187988, 1604.437988, 1506.156005, 90.0000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 100000, 2628.491943, 1604.453002, 1506.156005, -90.000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 50000, 2630.375000, 1602.750000, 1506.156005, 0.00000, VISAGE_WORLD );
|
||||
CreateBlackjackTable( 25000, 2630.375000, 1606.272949, 1506.156005, 180.000, VISAGE_WORLD );
|
||||
|
||||
CreateBlackjackTable( 25000000, 2569.475097, 1600.437988, 1506.15600, 90.0000, VISAGE_WORLD ); // high roller
|
||||
CreateBlackjackTable( 15000000, 2567.663085, 1602.272949, 1506.15600, 180.000, VISAGE_WORLD ); // high roller
|
||||
CreateBlackjackTable( 10000000, 2565.780029, 1600.453002, 1506.15600, -90.000, VISAGE_WORLD ); // high roller
|
||||
CreateBlackjackTable( 5000000, 2567.663085, 1598.750000, 1506.15600, 0.000000, VISAGE_WORLD ); // high roller
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid )
|
||||
{
|
||||
// Remove Visage Building
|
||||
RemoveBuildingForPlayer( playerid, 7584, 1947.3828, 1916.1953, 78.1953, 0.25 );
|
||||
RemoveBuildingForPlayer( playerid, 7716, 1947.3828, 1916.1953, 78.1953, 0.25 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
// purpose: creates the interior itself
|
||||
static stock InitializeCasinoInterior( )
|
||||
{
|
||||
// Remake
|
||||
tmpVariable = CreateDynamicObject( 14624, 2585.871093, 1609.286010, 1511.188964, 0.000000, 0.000000, 180.000000, .streamdistance = -1.0, .priority = 9999 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 15, 8396, "sphinx01", "luxorwall02_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 12, 14627, "ab_optilite", "ab_optilite", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 8396, "sphinx01", "luxorledge02_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 11, 5392, "eastshops1_lae", "blueshop2_LAe", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2619.851074, 1570.769042, 1509.729980, 0.000000, 0.000000, -36.799999, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2619.667968, 1636.426025, 1509.729980, 0.000000, 0.000000, -36.799999, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -16 );
|
||||
tmpVariable = CreateDynamicObject( 14623, 2635.883056, 1677.000000, 1512.906005, 0.000000, 0.000000, 0.000000, .streamdistance = -1.0, .priority = 9999 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 0, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 10412, "hotel1", "gold128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 5392, "eastshops1_lae", "blueshop2_LAe", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 5, 8396, "sphinx01", "luxorwall02_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 7, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 8, 5392, "eastshops1_lae", "blueshop2_LAe", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "casinodoor1_128", 0 );
|
||||
tmpVariable = CreateDynamicObject( 14624, 2653.422119, 1597.921997, 1511.194946, 0.000000, 0.000000, 0.000000, .streamdistance = -1.0, .priority = 9999 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 15, 8396, "sphinx01", "luxorwall02_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 3, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 12, 14627, "ab_optilite", "ab_optilite", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "luxormural01_256", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 1, 8396, "sphinx01", "luxorledge02_128", 0 );
|
||||
SetDynamicObjectMaterial( tmpVariable, 11, 5392, "eastshops1_lae", "blueshop2_LAe", 0 );
|
||||
CreateDynamicObject( 19943, 2616.636962, 1632.371948, 1507.371948, 0.000000, 0.000000, -19.899999, -1, -1, -1 );
|
||||
CreateDynamicObject( 19943, 2622.750976, 1574.579956, 1507.371948, 0.000000, 0.000000, -19.899999, -1, -1, -1 );
|
||||
|
||||
// Main Visage Object
|
||||
CreateDynamicObject( 7584, 1947.38281, 1916.19531, 78.19531, 0.00000, 0.00000, 0.00000, 0, 0, -1, 500.0, .priority = 1 ); // visible to 500m in world & interior 0
|
||||
|
||||
// The Visage Casino
|
||||
CreateDynamicObject( 14629, 2608.823974, 1611.375000, 1516.180053, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 14629, 2641.272949, 1611.375000, 1516.180053, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.947021, 1588.024047, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.947021, 1594.024047, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.947021, 1619.036987, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.947021, 1613.036987, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.906982, 1618.505004, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.906982, 1612.501953, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.967041, 1594.543945, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2597.967041, 1588.552978, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1588.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1588.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1588.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1588.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1594.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1594.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1594.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1594.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1612.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.792968, 1612.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1613.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1613.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.822998, 1619.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2596.792968, 1618.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1618.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2599.084960, 1619.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.907958, 1618.505004, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.947998, 1613.036987, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.907958, 1612.501953, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.968017, 1594.543945, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.947998, 1594.024047, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.968017, 1588.552978, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.947998, 1588.024047, 1506.064941, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1588.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1588.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1588.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1588.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1594.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1594.015014, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1594.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1594.546020, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.793945, 1612.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1612.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1613.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1613.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1618.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.793945, 1618.485961, 1505.949951, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2607.823974, 1619.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2610.085937, 1619.036010, 1505.949951, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2608.936035, 1619.036987, 1506.064941, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 14781, 2654.885986, 1613.157958, 1506.269042, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2607.093994, 1631.635986, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2607.093994, 1641.125976, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2589.506103, 1641.125976, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2569.264892, 1641.125976, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2581.614013, 1629.635986, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2178, 2562.874023, 1629.635986, 1514.284057, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2592.503906, 1533.038940, 1507.862060, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 17925, "lae2fake_int", "carpet1kb", 1 );
|
||||
CreateDynamicObject( 2773, 2592.842041, 1575.723999, 1507.862060, 0.000000, 0.000000, 13.899999, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2592.366943, 1584.285034, 1507.883056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 17925, "lae2fake_int", "carpet1kb", 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19545, 2592.544921, 1651.203002, 1508.353027, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 19545, "none", "none", 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19545, 2592.544921, 1556.972045, 1508.353027, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 19545, "none", "none", 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2643.944091, 1703.369995, 1507.555053, 0.000000, 73.300003, 90.000000, -1, -1, -1 ), 0, 18981, "none", "none", 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19355, 2637.814941, 1715.092041, 1513.130981, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "casinodoor1_128", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19355, 2633.930908, 1715.092041, 1513.130981, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "casinodoor1_128", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2582.822998, 1592.265014, 1505.086059, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 17946, "carter_mainmap", "mp_carter_carpet", -5085441 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2582.822998, 1594.847045, 1505.088012, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 17946, "carter_mainmap", "mp_carter_carpet", -5085441 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2585.344970, 1594.847045, 1505.089965, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 17946, "carter_mainmap", "mp_carter_carpet", -5085441 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2577.787109, 1598.427978, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2578.768066, 1599.379028, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2589.430908, 1599.379028, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2590.368896, 1598.427978, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2577.787109, 1588.615966, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2578.768066, 1587.656005, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2589.430908, 1587.636962, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2590.368896, 1588.607055, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2590.368896, 1593.607055, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2577.787109, 1593.427978, 1505.682983, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2584.268066, 1587.656005, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 2773, 2584.268066, 1599.379028, 1505.685058, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 1, 1246, "icons", "bluepink64", -7114533 );
|
||||
CreateDynamicObject( 2773, 2592.483886, 1578.048950, 1507.862060, 0.000000, 0.000000, 3.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19325, 2659.613037, 1613.500000, 1512.177978, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 14790, "ab_sfgymbits02", "sign_cobra1", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19325, 2650.922119, 1613.500000, 1512.177978, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 14790, "ab_sfgymbits02", "sign_cobra2", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2628.562988, 1703.369995, 1507.555053, 0.000000, 73.300003, 90.000000, -1, -1, -1 ), 0, 18981, "none", "none", 1 );
|
||||
CreateDynamicObject( 2631, 2660.205078, 1613.541015, 1505.204956, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2632, 2650.537109, 1613.541015, 1505.204956, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19296, 2666.011962, 1611.083984, 1502.369018, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2610.041992, 1556.404052, 1508.353027, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -272 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2596.769042, 1556.404052, 1508.353027, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -272 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2605.837890, 1556.404052, 1506.852050, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 9583, "bigshap_sfw", "shipfloor_sfw", 0 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2608.409912, 1564.261962, 1508.353027, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -272 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 1491, 2597.252929, 1568.845947, 1507.251953, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "sphinxface01_256", -17895696 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18981, 2611.272949, 1568.446044, 1495.880004, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
CreateDynamicObject( 18981, 2605.837890, 1556.404052, 1511.735961, 0.000000, 90.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18762, 2599.268066, 1568.437011, 1511.864990, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18762, 2604.351074, 1568.437011, 1511.868041, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18766, 2594.665039, 1568.430053, 1512.244995, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18766, 2603.559082, 1568.430053, 1513.206054, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18762, 2609.051025, 1568.437011, 1511.868041, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling02_128", -16 );
|
||||
CreateDynamicObject( 19325, 2601.820068, 1568.655029, 1512.125000, 90.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19325, 2606.832031, 1568.655029, 1512.125000, 90.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2603.422119, 1570.913940, 1514.991943, 0.000000, 0.000000, 180.000000, -1, -1, -1 ), 0, "CASHIER", 120, "Times new roman", 90, 0, -16777216, 0, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2635.801025, 1596.386962, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2635.801025, 1611.828002, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2625.069091, 1597.338012, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2625.069091, 1610.979980, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2646.562011, 1597.338012, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2646.562011, 1611.020019, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2614.230957, 1609.928955, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2614.230957, 1596.177001, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2603.469970, 1610.910034, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2603.469970, 1595.338012, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2592.728027, 1609.909057, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 3494, 2592.728027, 1596.177001, 1508.508056, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
CreateDynamicObject( 14401, 2650.637939, 1633.600952, 1505.448974, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 14401, 2643.084960, 1633.600952, 1505.448974, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11745, 2661.160888, 1619.322021, 1505.905029, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19570, 2660.962890, 1618.885009, 1505.185058, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11738, 2661.849121, 1618.259033, 1505.208007, 0.000000, 0.000000, -75.400001, -1, -1, -1 );
|
||||
CreateDynamicObject( 2146, 2662.477050, 1617.947998, 1504.774047, 0.000000, 0.000000, 9.199999, -1, -1, -1 );
|
||||
CreateDynamicObject( 11686, 2651.860107, 1592.458007, 1505.177978, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11686, 2654.659912, 1590.366943, 1505.180053, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11686, 2659.459960, 1590.366943, 1505.180053, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11686, 2666.550048, 1590.366943, 1505.180053, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 11686, 2673.393066, 1590.366943, 1505.180053, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2653.123046, 1593.989990, 1505.538940, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2652.874023, 1591.967041, 1505.538940, 0.000000, 0.000000, -47.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2654.705078, 1591.380004, 1505.538940, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2660.539062, 1591.630004, 1505.538940, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2657.697998, 1591.380004, 1505.538940, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2666.215087, 1591.380004, 1505.538940, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2674.815917, 1591.380004, 1505.538940, 0.000000, 0.000000, -63.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2350, 2672.812011, 1591.629028, 1505.538940, 0.000000, 0.000000, -97.099998, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2656.145019, 1596.262939, 1505.519042, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2661.053955, 1597.682983, 1505.519042, 0.000000, 0.000000, -53.799999, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2667.053955, 1597.682983, 1505.519042, 0.000000, 0.000000, -40.599998, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2673.019042, 1599.197998, 1505.519042, 0.000000, 0.000000, -41.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2670.091064, 1603.635009, 1505.519042, 0.000000, 0.000000, -41.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2673.802001, 1606.734985, 1505.519042, 0.000000, 0.000000, 45.700000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2669.802001, 1610.029052, 1505.519042, 0.000000, 0.000000, -28.299999, -1, -1, -1 );
|
||||
CreateDynamicObject( 2802, 2652.606933, 1599.161010, 1505.519042, 0.000000, 0.000000, 95.599998, -1, -1, -1 );
|
||||
CreateDynamicObject( 70, 2663.035888, 1604.270019, 1506.186035, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 70, 2666.500976, 1609.708984, 1506.178955, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2587.272949, 1609.031005, 1506.060058, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2586.184082, 1609.041015, 1505.953002, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2587.072998, 1615.592041, 1506.060058, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2587.302978, 1609.562011, 1506.060058, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 2592, 2587.603027, 1615.562011, 1506.060058, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2588.364990, 1609.041015, 1505.953002, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2586.184082, 1609.572021, 1505.953002, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2588.364990, 1609.572021, 1505.953002, 0.000000, 0.000000, 180.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2587.604980, 1614.480957, 1505.953002, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2587.604980, 1616.722045, 1505.953002, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2587.094970, 1616.722045, 1505.953002, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 1835, 2587.094970, 1614.490966, 1505.953002, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19298, 2583.156005, 1594.552001, 1532.812011, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2585.344970, 1592.265014, 1505.093994, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 17946, "carter_mainmap", "mp_carter_carpet", -5085441 );
|
||||
CreateDynamicObject( 14622, 2635.897949, 1703.796997, 1514.906005, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 14609, 2621.529052, 1663.767944, 1509.097045, 0.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2635.923095, 1689.045043, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2642.896972, 1686.762939, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2647.228027, 1680.802978, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2647.228027, 1673.421997, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2642.866943, 1667.463012, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2635.864990, 1665.243041, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2628.851074, 1667.494018, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2624.514892, 1673.480957, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2624.554931, 1680.853027, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 3498, 2628.885009, 1686.802978, 1509.530029, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 1, " ", 140, "Arial", 64, 1, -32256, 0, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19789, 2609.051025, 1568.437011, 1508.366943, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxormural01_256", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19789, 2604.351074, 1568.437011, 1508.366943, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxormural01_256", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19789, 2599.270996, 1568.437011, 1508.366943, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxormural01_256", -16 );
|
||||
CreateDynamicObject( 14781, 2654.887939, 1614.062011, 1508.817993, 180.000000, 0.000000, 0.000000, -1, -1, -1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2639.329101, 1666.673950, 1514.469970, 0.000000, 0.000000, -162.100006, -1, -1, -1 ), 0, "Banging7grams", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2639.329101, 1666.673950, 1513.869995, 0.000000, 0.000000, -162.100006, -1, -1, -1 ), 0, "Shini", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2639.329101, 1666.673950, 1513.270019, 0.000000, 0.000000, -162.100006, -1, -1, -1 ), 0, "Daniel", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2639.329101, 1666.673950, 1512.670043, 0.000000, 0.000000, -162.100006, -1, -1, -1 ), 0, "Bradyy", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2632.508056, 1666.668945, 1514.469970, 0.000000, 0.000000, 162.000000, -1, -1, -1 ), 0, "Brad", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2632.508056, 1666.668945, 1513.869995, 0.000000, 0.000000, 162.000000, -1, -1, -1 ), 0, "RoyceGate", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2632.508056, 1666.668945, 1513.270019, 0.000000, 0.000000, 162.000000, -1, -1, -1 ), 0, "Ashley", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2632.508056, 1666.668945, 1512.670043, 0.000000, 0.000000, 162.000000, -1, -1, -1 ), 0, "[TDK]Future[NG]", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2644.941894, 1670.793945, 1514.469970, 0.000000, 0.000000, -126.099998, -1, -1, -1 ), 0, "Harpreet", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2644.941894, 1670.793945, 1513.869995, 0.000000, 0.000000, -126.099998, -1, -1, -1 ), 0, "Veloxity_", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2644.941894, 1670.793945, 1513.270019, 0.000000, 0.000000, -126.099998, -1, -1, -1 ), 0, "[ZF]ImakeMYownCAKE", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2644.941894, 1670.793945, 1512.670043, 0.000000, 0.000000, -126.099998, -1, -1, -1 ), 0, "Minthy", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2646.933105, 1677.155029, 1514.469970, 0.000000, 0.000000, -89.900001, -1, -1, -1 ), 0, "Hariexy", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2646.933105, 1677.155029, 1513.869995, 0.000000, 0.000000, -89.900001, -1, -1, -1 ), 0, "StevenVerx", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2626.977050, 1670.654052, 1514.469970, 0.000000, 0.000000, 125.699996, -1, -1, -1 ), 0, "MrFreeze", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2626.977050, 1670.654052, 1513.869995, 0.000000, 0.000000, 125.699996, -1, -1, -1 ), 0, "Chickenwing", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2626.977050, 1670.654052, 1513.270019, 0.000000, 0.000000, 125.699996, -1, -1, -1 ), 0, "Nibble", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2626.977050, 1670.654052, 1512.670043, 0.000000, 0.000000, 125.699996, -1, -1, -1 ), 0, "[SS]Usaid", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2624.854980, 1677.182006, 1514.469970, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "NeXuS", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2624.854980, 1677.182006, 1513.869995, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "IM_HULK.", 130, "Times new roman", 50, 0, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 2592.583007, 1602.630004, 1511.784057, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, "HIGHROLLERS", 120, "Times new roman", 70, 1, -9170, 0, 1 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18762, 2609.367919, 1567.556030, 1505.781982, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 18762, 2609.367919, 1564.864990, 1505.781982, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19940, 2609.099121, 1566.212036, 1508.271972, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
SetDynamicObjectMaterial( CreateDynamicObject( 19940, 2609.529052, 1566.202026, 1508.271972, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorwall02_128", -16 );
|
||||
CreateDynamicObject( 19324, 2630.107177, 1649.759155, 1507.968750, 0.000000, 0.000000, 90.000000, -1, -1, -1 );
|
||||
CreateDynamicObject( 19324, 2641.666992, 1647.757324, 1507.968750, 0.000000, 0.000000, -90.000000, -1, -1, -1 );
|
||||
|
||||
// Actors
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 120, 2642.641357, 1635.053955, 1508.359985, -135.600051, .worldid = VISAGE_WORLD ), "GANGS", "prtial_gngtlkA", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 185, 2610.070068, 1618.020019, 1506.199951, 0.000000, .worldid = VISAGE_WORLD ), "CASINO", "slot_wait", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 222, 2607.510009, 1602.569946, 1506.130004, -105.300003, .worldid = VISAGE_WORLD ), "CASINO", "cards_loop", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 235, 2629.224609, 1607.058349, 1506.229980, -122.199913, .worldid = VISAGE_WORLD ), "CASINO", "cards_loop", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 234, 2640.699951, 1618.369995, 1506.089965, -36.900001, .worldid = VISAGE_WORLD ), "CASINO", "roulette_lose", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 249, 2643.155517, 1634.143554, 1508.359985, -52.700000, .worldid = VISAGE_WORLD ), "GANGS", "prtial_gngtlkE", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 126, 2596.780029, 1611.949951, 1506.199951, 0.000000, .worldid = VISAGE_WORLD ), "CASINO", "slot_wait", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 43, 2599.030029, 1613.660034, 1506.180053, 180.000000, .worldid = VISAGE_WORLD ), "CASINO", "slot_win_out", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 187, 2610.090087, 1593.510253, 1506.170043, 0.000000, .worldid = VISAGE_WORLD ), "CASINO", "slot_wait", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 164, 2583.010009, 1599.790039, 1506.170043, 10.500000, .worldid = VISAGE_WORLD ), "COP_AMBIENT", "Coplook_nod", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 163, 2585.560058, 1599.719970, 1506.170043, -23.799999, .worldid = VISAGE_WORLD ), "COP_AMBIENT", "Coplook_nod", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 81, 2660.712158, 1617.158691, 1506.260131, 13.600008, .worldid = VISAGE_WORLD ), "CRACK", "crckidle4", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 70, 2660.679931, 1617.500000, 1506.180053, -143.699996, .worldid = VISAGE_WORLD ), "MEDIC", "CPR", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 172, 2654.689941, 1589.520019, 1506.180053, 0.000000, .worldid = VISAGE_WORLD ), "bar", "Barserve_bottle", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 20, 2659.939941, 1590.989990, 1506.180053, 61.599998, .worldid = VISAGE_WORLD ), "GANGS", "leanIDLE", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 295, 2580.530029, 1611.699951, 1506.170043, 180.000000, .worldid = VISAGE_WORLD ), "GRAVEYARD", "mrnF_Loop", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 296, 2579.639892, 1616.989990, 1506.170043, 180.000000, .worldid = VISAGE_WORLD ), "KISSING", "GF_StreetArgue_02", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 152, 2579.070068, 1616.910034, 1506.170043, -119.599998, .worldid = VISAGE_WORLD ), "KISSING", "gift_get", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 237, 2580.229980, 1617.060058, 1506.170043, 114.000114, .worldid = VISAGE_WORLD ), "KISSING", "gfwave2", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 164, 2593.780029, 1597.280029, 1506.170043, -53.099998, .worldid = VISAGE_WORLD ), "COP_AMBIENT", "Coplook_nod", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 163, 2593.699951, 1609.119995, 1506.170043, -130.600006, .worldid = VISAGE_WORLD ), "COP_AMBIENT", "Coplook_nod", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 147, 2607.714111, 1569.374145, 1508.349975, 167.800003, .worldid = VISAGE_WORLD ), "CASINO", "manwind", 4.1, 1, 1, 1, 1, 0 );
|
||||
ApplyDynamicActorAnimation( CreateDynamicActor( 40, 2659.269775, 1591.528442, 1506.180053, -122.499618, .worldid = VISAGE_WORLD ), "GANGS", "invite_NO", 4.1, 1, 1, 1, 1, 0 );
|
||||
}
|
||||
|
||||
stock IsPlayerInHighRoller( playerid )
|
||||
{
|
||||
if ( ! IsPlayerInCasino( playerid ) ) return false;
|
||||
return IsPlayerInArea( playerid, 2545.383056, 2592.488037, 1569.796997, 1651.173950 );
|
||||
}
|
1131
gamemodes/irresistible/features/visage/fireworks.pwn
Normal file
1131
gamemodes/irresistible/features/visage/fireworks.pwn
Normal file
File diff suppressed because it is too large
Load Diff
2662
gamemodes/irresistible/features/visage/poker.pwn
Normal file
2662
gamemodes/irresistible/features/visage/poker.pwn
Normal file
File diff suppressed because it is too large
Load Diff
924
gamemodes/irresistible/features/visage/roulette.pwn
Normal file
924
gamemodes/irresistible/features/visage/roulette.pwn
Normal file
@ -0,0 +1,924 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: roulette.inc
|
||||
* Purpose: roulette implementation in SA-MP
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Error checking ** */
|
||||
#if !defined __irresistible_servervars
|
||||
#error "You need server variables enabled to track betting."
|
||||
#endif
|
||||
|
||||
/*#if !defined _merrandom_included
|
||||
#define MRandom random
|
||||
#endif*/
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_ROULETTE_TABLES 30
|
||||
|
||||
/* ** Macros ** */
|
||||
#define IsPlayerOnRoulette(%0) (p_RouletteTable[%0]!=-1)
|
||||
#define IsRedRouletteNumber(%0) (%0 == 1 || %0 == 3 || %0 == 5 || %0 == 7 || %0 == 9 || %0 == 12 || %0 == 14 || %0 == 16 || %0 == 18 || %0 == 19 || %0 == 21 || %0 == 23 || %0 == 25 || %0 == 27 || %0 == 30 || %0 == 32 || %0 == 34 || %0 == 36)
|
||||
|
||||
/* ** Constants ** */
|
||||
enum E_ROULETTE_OFFSET_DATA
|
||||
{
|
||||
E_VALUE, Float: E_OFFSET, Float: E_ANGLE
|
||||
};
|
||||
|
||||
static const
|
||||
Float: g_rouletteOffsets[ ] [ E_ROULETTE_OFFSET_DATA ] = {
|
||||
|
||||
{ 0, 0.6, 85.0 }, // 0
|
||||
|
||||
// 1, 2, 3
|
||||
{ 1, 0.50, 110.0 }, { 2, 0.44, 85.0 }, { 3, 0.55, 55.0 },
|
||||
|
||||
// 4, 5, 6
|
||||
{ 4, 0.31, 120.0 }, { 5, 0.3, 75.0 }, { 6, 0.43, 40.0 },
|
||||
|
||||
// 7, 8, 9
|
||||
{ 7, 0.20, 147.0 }, { 8, 0.13, 55.0 }, { 9, 0.32, 18.0 },
|
||||
|
||||
// 10, 11, 12
|
||||
{ 10, 0.17, 195.0 }, { 11, 0.08, -25.0 }, { 12, 0.32, -10.0 },
|
||||
|
||||
// 13, 14, 15
|
||||
{ 13, 0.25, 230.0 }, { 14, 0.22, -70.0 }, { 15, 0.38, -33.0 },
|
||||
|
||||
// 16, 17, 18
|
||||
{ 16, 0.39, 244.0 }, { 17, -0.35, 103.0 }, { 18, 0.48, -48.0 },
|
||||
|
||||
// 19, 20, 21
|
||||
{ 19, 0.53, 251.0 }, { 20, 0.51, 278.0 }, { 21, 0.6, -58.0 },
|
||||
|
||||
// 22, 23, 24
|
||||
{ 22, 0.68, 256.0 }, { 23, 0.66, 276.0 }, { 24, 0.73, 295.0 },
|
||||
|
||||
// 25, 26, 27
|
||||
{ 25, 0.82, 259.0 }, { 26, 0.81, 275.0 }, { 27, 0.87, 292.0 },
|
||||
|
||||
// 28, 29, 30
|
||||
{ 28, 0.97, 261.0 }, { 29, 0.96, 275.0 }, { 30, 1.01, 289.0 },
|
||||
|
||||
// 31, 32, 33
|
||||
{ 31, 1.12, 264.0 }, { 32, 1.12, 274.0 }, { 33, 1.17, 286.0 },
|
||||
|
||||
// 34, 35, 36
|
||||
{ 34, 1.28, 264.0 }, { 35, 1.27, 274.0 }, { 36, 1.31, 284.0 },
|
||||
|
||||
// 3to1, 3to1, 3to1
|
||||
{ 3211, 1.43, 264.0 }, { 3212, 1.42, 273.0 }, { 3213, 1.45, 283.0 },
|
||||
|
||||
// 1-18, even, 1st to 12
|
||||
{ 118, 0.73, 152.0 },{ 222, 0.65, 178.0 }, { 112, 0.46, 153.0 },
|
||||
|
||||
// red, black, 2nd 12
|
||||
{ 88, 0.7, 202.0 }, { 44, 0.87, 222.0 }, { 212, 0.59, 227.0 },
|
||||
|
||||
// odd, 19 to 36, 3rd 12
|
||||
{ 333, 1.09, 233.0 }, { 1936, 1.35, 241.0 },{ 312, 1.12, 249.0 }
|
||||
}
|
||||
;
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_ROULETTE_DATA
|
||||
{
|
||||
E_OBJECT, E_SPINNER_OBJECT, E_SPINNING_TIMER,
|
||||
bool: E_NO_MORE_BETS, E_WORLD, E_ACTOR,
|
||||
|
||||
E_MAX_BET,
|
||||
|
||||
Float: E_X, Float: E_Y, Float: E_Z,
|
||||
Float: E_ROTATION
|
||||
};
|
||||
|
||||
|
||||
new
|
||||
g_rouletteTableData [ MAX_ROULETTE_TABLES ] [ E_ROULETTE_DATA ],
|
||||
Iterator: roulettetables < MAX_ROULETTE_TABLES >,
|
||||
|
||||
Text: g_rouletteNumberBG [ MAX_ROULETTE_TABLES ],
|
||||
Text: g_rouletteNumberTD [ MAX_ROULETTE_TABLES ],
|
||||
|
||||
g_rouletteChipColor [ MAX_PLAYERS ],
|
||||
g_rouletteChip [ MAX_PLAYERS ] [ 2 ] [ sizeof( g_rouletteOffsets ) ],
|
||||
g_rouletteChipValue [ MAX_PLAYERS ] [ sizeof( g_rouletteOffsets ) ],
|
||||
Text3D: g_rouletteChipLabel [ MAX_PLAYERS ] [ sizeof( g_rouletteOffsets ) ],
|
||||
p_rouletteBetValue [ MAX_PLAYERS ],
|
||||
|
||||
p_RouletteMarkerTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_RouletteMarker [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_RouletteTable [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_RouletteMarkerColumn [ MAX_PLAYERS char ],
|
||||
bool: p_rouletteBetLocked [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
public OnRouletteWheelStop( rouletteid, winner );
|
||||
public OnSpinRouletteTable( rouletteid, elapsed, steps );
|
||||
public OnRouletteMarkerUpdate( playerid );
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
// server variables
|
||||
AddServerVariable( "roulette_bets", "0.0", GLOBAL_VARTYPE_FLOAT );
|
||||
AddServerVariable( "roulette_wins", "0.0", GLOBAL_VARTYPE_FLOAT );
|
||||
|
||||
// create roulette tables
|
||||
CreateRouletteTable( 2242.36719, 1589.18750, 1006.22662, -90.0000, 82 );
|
||||
CreateRouletteTable( 2242.36719, 1594.75781, 1006.22662, 90.00000, 82 );
|
||||
CreateRouletteTable( 2230.57031, 1589.18750, 1006.22662, -90.0000, 82 );
|
||||
CreateRouletteTable( 2230.57031, 1594.75781, 1006.22662, 90.00000, 82 );
|
||||
CreateRouletteTable( 2230.57031, 1614.59375, 1006.22662, -90.0000, 82 );
|
||||
CreateRouletteTable( 2230.57031, 1619.65625, 1006.22662, 90.00000, 82 );
|
||||
CreateRouletteTable( 2241.44531, 1614.55469, 1006.22662, -90.0000, 82 );
|
||||
CreateRouletteTable( 2241.44531, 1619.60938, 1006.22662, 90.00000, 82 );
|
||||
CreateRouletteTable( 1963.71094, 1025.69531, 992.507810, 0.000000, 23 );
|
||||
CreateRouletteTable( 1959.39844, 1025.69531, 992.507810, 0.000000, 23 );
|
||||
CreateRouletteTable( 1963.71094, 1010.11719, 992.507810, 0.000000, 23 );
|
||||
CreateRouletteTable( 1959.39844, 1010.11719, 992.507810, 0.000000, 23 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid )
|
||||
{
|
||||
for ( new i = 0; i < sizeof( g_rouletteOffsets ); i ++ ) {
|
||||
g_rouletteChip[ playerid ] [ 0 ] [ i ] = -1;
|
||||
g_rouletteChip[ playerid ] [ 1 ] [ i ] = -1;
|
||||
g_rouletteChipLabel[ playerid ] [ i ] = Text3D: INVALID_3DTEXT_ID;
|
||||
g_rouletteChipValue[ playerid ] [ i ] = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
RemovePlayerFromRoulette( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
#endif
|
||||
{
|
||||
RemovePlayerFromRoulette( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
{
|
||||
static
|
||||
Float: X, Float: Y, Float: Z, Float: Angle;
|
||||
|
||||
if ( IsPlayerInCasino( playerid ) )
|
||||
{
|
||||
// Roulette
|
||||
if ( p_RouletteMarkerTimer[ playerid ] != -1 )
|
||||
{
|
||||
new
|
||||
rouletteid = p_RouletteTable[ playerid ];
|
||||
|
||||
if ( ! Iter_Contains( roulettetables, rouletteid ) )
|
||||
return SendServerMessage( playerid, "Invalid Roulette Table." );
|
||||
|
||||
if ( GetDistanceFromPlayerSquared( playerid, g_rouletteTableData[ rouletteid ] [ E_X ], g_rouletteTableData[ rouletteid ] [ E_Y ], g_rouletteTableData[ rouletteid ] [ E_Z ] ) > 16.0 ) // Squared
|
||||
return RemovePlayerFromRoulette( playerid );
|
||||
|
||||
// confirm bet
|
||||
if ( PRESSED( KEY_SPRINT ) )
|
||||
{
|
||||
if ( g_rouletteTableData[ rouletteid ] [ E_NO_MORE_BETS ] )
|
||||
return SendError( playerid, "This roulette table must finish its spin before you can bet again." );
|
||||
|
||||
if ( p_rouletteBetLocked{ playerid } )
|
||||
return SendError( playerid, "You have already locked in your bet. Wait for the spin to finish." );
|
||||
|
||||
new
|
||||
totalBet = GetPlayerTotalRouletteBet( playerid );
|
||||
|
||||
if ( totalBet <= 0 )
|
||||
return SendError( playerid, "You cannot spin the roulette without having placed any bets." );
|
||||
|
||||
if ( totalBet > GetPlayerCash( playerid ) )
|
||||
return SendError( playerid, "You do not have enough money to make this bet." );
|
||||
|
||||
// deduct money
|
||||
GivePlayerCash( playerid, -totalBet );
|
||||
|
||||
// lock the player in
|
||||
p_rouletteBetLocked{ playerid } = true;
|
||||
|
||||
if ( g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] == -1 )
|
||||
{
|
||||
// randomize string
|
||||
GenerateRandomRouletteNumber( rouletteid );
|
||||
|
||||
foreach (new i : Player) if ( p_RouletteTable[ i ] == rouletteid )
|
||||
{
|
||||
PlayerPlaySound( i, 33400, 0.0, 0.0, 0.0 );
|
||||
TextDrawShowForPlayer( i, g_rouletteNumberBG[ rouletteid ] );
|
||||
TextDrawShowForPlayer( i, g_rouletteNumberTD[ rouletteid ] );
|
||||
|
||||
if ( ! p_rouletteBetLocked{ i } ) {
|
||||
SendServerMessage( i, "%s(%d) has waged %s with this spin, press SPACE to join the spin!", ReturnPlayerName( playerid ), playerid, number_format( totalBet ) );
|
||||
}
|
||||
}
|
||||
|
||||
// animation
|
||||
ApplyDynamicActorAnimation( g_rouletteTableData[ rouletteid ] [ E_ACTOR ], "CASINO", "roulette_bet", 4.1, 0, 0, 0, 0, 0 );
|
||||
ApplyDynamicActorAnimation( g_rouletteTableData[ rouletteid ] [ E_ACTOR ], "CASINO", "roulette_bet", 4.1, 0, 0, 0, 0, 0 );
|
||||
|
||||
// allow bets
|
||||
g_rouletteTableData[ rouletteid ] [ E_NO_MORE_BETS ] = false;
|
||||
|
||||
// fire the spin table
|
||||
KillTimer( g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] );
|
||||
g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] = SetTimerEx( "OnSpinRouletteTable", 25, false, "ddd", rouletteid, 0, 1 );
|
||||
|
||||
// inform other players
|
||||
SendServerMessage( playerid, "You have begun the spin with a wager of %s. Good luck!", number_format( totalBet ) );
|
||||
}
|
||||
else SendServerMessage( playerid, "You have joined the spin. Good luck!" );
|
||||
}
|
||||
// decrease bet
|
||||
if ( PRESSED( KEY_WALK ) )
|
||||
{
|
||||
if ( ( p_rouletteBetValue[ playerid ] /= 2 ) < 1000 )
|
||||
p_rouletteBetValue[ playerid ] = 1000;
|
||||
|
||||
SendServerMessage( playerid, "You are now betting %s, gamble responsibly!", number_format( p_rouletteBetValue[ playerid ] ) );
|
||||
}
|
||||
|
||||
// increase bet
|
||||
if ( PRESSED( KEY_JUMP ) )
|
||||
{
|
||||
if ( ( p_rouletteBetValue[ playerid ] *= 2 ) > g_rouletteTableData[ rouletteid ] [ E_MAX_BET ] )
|
||||
p_rouletteBetValue[ playerid ] = g_rouletteTableData[ rouletteid ] [ E_MAX_BET ];
|
||||
|
||||
SendServerMessage( playerid, "You are now betting %s, gamble responsibly!", number_format( p_rouletteBetValue[ playerid ] ) );
|
||||
}
|
||||
|
||||
// Cancel Bets
|
||||
if ( PRESSED( KEY_CROUCH ) )
|
||||
{
|
||||
if ( p_rouletteBetLocked{ playerid } )
|
||||
return SendError( playerid, "You cannot cancel your bet once you have entered a spin." );
|
||||
|
||||
for ( new column = 0; column < sizeof( g_rouletteOffsets ); column ++ )
|
||||
{
|
||||
g_rouletteChipValue[ playerid ] [ column ] = 0;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 0 ] [ column ] ), g_rouletteChip[ playerid ] [ 0 ] [ column ] = -1;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 1 ] [ column ] ), g_rouletteChip[ playerid ] [ 1 ] [ column ] = -1;
|
||||
DestroyDynamic3DTextLabel( g_rouletteChipLabel[ playerid ] [ column ] ), g_rouletteChipLabel[ playerid ] [ column ] = Text3D: INVALID_3DTEXT_ID;
|
||||
}
|
||||
}
|
||||
|
||||
// Place bet
|
||||
if ( PRESSED( KEY_FIRE ) || PRESSED( KEY_AIM ) )
|
||||
{
|
||||
if ( p_rouletteBetLocked{ playerid } )
|
||||
return SendError( playerid, "You cannot change your bet once you have entered a spin." );
|
||||
|
||||
new
|
||||
column = p_RouletteMarkerColumn{ playerid };
|
||||
|
||||
new Float: offsetX = g_rouletteTableData[ rouletteid ] [ E_X ] + g_rouletteOffsets[ column ] [ E_OFFSET ] * floatcos( g_rouletteTableData[ rouletteid ] [ E_ROTATION ] + g_rouletteOffsets[ column ] [ E_ANGLE ], degrees );
|
||||
new Float: offsetY = g_rouletteTableData[ rouletteid ] [ E_Y ] + g_rouletteOffsets[ column ] [ E_OFFSET ] * floatsin( g_rouletteTableData[ rouletteid ] [ E_ROTATION ] + g_rouletteOffsets[ column ] [ E_ANGLE ], degrees );
|
||||
|
||||
if ( PRESSED( KEY_FIRE ) )
|
||||
{
|
||||
new
|
||||
totalBet = GetPlayerTotalRouletteBet( playerid );
|
||||
|
||||
// Check if the player has even money
|
||||
if ( totalBet > GetPlayerCash( playerid ) ) {
|
||||
return SendError( playerid, "You cannot afford to wager any more money!" );
|
||||
}
|
||||
|
||||
// Exceeded The Maximum
|
||||
if ( totalBet + p_rouletteBetValue[ playerid ] > g_rouletteTableData[ rouletteid ] [ E_MAX_BET ] ) {
|
||||
return SendError( playerid, "You are only allowed to bet a total of %s per spin on this table.", number_format( g_rouletteTableData[ rouletteid ] [ E_MAX_BET ] ) );
|
||||
}
|
||||
|
||||
PlayerPlaySound( playerid, 1083, 0.0, 0.0, 5.0 );
|
||||
g_rouletteChipValue[ playerid ] [ column ] += p_rouletteBetValue[ playerid ];
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerPlaySound( playerid, 1084, 0.0, 0.0, 5.0 );
|
||||
g_rouletteChipValue[ playerid ] [ column ] -= p_rouletteBetValue[ playerid ];
|
||||
}
|
||||
|
||||
//printf("COLUMN : %d", column);
|
||||
if ( g_rouletteChipValue[ playerid ] [ column ] <= 0 )
|
||||
{
|
||||
DestroyDynamic3DTextLabel( g_rouletteChipLabel[ playerid ] [ column ] ), g_rouletteChipLabel[ playerid ] [ column ] = Text3D: -1;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 0 ] [ column ] ), g_rouletteChip[ playerid ] [ 0 ] [ column ] = -1;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 1 ] [ column ] ), g_rouletteChip[ playerid ] [ 1 ] [ column ] = -1;
|
||||
g_rouletteChipValue[ playerid ] [ column ] = 0;
|
||||
//printf("removed");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Calculate chip height
|
||||
new Float: height = 0.295 - float( g_rouletteChipValue[ playerid ] [ column ] / 1000 ) * 0.005;
|
||||
|
||||
// readjust max height
|
||||
if ( height < 0.18 ) height = 0.18;
|
||||
|
||||
// store color
|
||||
new color = ( g_rouletteChipColor[ playerid ] >> 8 ) | 0x99000000;
|
||||
|
||||
//printf("g_rouletteChip[%s][%d] = %d", ReturnPlayerName( playerid ), column, g_rouletteChip[ playerid ] [ column ] );
|
||||
if ( g_rouletteChip[ playerid ] [ 0 ] [ column ] == -1 )
|
||||
{
|
||||
g_rouletteChip[ playerid ] [ 0 ] [ column ] = CreateDynamicObject( 1902, offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - height, 0.0, 0.0, 0.0, .worldid = g_rouletteTableData[ rouletteid ] [ E_WORLD ], .priority = 9999 );
|
||||
SetDynamicObjectMaterialText( g_rouletteChip[ playerid ] [ 0 ] [ column ], 0, " ", .backcolor = color );
|
||||
g_rouletteChip[ playerid ] [ 1 ] [ column ] = CreateDynamicObject(1905, offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - height + 0.125, 0.0, 0.0, 0.0, .worldid = g_rouletteTableData[ rouletteid ] [ E_WORLD ], .priority = 9999);
|
||||
SetDynamicObjectMaterialText( g_rouletteChip[ playerid ] [ 1 ] [ column ], 0, ConvertRouletteChipValue( g_rouletteChipValue[ playerid ] [ column ] ), 50, "Arial", 44, 1, color, -1, 1 );
|
||||
g_rouletteChipLabel[ playerid ] [ column ] = CreateDynamic3DTextLabel( sprintf( "%s", number_format( g_rouletteChipValue[ playerid ] [ column ] ) ), g_rouletteChipColor[ playerid ], offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - 0.15 + ( float( playerid ) / 100 ), 5.0 ); //INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, playerid );
|
||||
//printf("(%s) CREATED CHIP %d:%d", ReturnPlayerName( playerid ), g_rouletteChip[ playerid ] [ column ], _: g_rouletteChipLabel[ playerid ] [ column ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDynamicObjectMaterialText( g_rouletteChip[ playerid ] [ 1 ] [ column ], 0, ConvertRouletteChipValue( g_rouletteChipValue[ playerid ] [ column ] ), 50, "Arial", 44, 1, color, -1, 1 );
|
||||
SetDynamicObjectPos( g_rouletteChip[ playerid ] [ 0 ] [ column ], offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - height );
|
||||
SetDynamicObjectPos( g_rouletteChip[ playerid ] [ 1 ] [ column ], offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - height + 0.125 );
|
||||
UpdateDynamic3DTextLabelText( g_rouletteChipLabel[ playerid ] [ column ], g_rouletteChipColor[ playerid ], sprintf( "%s", number_format( g_rouletteChipValue[ playerid ] [ column ] ) ) );
|
||||
//printf("(%s) UPDATED CHIP %d:%d", ReturnPlayerName( playerid ), g_rouletteChip[ playerid ] [ column ], _: g_rouletteChipLabel[ playerid ] [ column ] );
|
||||
}
|
||||
}
|
||||
|
||||
// sometimes it doesnt show up
|
||||
// SyncObject( playerid, 0.005, 0.005, 0.005 );
|
||||
Streamer_Update( playerid );
|
||||
ApplyAnimation( playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( PRESSED( KEY_SECONDARY_ATTACK ) )
|
||||
{
|
||||
if ( p_rouletteBetLocked{ playerid } )
|
||||
return SendError( playerid, "Please wait until the spin is completed before leaving the table." );
|
||||
|
||||
if ( p_RouletteTable[ playerid ] != -1 )
|
||||
return RemovePlayerFromRoulette( playerid );
|
||||
|
||||
foreach(new id : roulettetables) if ( GetPlayerVirtualWorld( playerid ) == g_rouletteTableData[ id ] [ E_WORLD ] )
|
||||
{
|
||||
if ( IsPlayerInRangeOfPoint( playerid, 3.1, g_rouletteTableData[ id ] [ E_X ], g_rouletteTableData[ id ] [ E_Y ], g_rouletteTableData[ id ] [ E_Z ] ) ) {
|
||||
|
||||
static
|
||||
Float: lookatX, Float: lookatY, Float: lookatZ,
|
||||
Float: tmpX, Float: tmpY, Float: tmpZ
|
||||
;
|
||||
|
||||
GetPlayerCameraPos( playerid, X, Y, Z );
|
||||
GetPlayerCameraFrontVector( playerid, lookatX, lookatY, lookatZ );
|
||||
|
||||
tmpX = g_rouletteTableData[ id ] [ E_X ] + -1.8 * floatcos( g_rouletteTableData[ id ] [ E_ROTATION ] + 74.0, degrees );
|
||||
tmpY = g_rouletteTableData[ id ] [ E_Y ] + -1.8 * floatsin( g_rouletteTableData[ id ] [ E_ROTATION ] + 74.0, degrees );
|
||||
tmpZ = g_rouletteTableData[ id ] [ E_Z ] + 1.7;
|
||||
|
||||
InterpolateCameraPos( playerid, X, Y, Z, tmpX, tmpY, tmpZ, 1000, CAMERA_MOVE );
|
||||
|
||||
X += floatmul( lookatX, 20.0 );
|
||||
Y += floatmul( lookatY, 20.0 );
|
||||
Z += floatmul( lookatZ, 20.0 );
|
||||
|
||||
InterpolateCameraLookAt( playerid, X, Y, Z, g_rouletteTableData[ id ] [ E_X ], g_rouletteTableData[ id ] [ E_Y ], g_rouletteTableData[ id ] [ E_Z ] - 1.0, 1000, CAMERA_MOVE );
|
||||
|
||||
p_RouletteTable[ playerid ] = id;
|
||||
p_RouletteMarkerColumn{ playerid } = 0;
|
||||
|
||||
new Float: offsetX = g_rouletteOffsets[ 0 ] [ E_OFFSET ] * floatcos( Angle + g_rouletteOffsets[ 0 ] [ E_ANGLE ], degrees );
|
||||
new Float: offsetY = g_rouletteOffsets[ 0 ] [ E_OFFSET ] * floatsin( Angle + g_rouletteOffsets[ 0 ] [ E_ANGLE ], degrees );
|
||||
DestroyDynamicObject( p_RouletteMarker[ playerid ] );
|
||||
p_RouletteMarker[ playerid ] = CreateDynamicObject( 2992, X + offsetX, Y + offsetY, Z - 0.17, 0.00000, 0.00000, 0.0, .worldid = g_rouletteTableData[ id ] [ E_WORLD ], .playerid = playerid, .priority = 9999, .drawdistance = 10.0, .streamdistance = 12.0 );
|
||||
|
||||
// starting bet
|
||||
p_rouletteBetValue[ playerid ] = 1000;
|
||||
g_rouletteChipColor[ playerid ] = makeColor( RandomEx( 128, 255 ), RandomEx( 128, 255 ), RandomEx( 128, 255 ), 0xFF );
|
||||
SendServerMessage( playerid, "Your starting bet is $1,000 for this table. {%06x}This is your chip color.", g_rouletteChipColor[ playerid ] >>> 8 );
|
||||
|
||||
ApplyAnimation( playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0, 1 );
|
||||
|
||||
szBigString = "~y~~k~~PED_SPRINT~~w~ - Spin Wheel~n~~y~~k~~PED_FIREWEAPON~/~k~~PED_LOCK_TARGET~~w~ - Place/Remove Bet~n~~y~~k~~PED_JUMPING~/~k~~SNEAK_ABOUT~~w~ - Increase/Decrease Bet~n~~y~~k~~PED_DUCK~~w~ - Cancel Bets~n~~y~~k~~VEHICLE_ENTER_EXIT~~w~ - Exit";
|
||||
ShowPlayerHelpDialog( playerid, 0, szBigString );
|
||||
|
||||
// printf("(%s) BEFORE TIMER %d", ReturnPlayerName( playerid ), p_RouletteMarkerTimer[ playerid ] );
|
||||
KillTimer( p_RouletteMarkerTimer[ playerid ] );
|
||||
p_RouletteMarkerTimer[ playerid ] = SetTimerEx( "OnRouletteMarkerUpdate", 100, true, "d", playerid );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook InitializeTextDraws( )
|
||||
{
|
||||
for ( new handle = 0; handle < MAX_ROULETTE_TABLES; handle ++ )
|
||||
{
|
||||
g_rouletteNumberBG[ handle ] = TextDrawCreate(285.000000, 23.000000, "ld_roul:roulbla");
|
||||
TextDrawBackgroundColor(g_rouletteNumberBG[ handle ], 255);
|
||||
TextDrawFont(g_rouletteNumberBG[ handle ], 4);
|
||||
TextDrawLetterSize(g_rouletteNumberBG[ handle ], 0.500000, 1.000000);
|
||||
TextDrawColor(g_rouletteNumberBG[ handle ], -1);
|
||||
TextDrawSetOutline(g_rouletteNumberBG[ handle ], 0);
|
||||
TextDrawSetProportional(g_rouletteNumberBG[ handle ], 1);
|
||||
TextDrawSetShadow(g_rouletteNumberBG[ handle ], 1);
|
||||
TextDrawUseBox(g_rouletteNumberBG[ handle ], 1);
|
||||
TextDrawBoxColor(g_rouletteNumberBG[ handle ], 255);
|
||||
TextDrawTextSize(g_rouletteNumberBG[ handle ], 60.000000, 60.000000);
|
||||
|
||||
g_rouletteNumberTD[ handle ] = TextDrawCreate(314.000000, 25.000000, "35");
|
||||
TextDrawAlignment(g_rouletteNumberTD[ handle ], 2);
|
||||
TextDrawBackgroundColor(g_rouletteNumberTD[ handle ], 255);
|
||||
TextDrawFont(g_rouletteNumberTD[ handle ], 1);
|
||||
TextDrawLetterSize(g_rouletteNumberTD[ handle ], 0.800000, 4.000000);
|
||||
TextDrawColor(g_rouletteNumberTD[ handle ], -1);
|
||||
TextDrawSetOutline(g_rouletteNumberTD[ handle ], 0);
|
||||
TextDrawSetProportional(g_rouletteNumberTD[ handle ], 1);
|
||||
TextDrawSetShadow(g_rouletteNumberTD[ handle ], 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock CreateRouletteTable( Float: X, Float: Y, Float: Z, Float: Angle, world, maxbet = 100000 )
|
||||
{
|
||||
new
|
||||
id = Iter_Free(roulettetables);
|
||||
|
||||
if ( id != ITER_NONE )
|
||||
{
|
||||
g_rouletteTableData[ id ] [ E_X ] = X;
|
||||
g_rouletteTableData[ id ] [ E_Y ] = Y;
|
||||
g_rouletteTableData[ id ] [ E_Z ] = Z;
|
||||
g_rouletteTableData[ id ] [ E_ROTATION ] = Angle;
|
||||
g_rouletteTableData[ id ] [ E_WORLD ] = world;
|
||||
g_rouletteTableData[ id ] [ E_MAX_BET ] = maxbet;
|
||||
|
||||
g_rouletteTableData[ id ] [ E_SPINNING_TIMER ] = -1;
|
||||
|
||||
g_rouletteTableData[ id ] [ E_OBJECT ] = CreateDynamicObject( 1978, X, Y, Z, 0.00000, 0.00000, Angle, .worldid = world, .priority = 9999 );
|
||||
|
||||
X += 1.365 * floatcos( Angle + 98.0, degrees );
|
||||
Y += 1.365 * floatsin( Angle + 98.0, degrees );
|
||||
|
||||
CreateDynamic3DTextLabel( sprintf( "Press ENTER To Play Roulette\n"COL_WHITE"%s Maximum", number_format( maxbet ) ), COLOR_GREY, X, Y, Z + 0.02, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, .worldid = world, .testlos = 0 );
|
||||
|
||||
new Float: a_x = g_rouletteTableData[ id ] [ E_X ] + 1.4 * floatcos( Angle + 29.0, degrees );
|
||||
new Float: a_y = g_rouletteTableData[ id ] [ E_Y ] + 1.4 * floatsin( Angle + 29.0, degrees );
|
||||
|
||||
g_rouletteTableData[ id ] [ E_ACTOR ] = CreateDynamicActor( randarg( 11, 172, 171 ), a_x, a_y, Z, Angle + 90.0 );
|
||||
SetDynamicActorInvulnerable( g_rouletteTableData[ id ] [ E_ACTOR ], true );
|
||||
SetDynamicActorVirtualWorld( g_rouletteTableData[ id ] [ E_ACTOR ], world );
|
||||
|
||||
g_rouletteTableData[ id ] [ E_SPINNER_OBJECT ] = CreateDynamicObject( 1979, X, Y, Z - 0.02, 0.00000, 0.00000, 0.0, .worldid = world, .priority = 9999 );
|
||||
Iter_Add( roulettetables, id );
|
||||
}
|
||||
else
|
||||
{
|
||||
static overflow;
|
||||
printf("[ROULETTE ERROR] Reached limit of %d roulette tables, increase to %d to fix.", MAX_ROULETTE_TABLES, MAX_ROULETTE_TABLES + ( ++ overflow ) );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock GenerateRandomRouletteNumber( rouletteid ) {
|
||||
|
||||
new
|
||||
iRandom = MRandom( 37 );
|
||||
|
||||
if ( iRandom == 0 )
|
||||
TextDrawSetString( g_rouletteNumberBG[ rouletteid ], "ld_roul:roulgre" );
|
||||
|
||||
else if ( ! IsRedRouletteNumber( iRandom ) )
|
||||
TextDrawSetString( g_rouletteNumberBG[ rouletteid ], "ld_roul:roulbla" );
|
||||
|
||||
else
|
||||
TextDrawSetString( g_rouletteNumberBG[ rouletteid ], "ld_roul:roulred" );
|
||||
|
||||
TextDrawSetString( g_rouletteNumberTD[ rouletteid ], sprintf( "%d", iRandom ) );
|
||||
return iRandom;
|
||||
}
|
||||
|
||||
public OnSpinRouletteTable( rouletteid, elapsed, steps )
|
||||
{
|
||||
new
|
||||
Float: fElapsed = float( ( elapsed += 25 ) ),
|
||||
Float: rotation = -0.0001 * ( fElapsed * fElapsed ) + 0.8162 * fElapsed
|
||||
;
|
||||
|
||||
// update it every 50 ms
|
||||
if ( elapsed % 50 == 0 && elapsed != 4000 )
|
||||
GenerateRandomRouletteNumber( rouletteid );
|
||||
|
||||
SetDynamicObjectRot( g_rouletteTableData[ rouletteid ] [ E_SPINNER_OBJECT ], 0.0, 0.0, rotation );
|
||||
|
||||
if ( elapsed >= 3250 )
|
||||
g_rouletteTableData[ rouletteid ] [ E_NO_MORE_BETS ] = true;
|
||||
|
||||
if ( elapsed >= 4000 )
|
||||
{
|
||||
new
|
||||
iWinning = GenerateRandomRouletteNumber( rouletteid );
|
||||
|
||||
// play noise
|
||||
foreach (new i : Player) if ( p_RouletteTable[ i ] == rouletteid ) {
|
||||
PlayerPlaySound( i, randarg( 33401, 33402, 33403 ), 0.0, 0.0, 0.0 );
|
||||
}
|
||||
|
||||
// Kill the timer just incase
|
||||
KillTimer( g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] );
|
||||
g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] = -1;
|
||||
g_rouletteTableData[ rouletteid ] [ E_NO_MORE_BETS ] = false;
|
||||
|
||||
// Call a win
|
||||
CallLocalFunction( "OnRouletteWheelStop", "dd", rouletteid, iWinning );
|
||||
return 1;
|
||||
}
|
||||
|
||||
return ( g_rouletteTableData[ rouletteid ] [ E_SPINNING_TIMER ] = SetTimerEx( "OnSpinRouletteTable", 25, false, "ddd", rouletteid, elapsed, steps ) );
|
||||
}
|
||||
|
||||
stock GetPlayerTotalRouletteBet( playerid ) {
|
||||
new
|
||||
bet = 0;
|
||||
|
||||
for ( new chipid = 0; chipid < sizeof( g_rouletteChipValue[ ] ); chipid ++ ) if ( g_rouletteChipValue[ playerid ] [ chipid ] >= 100 ) {
|
||||
bet += g_rouletteChipValue[ playerid ] [ chipid ];
|
||||
}
|
||||
return bet;
|
||||
}
|
||||
|
||||
public OnRouletteWheelStop( rouletteid, winner )
|
||||
{
|
||||
new
|
||||
globalWaged = 0, globalWon = 0;
|
||||
|
||||
// printf ( "OnRouletteWheelStop( %d, %d )", rouletteid, winner );
|
||||
foreach(new playerid : Player) if ( p_RouletteTable[ playerid ] == rouletteid && p_rouletteBetLocked{ playerid } )
|
||||
{
|
||||
new
|
||||
waged = 0, won = 0;
|
||||
|
||||
for( new chipid = 0; chipid < sizeof( g_rouletteOffsets ); chipid ++ ) if ( g_rouletteChipValue[ playerid ] [ chipid ] > 0 )
|
||||
{
|
||||
// store chip value here
|
||||
new
|
||||
beforeWin = won,
|
||||
winValue = g_rouletteChipValue[ playerid ] [ chipid ];
|
||||
|
||||
// increment the amount waged
|
||||
waged += g_rouletteChipValue[ playerid ] [ chipid ];
|
||||
|
||||
// calculate wins
|
||||
switch ( g_rouletteOffsets[ chipid ] [ E_VALUE ] )
|
||||
{
|
||||
// 1st 3to1
|
||||
case 3211: {
|
||||
if ( winner == 1 || winner == 4 || winner == 7 || winner == 10 || winner == 13 || winner == 16 || winner == 19 || winner == 22 || winner == 25 || winner == 28 || winner == 31 || winner == 34 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// 2nd 3to1
|
||||
case 3212: {
|
||||
if ( winner == 2 || winner == 5 || winner == 8 || winner == 11 || winner == 14 || winner == 17 || winner == 20 || winner == 23 || winner == 26 || winner == 29 || winner == 32 || winner == 35 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// 2nd 3to1
|
||||
case 3213: {
|
||||
if ( winner == 3 || winner == 6 || winner == 9 || winner == 12 || winner == 15 || winner == 18 || winner == 21 || winner == 24 || winner == 27 || winner == 30 || winner == 33 || winner == 36 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// 1st 18
|
||||
case 118: {
|
||||
if ( 1 <= winner <= 18 )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// even
|
||||
case 222: {
|
||||
if ( winner % 2 == 0 )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// 1st to 12
|
||||
case 112: {
|
||||
if ( 1 <= winner <= 12 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// black
|
||||
case 44: {
|
||||
if ( ! IsRedRouletteNumber( winner ) && winner != 0 )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// red
|
||||
case 88: {
|
||||
if ( IsRedRouletteNumber( winner ) )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// 2nd 12
|
||||
case 212: {
|
||||
if ( 13 <= winner <= 24 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// odd
|
||||
case 333: {
|
||||
if ( winner % 2 == 1 && winner != 0 )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// 19-36
|
||||
case 1936: {
|
||||
if ( 19 <= winner <= 36 )
|
||||
won += winValue * 2;
|
||||
}
|
||||
|
||||
// 3rd 12
|
||||
case 312: {
|
||||
if ( 25 <= winner <= 36 )
|
||||
won += winValue * 3;
|
||||
}
|
||||
|
||||
// check if its a single
|
||||
default:
|
||||
{
|
||||
if ( winner == g_rouletteOffsets[ chipid ] [ E_VALUE ] )
|
||||
won += winValue * 36;
|
||||
}
|
||||
}
|
||||
|
||||
if ( beforeWin >= won ) {
|
||||
g_rouletteChipValue[ playerid ] [ chipid ] = 0;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 0 ] [ chipid ] ), g_rouletteChip[ playerid ] [ 0 ] [ chipid ] = -1;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 1 ] [ chipid ] ), g_rouletteChip[ playerid ] [ 1 ] [ chipid ] = -1;
|
||||
DestroyDynamic3DTextLabel( g_rouletteChipLabel[ playerid ] [ chipid ] ), g_rouletteChipLabel[ playerid ] [ chipid ] = Text3D: -1;
|
||||
}
|
||||
|
||||
// track
|
||||
globalWaged += waged;
|
||||
globalWon += won;
|
||||
}
|
||||
|
||||
// bet unlocked and paid
|
||||
GivePlayerCash( playerid, won );
|
||||
p_rouletteBetLocked{ playerid } = false;
|
||||
|
||||
new
|
||||
profit = won - waged;
|
||||
|
||||
// inform users
|
||||
if ( profit >= 10000 ) {
|
||||
SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from roulette!", ReturnPlayerName( playerid ), playerid, number_format( profit ) );
|
||||
}
|
||||
|
||||
// give user points
|
||||
GivePlayerCasinoRewardsPoints( playerid, waged, .house_edge = 2.7 );
|
||||
|
||||
// gametext
|
||||
if ( profit > 0 ) {
|
||||
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", number_format( profit ) ), 4000, 3 );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GREY"[ROULETTE]"COL_WHITE" You have bet a total of %s and profited %s! (winning no %d)", number_format( waged ), number_format( profit ), winner );
|
||||
} else {
|
||||
profit *= -1; // to improve the client message
|
||||
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GREY"[ROULETTE]"COL_WHITE" You have bet a total of %s and lost %s! (winning no %d)", number_format( waged ), number_format( profit ), winner );
|
||||
}
|
||||
}
|
||||
|
||||
// log wins/losses
|
||||
UpdateServerVariable( "roulette_bets", 0, GetGVarFloat( "roulette_bets" ) + ( float( globalWaged ) / 1000000.0 ), "", GLOBAL_VARTYPE_FLOAT );
|
||||
UpdateServerVariable( "roulette_wins", 0, GetGVarFloat( "roulette_wins" ) + ( float( globalWon ) / 1000000.0 ), "", GLOBAL_VARTYPE_FLOAT );
|
||||
return 1;
|
||||
}
|
||||
|
||||
public OnRouletteMarkerUpdate( playerid )
|
||||
{
|
||||
new
|
||||
rouletteid = p_RouletteTable[ playerid ], column = p_RouletteMarkerColumn{ playerid };
|
||||
|
||||
if ( rouletteid == -1 || ! Iter_Contains( roulettetables, rouletteid ) )
|
||||
return RemovePlayerFromRoulette( playerid );
|
||||
|
||||
if ( IsValidDynamicObject( p_RouletteMarker[ playerid ] ) )
|
||||
{
|
||||
new ud, lr;
|
||||
GetPlayerKeys( playerid, ud, ud, lr );
|
||||
|
||||
if ( ud == KEY_UP )
|
||||
{
|
||||
// up on 0
|
||||
if ( column == 0 )
|
||||
column = 38;
|
||||
|
||||
// up on 1,2,3
|
||||
else if ( 1 <= column <= 3 )
|
||||
column = 0;
|
||||
|
||||
// up 1st 12
|
||||
else if ( column == 42 )
|
||||
column = 48;
|
||||
|
||||
// up 3rd 12
|
||||
else if ( column == 48 )
|
||||
column = 45;
|
||||
|
||||
// up 2nd 12
|
||||
else if ( column == 45 )
|
||||
column = 42;
|
||||
|
||||
// up 1-to-18
|
||||
else if ( column == 40 )
|
||||
column = 47;
|
||||
|
||||
else if ( column == 41 || column == 44 || column == 47 )
|
||||
column --;
|
||||
|
||||
else if ( column == 43 || column == 46 )
|
||||
column -= 2;
|
||||
|
||||
else
|
||||
column -= 3;
|
||||
}
|
||||
else if ( ud == KEY_DOWN )
|
||||
{
|
||||
// pressed down on 3to1s
|
||||
if ( 36 < column < 40 )
|
||||
column = 0;
|
||||
|
||||
// down on 1st 12
|
||||
else if ( column == 42 )
|
||||
column = 45;
|
||||
|
||||
// down on 2nd 12
|
||||
else if ( column == 45 )
|
||||
column = 48;
|
||||
|
||||
// down 19-to-36
|
||||
else if ( column == 47 )
|
||||
column = 40;
|
||||
|
||||
// down on 3rd 12
|
||||
else if ( column == 48 )
|
||||
column = 42;
|
||||
|
||||
// if pressed down on zero, go to previous
|
||||
else if ( column == 0 )
|
||||
column = 2;
|
||||
|
||||
else if ( column == 40 || column == 43 || column == 46 )
|
||||
column ++;
|
||||
|
||||
else if ( column == 41 || column == 44 )
|
||||
column += 2;
|
||||
|
||||
else
|
||||
column += 3;
|
||||
}
|
||||
else if ( lr == KEY_LEFT )
|
||||
{
|
||||
// right on 0
|
||||
if ( column == 0 )
|
||||
column = 0;
|
||||
|
||||
else if ( column == 1 || column == 4 || column == 7 || column == 10 )
|
||||
column = 42;
|
||||
|
||||
else if ( column == 13 || column == 16 || column == 19 || column == 22 )
|
||||
column = 45;
|
||||
|
||||
else if ( column == 25 || column == 28 || column == 31 || column == 34 )
|
||||
column = 48;
|
||||
|
||||
// left 1 to 18
|
||||
else if ( column == 40 )
|
||||
column = 0;
|
||||
|
||||
else
|
||||
column --;
|
||||
|
||||
}
|
||||
else if ( lr == KEY_RIGHT )
|
||||
{
|
||||
// left on 0
|
||||
if ( column == 0 )
|
||||
column = 0;
|
||||
|
||||
// right 39
|
||||
if ( column == 39 )
|
||||
column = 0;
|
||||
|
||||
// right red black
|
||||
else if ( 43 <= column <= 44 )
|
||||
column = 45;
|
||||
|
||||
// right 1-18,even
|
||||
else if ( 40 <= column <= 41 )
|
||||
column = 42;
|
||||
|
||||
// right odd,19-36
|
||||
else if ( 46 <= column <= 47 )
|
||||
column = 48;
|
||||
|
||||
// right on 3rd 12
|
||||
else if ( column == 48 )
|
||||
column = 25;
|
||||
|
||||
// right on 2nd 12
|
||||
else if ( column == 45 )
|
||||
column = 13;
|
||||
|
||||
// right on 1st 12
|
||||
else if ( column == 42 )
|
||||
column = 1;
|
||||
|
||||
else
|
||||
column ++;
|
||||
}
|
||||
|
||||
// update object pos
|
||||
new Float: offsetX = g_rouletteTableData[ rouletteid ] [ E_X ] + g_rouletteOffsets[ column ] [ E_OFFSET ] * floatcos( g_rouletteTableData[ rouletteid ] [ E_ROTATION ] + g_rouletteOffsets[ column ] [ E_ANGLE ], degrees );
|
||||
new Float: offsetY = g_rouletteTableData[ rouletteid ] [ E_Y ] + g_rouletteOffsets[ column ] [ E_OFFSET ] * floatsin( g_rouletteTableData[ rouletteid ] [ E_ROTATION ] + g_rouletteOffsets[ column ] [ E_ANGLE ], degrees );
|
||||
SetDynamicObjectPos( p_RouletteMarker[ playerid ], offsetX, offsetY, g_rouletteTableData[ rouletteid ] [ E_Z ] - 0.17 );
|
||||
|
||||
// update player column
|
||||
p_RouletteMarkerColumn{ playerid } = column;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock RemovePlayerFromRoulette( playerid )
|
||||
{
|
||||
if ( ! ( 0 <= playerid < MAX_PLAYERS ) )
|
||||
return 0;
|
||||
|
||||
// remove chips
|
||||
for ( new i = 0; i < sizeof( g_rouletteOffsets ); i ++ ) {
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 0 ] [ i ] ), g_rouletteChip[ playerid ] [ 0 ] [ i ] = -1;
|
||||
DestroyDynamicObject( g_rouletteChip[ playerid ] [ 1 ] [ i ] ), g_rouletteChip[ playerid ] [ 1 ] [ i ] = -1;
|
||||
DestroyDynamic3DTextLabel( g_rouletteChipLabel[ playerid ] [ i ] ), g_rouletteChipLabel[ playerid ] [ i ] = Text3D: INVALID_3DTEXT_ID;
|
||||
g_rouletteChipValue[ playerid ] [ i ] = 0;
|
||||
}
|
||||
|
||||
// hide textdraws
|
||||
if ( p_RouletteTable[ playerid ] != -1 ) {
|
||||
TextDrawHideForPlayer( playerid, g_rouletteNumberBG[ p_RouletteTable[ playerid ] ] );
|
||||
TextDrawHideForPlayer( playerid, g_rouletteNumberTD[ p_RouletteTable[ playerid ] ] );
|
||||
}
|
||||
|
||||
// reset sound
|
||||
PlayerPlaySound( playerid, 33404, 0.0, 0.0, 0.0 );
|
||||
|
||||
// reset user variables
|
||||
HidePlayerHelpDialog( playerid );
|
||||
p_RouletteTable[ playerid ] = -1;
|
||||
p_RouletteMarkerColumn{ playerid } = 0;
|
||||
p_rouletteBetLocked{ playerid } = false;
|
||||
|
||||
// close timers
|
||||
KillTimer( p_RouletteMarkerTimer[ playerid ] ), p_RouletteMarkerTimer[ playerid ] = -1;
|
||||
DestroyDynamicObject( p_RouletteMarker[ playerid ] ), p_RouletteMarker[ playerid ] = -1;
|
||||
|
||||
// clear animations if spawned
|
||||
if ( IsPlayerSpawned( playerid ) ) {
|
||||
SetCameraBehindPlayer( playerid );
|
||||
ClearAnimations( playerid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock ConvertRouletteChipValue( value ) {
|
||||
|
||||
new
|
||||
Float: float_value = float( value ), string[ 16 ]; // $1000K
|
||||
|
||||
if ( float_value >= 1000000.0 ) {
|
||||
float_value /= 1000000.0;
|
||||
format( string, sizeof( string ), "$%0.1fM", float_value );
|
||||
} else if ( float_value >= 1000.0 ) {
|
||||
float_value /= 1000.0;
|
||||
format( string, sizeof( string ), "$%0.0fK", float_value );
|
||||
} else {
|
||||
format( string, sizeof( string ), "$%0.0f", float_value );
|
||||
}
|
||||
return string;
|
||||
}
|
355
gamemodes/irresistible/features/vote.pwn
Normal file
355
gamemodes/irresistible/features/vote.pwn
Normal file
@ -0,0 +1,355 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Cloudy
|
||||
* Module: vote.inc
|
||||
* Purpose: vote system for individuals
|
||||
*/
|
||||
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define DIALOG_VOTE_CONFIG 5671
|
||||
#define DIALOG_VOTE_QUESTION 5672
|
||||
#define DIALOG_VOTE_ADDOPTION 5673
|
||||
#define DIALOG_VOTE_EDITOPTION 5674
|
||||
|
||||
/* ** Variables ** */
|
||||
new bool: v_started;
|
||||
new v_question [ 80 ]; //// the vote question content
|
||||
new v_option [ 5 ] [ 50 ]; //// five options max
|
||||
new v_option_votes [ 5 ]; //// Stores the votes of each option.
|
||||
new v_voted [ MAX_PLAYERS ]; //// This will have the accounts ID's of the voters, to prevent voting more than once.
|
||||
|
||||
new Text: v_TD_Question;
|
||||
new Text: v_TD_Option [ 5 ];
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
ResetVoteAll( );
|
||||
LoadVotingTextdraws( );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerText( playerid, text[ ] )
|
||||
{
|
||||
if( !v_started || GetPlayerAccountID( playerid ) <= 0 ) return 1; /// no poll or player isn't logged in.
|
||||
new option;
|
||||
if( !sscanf( text, "i", option ) ) {
|
||||
if( ( 1 <= option <= 5 ) && strcmp( v_option[ option-1 ], "n/a", true ) ) {
|
||||
if( !didPlayerVote( playerid ) ) {
|
||||
new string[ 128 ];
|
||||
AddPlayerVote( playerid, option-1 );
|
||||
format( string, sizeof( string ), "{C0C0C0}[SERVER]{FFFFFF} Your vote has been added: {C0C0C0}%d", option );
|
||||
SendClientMessage( playerid, -1, string );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
#endif
|
||||
{
|
||||
HideVoteTextdrawsForPlayer( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerSpawn( playerid )
|
||||
{
|
||||
ShowVoteTextdrawsForPlayer( playerid );
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if( dialogid == DIALOG_VOTE_CONFIG && response ) {
|
||||
if( GetPlayerAdminLevel( playerid ) >= 4 ) {
|
||||
if( listitem == 0 )
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_QUESTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Set Question", "{FFFFFF}Write the question you want to vote for:", "Set", "Back" );
|
||||
else if( !strcmp( inputtext, "Add a new option", true, 16 ) )
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_ADDOPTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Add Option", "{FFFFFF}Write the option you want to add:", "Add", "Back" );
|
||||
else {
|
||||
new optionid = strval( inputtext[ 0 ] ) - 1;
|
||||
SetPVarInt( playerid, "p_VoteEditOption", optionid );
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_EDITOPTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Edit Option", "{FFFFFF}Enter the text you want to set the option to:", "Update", "Back" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if( dialogid == DIALOG_VOTE_QUESTION ) {
|
||||
if( GetPlayerAdminLevel( playerid ) >= 4 )
|
||||
return SendError( playerid, "You don't have an appropriate administration level to use this feature." );
|
||||
|
||||
if( response ) {
|
||||
if( !strlen( inputtext ) )
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_QUESTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Set Question", "{FFFFFF}Write the question you want to vote for:\n\n{FF0000}Invalid question", "Set", "Back" );
|
||||
else {
|
||||
format( v_question, sizeof( v_question ), inputtext );
|
||||
if( v_started ) updateQuestionTD( );
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if( dialogid == DIALOG_VOTE_ADDOPTION ) {
|
||||
if( GetPlayerAdminLevel( playerid ) >= 4 )
|
||||
if( response ) {
|
||||
if( v_started ) {
|
||||
SendClientMessage( playerid, -1, "{FF0000}[ERROR]{FFFFFF} You cannot edit options while poll is on." );
|
||||
ShowVoteConfig( playerid );
|
||||
return 1;
|
||||
}
|
||||
if( !strlen( inputtext ) )
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_ADDOPTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Add Option", "{FFFFFF}Write the option you want to add:\n\n{FF0000}Invalid text", "Add", "Back" );
|
||||
else {
|
||||
if( getNextOptionID( ) != -1 ) {
|
||||
format( v_option[ getNextOptionID( ) ], 50, inputtext );
|
||||
SendClientMessage(playerid, -1, "{C0C0C0}[VOTE]{FFFFFF} You've added a new option." );
|
||||
}
|
||||
else
|
||||
SendClientMessage(playerid, -1, "{FF0000}[ERROR]{FFFFFF} You can have a maximum of 5 options." );
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
}
|
||||
else if( !response )
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
|
||||
else if( dialogid == DIALOG_VOTE_EDITOPTION ) {
|
||||
if( GetPlayerAdminLevel( playerid ) >= 4 )
|
||||
if( response ) {
|
||||
if( v_started ) {
|
||||
SendClientMessage( playerid, -1, "{FF0000}[ERROR]{FFFFFF} You cannot edit options while poll is on." );
|
||||
ShowVoteConfig( playerid );
|
||||
return 1;
|
||||
}
|
||||
if( !strlen( inputtext ) )
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_EDITOPTION, DIALOG_STYLE_INPUT, "{FFFFFF}Vote Settings - Edit Option", "{FFFFFF}Enter the text you want to set the option to:\n\n{FF0000}Invalid text", "Update", "Back" );
|
||||
else {
|
||||
new optionid = GetPVarInt( playerid, "p_VoteEditOption" );
|
||||
format( v_option[ optionid ], 50, inputtext );
|
||||
SendClientMessage(playerid, -1, "{C0C0C0}[VOTE]{FFFFFF} You've updated an option." );
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
}
|
||||
else if( !response )
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock ResetVoteAll( )
|
||||
{
|
||||
v_question = "n/a";
|
||||
for( new i = 0; i < 5; i++ ) v_option[ i ] = "n/a";
|
||||
ResetVotes( );
|
||||
endVote( );
|
||||
}
|
||||
|
||||
stock ResetVotes( )
|
||||
{
|
||||
for( new i = 0; i < MAX_PLAYERS; i++ ) v_voted[ i ] = -1;
|
||||
for( new i = 0; i < 5; i++ ) v_option_votes[ i ] = 0;
|
||||
}
|
||||
|
||||
stock startVote( )
|
||||
{
|
||||
v_started = true;
|
||||
ResetVotes( );
|
||||
updateAllVote( );
|
||||
ShowVoteTextdrawsForAll( );
|
||||
}
|
||||
|
||||
stock endVote( )
|
||||
{
|
||||
HideVoteTextdrawsForAll( );
|
||||
v_started = false;
|
||||
ResetVotes( );
|
||||
}
|
||||
|
||||
stock updateOptionTD( option )
|
||||
{
|
||||
if( strcmp( v_option[ option ], "n/a" ) ) {
|
||||
new string[128];
|
||||
format(string, sizeof(string), "%i. (%d) %s", option+1, v_option_votes[ option ], v_option[ option ] );
|
||||
TextDrawSetString( v_TD_Option[ option ], string );
|
||||
}
|
||||
else TextDrawSetString( v_TD_Option[ option ], " " );
|
||||
}
|
||||
|
||||
stock updateQuestionTD( )
|
||||
{
|
||||
new question[ 80 ];
|
||||
format( question, sizeof( question ), "~y~POLL: ~w~~h~%s", v_question );
|
||||
TextDrawSetString( v_TD_Question, question );
|
||||
}
|
||||
stock updateAllVote( )
|
||||
{
|
||||
updateQuestionTD( );
|
||||
for( new i = 0; i < 5; i++ )
|
||||
updateOptionTD( i );
|
||||
}
|
||||
|
||||
stock ShowVoteConfig( playerid )
|
||||
{
|
||||
reorderOptions( );
|
||||
new finalstring[ 600 ];
|
||||
format( finalstring, sizeof( finalstring ), "{C0C0C0}QUESTION: {FFFFFF}%s\n", v_question);
|
||||
|
||||
new c_options = 0;
|
||||
for( new i = 0; i < 5; i++ ) if( strcmp( v_option[ i ], "n/a", true ) ) {
|
||||
format( finalstring, sizeof( finalstring ), "%s{C0C0C0}%i. {FFFFFF}%s\n", finalstring, i+1, v_option[ i ] );
|
||||
c_options++;
|
||||
}
|
||||
if(c_options < 5)
|
||||
format( finalstring, sizeof( finalstring ), "%s{FFFFFF}Add a new option..", finalstring );
|
||||
ShowPlayerDialog( playerid, DIALOG_VOTE_CONFIG, DIALOG_STYLE_LIST, "{FFFFFF}Vote Settings", finalstring, "Select", "Close" );
|
||||
|
||||
}
|
||||
|
||||
stock reorderOptions( ) /// This thing, is to re-order options, like if there is option 1, 2 and 3, and I remove option 2, then option 3 will come in place of option 2.
|
||||
{
|
||||
for( new i = 0; i < 5; i++ ) {
|
||||
if( i + 1 < 5 )
|
||||
if( !strcmp( v_option[ i ], "n/a" ) && strcmp( v_option[ i+1 ], "n/a" ) ) {
|
||||
v_option[ i ] = v_option[ i+1 ];
|
||||
v_option_votes[ i ] = v_option_votes[ i+1 ];
|
||||
v_option[ i+1 ] = "n/a";
|
||||
v_option_votes[ i+1 ] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock getNextOptionID( )
|
||||
{
|
||||
for( new i = 0; i < 5; i++ ) if( !strcmp( v_option[ i ], "n/a" ) ) {
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
stock didPlayerVote( playerid )
|
||||
{
|
||||
for( new i = 0; i < MAX_PLAYERS; i++ ) if( v_voted[ i ] == GetPlayerAccountID( playerid ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
stock AddPlayerVote( playerid, option )
|
||||
{
|
||||
for( new i = 0; i < MAX_PLAYERS; i++ ) {
|
||||
if( v_voted[ i ] == -1 ) {
|
||||
v_voted[ i ] = GetPlayerAccountID( playerid );
|
||||
v_option_votes[ option ]++;
|
||||
updateOptionTD( option );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock LoadVotingTextdraws( )
|
||||
{
|
||||
v_TD_Question = TextDrawCreate( 16.000000, 168.000000, "POLL: Who's the best player here?" );
|
||||
TextDrawBackgroundColor( v_TD_Question, 255 );
|
||||
TextDrawFont( v_TD_Question, 1 );
|
||||
TextDrawLetterSize( v_TD_Question, 0.200000, 1.100000 );
|
||||
TextDrawColor( v_TD_Question, -1 );
|
||||
TextDrawSetOutline( v_TD_Question, 1 );
|
||||
TextDrawSetProportional( v_TD_Question, 1 );
|
||||
TextDrawSetSelectable( v_TD_Question, 0 );
|
||||
|
||||
new Float: td_y_temp = 182.000000;
|
||||
for( new i = 0; i < 5; i++ ) {
|
||||
v_TD_Option[ i ] = TextDrawCreate( 16.000000, td_y_temp, "1. (35) Cloudy" );
|
||||
TextDrawBackgroundColor( v_TD_Option[ i ], 255 );
|
||||
TextDrawFont( v_TD_Option[ i ], 1);
|
||||
TextDrawLetterSize( v_TD_Option[ i ], 0.200000, 1.100000 );
|
||||
TextDrawColor( v_TD_Option[ i ], -1 );
|
||||
TextDrawSetOutline( v_TD_Option[ i ], 1 );
|
||||
TextDrawSetProportional( v_TD_Option[ i ], 1 );
|
||||
TextDrawSetSelectable( v_TD_Option[ i ], 0 );
|
||||
td_y_temp += 11.0;
|
||||
}
|
||||
}
|
||||
|
||||
stock ShowVoteTextdrawsForPlayer( playerid )
|
||||
{
|
||||
if( v_started ) {
|
||||
TextDrawShowForPlayer( playerid, v_TD_Question );
|
||||
for( new i = 0; i < 5; i++ ) {
|
||||
if( strcmp( v_option[ i ], "n/a" ) ) TextDrawShowForPlayer( playerid, v_TD_Option[ i ] );
|
||||
else TextDrawHideForPlayer( playerid, v_TD_Option[ i ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock HideVoteTextdrawsForPlayer( playerid )
|
||||
{
|
||||
if( v_started ) {
|
||||
TextDrawHideForPlayer( playerid, v_TD_Question );
|
||||
for( new i = 0; i < 5; i++ ) {
|
||||
TextDrawHideForPlayer( playerid, v_TD_Option[ i ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock ShowVoteTextdrawsForAll( ) {
|
||||
if( v_started ) {
|
||||
TextDrawShowForAll( v_TD_Question );
|
||||
for( new i = 0; i < 5; i++ ) {
|
||||
if( strcmp( v_option[ i ], "n/a" ) ) TextDrawShowForAll( v_TD_Option[ i ] );
|
||||
else TextDrawHideForAll( v_TD_Option[ i ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stock HideVoteTextdrawsForAll( ) {
|
||||
if( v_started ) {
|
||||
TextDrawHideForAll( v_TD_Question );
|
||||
for( new i = 0; i < 5; i++ ) TextDrawHideForAll( v_TD_Option[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* ** Commands **/
|
||||
CMD:vote( playerid, params[ ] )
|
||||
{
|
||||
if( GetPlayerAdminLevel( playerid ) < 4 )
|
||||
return SendClientMessage( playerid, -1, "{FF0000}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
|
||||
|
||||
if( !strcmp( params, "start", true, 5 ) ) {
|
||||
if( !strcmp( v_question, "n/a" ) )
|
||||
return SendClientMessage( playerid, -1, "{FF0000}[ERROR]{FFFFFF} You have not set a question for the vote." );
|
||||
|
||||
startVote( );
|
||||
new string[ 128 ];
|
||||
format( string, sizeof( string ), "{FF0770}[ADMIN]{FFFFFF} %s(%d) has started a new poll.", ReturnPlayerName( playerid ), playerid );
|
||||
SendClientMessageToAll( -1, string );
|
||||
}
|
||||
else if( !strcmp( params, "end", true, 3 ) ) {
|
||||
if( !v_started )
|
||||
return SendClientMessage( playerid, -1, "{FF0000}[ERROR]{FFFFFF} There are no poll to end." );
|
||||
|
||||
endVote( );
|
||||
new string[ 128 ];
|
||||
format( string, sizeof( string ), "{FF0770}[ADMIN]{FFFFFF} %s(%d) has ended the poll.", ReturnPlayerName( playerid ), playerid );
|
||||
SendClientMessageToAll( -1, string );
|
||||
}
|
||||
else if( !strcmp( params, "reset", true, 5 ) ) {
|
||||
if( v_started ) SendClientMessageToAll( -1, sprintf( "{FF0770}[ADMIN]{FFFFFF} %s(%d) has ended the poll.", ReturnPlayerName( playerid ), playerid ) );
|
||||
ResetVoteAll();
|
||||
SendClientMessage( playerid, -1, "{C0C0C0}[VOTE]{FFFFFF} You have reset vote parameters." );
|
||||
}
|
||||
else if( !strcmp( params, "config", true, 6 ) ) {
|
||||
ShowVoteConfig( playerid );
|
||||
}
|
||||
else SendUsage( playerid, "/vote [RESET/START/END/CONFIG]" );
|
||||
return 1;
|
||||
}
|
197
gamemodes/irresistible/features/weapon_drop.pwn
Normal file
197
gamemodes/irresistible/features/weapon_drop.pwn
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc_
|
||||
* Module: weapon_drop.inc
|
||||
* Purpose: weapon drop system for players
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Error Handling ** */
|
||||
#if !defined __WEAPONDAMAGEINC__
|
||||
#error "This module requires weapon data functions"
|
||||
#endif
|
||||
|
||||
#define WEAPON_DROP_ENABLED
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define MAX_WEAPON_DROPS ( 50 )
|
||||
|
||||
#define WEAPON_HEALTH ( 100 )
|
||||
#define WEAPON_ARMOUR ( 101 )
|
||||
|
||||
/* ** Variables ** */
|
||||
enum E_WEAPONDROP_DATA {
|
||||
E_WEAPON_ID, E_AMMO, E_PICKUP,
|
||||
E_EXPIRE_TIMESTAMP, E_SLOT_ID
|
||||
};
|
||||
|
||||
static g_weaponDropData [ MAX_WEAPON_DROPS ] [ E_WEAPONDROP_DATA ];
|
||||
static Iterator: weapondrop < MAX_WEAPON_DROPS >;
|
||||
|
||||
static const g_rankHealthPayout[ ] = { 100, 75, 50, 45, 40, 35, 30, 25, 20, 15, 10 };
|
||||
|
||||
static g_HealthPickup;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
g_HealthPickup = CreateDynamicPickup( 1240, 3, -1980.3679, 884.4898, 45.2031 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
||||
#else
|
||||
hook OnPlayerDeath( playerid, killerid, reason )
|
||||
#endif
|
||||
{
|
||||
static
|
||||
Float: X, Float: Y, Float: Z;
|
||||
|
||||
if ( IsPlayerConnected( killerid ) && ! IsPlayerNPC( killerid ) )
|
||||
{
|
||||
if ( IsPlayerJailed( playerid ) || IsPlayerInPaintBall( playerid ) || IsPlayerInEvent( playerid ) || IsPlayerDueling( playerid ) )
|
||||
return 1;
|
||||
|
||||
GetPlayerPos( playerid, X, Y, Z );
|
||||
|
||||
|
||||
new
|
||||
killer_rank = GetPlayerRank( killerid ),
|
||||
expire_time = gettime( ) + 180;
|
||||
|
||||
for ( new slotid = 0; slotid < 13; slotid++ )
|
||||
{
|
||||
new
|
||||
weaponid,
|
||||
ammo;
|
||||
|
||||
GetPlayerWeaponData( playerid, slotid, weaponid, ammo );
|
||||
|
||||
// third of what player had
|
||||
ammo /= 10;
|
||||
|
||||
// check valid parameters and shit
|
||||
if ( weaponid != 0 && 1 < ammo < 5000 && ! IsWeaponBanned( weaponid ) ) {
|
||||
CreateWeaponPickup( weaponid, ammo, slotid, X + fRandomEx( 0.5, 3.0 ), Y + fRandomEx( 0.5, 3.0 ), Z, expire_time );
|
||||
}
|
||||
}
|
||||
|
||||
// health drop
|
||||
CreateWeaponPickup( WEAPON_HEALTH, g_rankHealthPayout[ killer_rank ], 0, X + fRandomEx( 0.5, 3.0 ), Y + fRandomEx( 0.5, 3.0 ), Z, expire_time );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerPickUpDynPickup( playerid, pickupid )
|
||||
{
|
||||
new keys;
|
||||
new existing_weapon;
|
||||
new existing_ammo;
|
||||
|
||||
// Health Pickups
|
||||
if ( pickupid == g_HealthPickup ) {
|
||||
SetPlayerHealth( playerid, 100.0 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Player Drops
|
||||
foreach ( new dropid : weapondrop )
|
||||
{
|
||||
if ( g_weaponDropData[ dropid ] [ E_PICKUP ] == pickupid )
|
||||
{
|
||||
if ( g_weaponDropData[ dropid ] [ E_WEAPON_ID ] == WEAPON_HEALTH )
|
||||
{
|
||||
new
|
||||
Float: health;
|
||||
|
||||
if ( GetPlayerHealth( playerid, health ) )
|
||||
{
|
||||
// no weed like effects
|
||||
if ( ( health += float( g_weaponDropData[ dropid ] [ E_AMMO ] ) ) > 100.0 ) {
|
||||
health = 100.0;
|
||||
}
|
||||
|
||||
SetPlayerHealth( playerid, health );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new current_weapon = GetPlayerWeapon( playerid );
|
||||
|
||||
GetPlayerKeys( playerid, keys, existing_weapon, existing_weapon );
|
||||
GetPlayerWeaponData( playerid, g_weaponDropData[ dropid ] [ E_SLOT_ID ], existing_weapon, existing_ammo );
|
||||
|
||||
new holding_replace_key = ( keys & KEY_ACTION );
|
||||
|
||||
// if ( existing_weapon > g_weaponDropData[ dropid ] [ E_WEAPON_ID ] && ! ( keys & KEY_ACTION ) && existing_ammo )
|
||||
if ( existing_weapon != g_weaponDropData[ dropid ] [ E_WEAPON_ID ] && ! holding_replace_key && existing_ammo )
|
||||
{
|
||||
ShowPlayerHelpDialog( playerid, 2500, "Hold ~r~~k~~PED_ANSWER_PHONE~~w~ To Take %s", ReturnWeaponName( g_weaponDropData[ dropid ] [ E_WEAPON_ID ] ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
GivePlayerWeapon( playerid, g_weaponDropData[ dropid ] [ E_WEAPON_ID ], g_weaponDropData[ dropid ] [ E_AMMO ] );
|
||||
|
||||
// don't change player weapon
|
||||
if ( ! holding_replace_key ) {
|
||||
SetPlayerArmedWeapon( playerid, current_weapon );
|
||||
}
|
||||
}
|
||||
|
||||
// destroy health pickup
|
||||
PlayerPlaySound( playerid, 1150, 0.0, 0.0, 0.0 );
|
||||
DestroyWeaponPickup( dropid );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock CreateWeaponPickup( weaponid, ammo, slotid, Float: X, Float: Y, Float: Z, expire_time ) {
|
||||
|
||||
new handle = Iter_Free( weapondrop );
|
||||
|
||||
if ( handle != ITER_NONE )
|
||||
{
|
||||
g_weaponDropData[ handle ] [ E_PICKUP ] = CreateDynamicPickup( weaponid == WEAPON_HEALTH ? 1240 : GetWeaponModel( weaponid ), 1, X, Y, Z );
|
||||
g_weaponDropData[ handle ] [ E_EXPIRE_TIMESTAMP ] = expire_time;
|
||||
g_weaponDropData[ handle ] [ E_WEAPON_ID ] = weaponid;
|
||||
g_weaponDropData[ handle ] [ E_AMMO ] = ammo;
|
||||
g_weaponDropData[ handle ] [ E_SLOT_ID ] = slotid;
|
||||
Iter_Add( weapondrop, handle );
|
||||
}
|
||||
else
|
||||
{
|
||||
ClearInactiveWeaponDrops( gettime( ) );
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
stock DestroyWeaponPickup( handle )
|
||||
{
|
||||
if ( ! Iter_Contains( weapondrop, handle ) ) return 0;
|
||||
DestroyDynamicPickup( g_weaponDropData[ handle ] [ E_PICKUP ] );
|
||||
g_weaponDropData[ handle ] [ E_EXPIRE_TIMESTAMP ] = 0;
|
||||
g_weaponDropData[ handle ] [ E_PICKUP ] = -1;
|
||||
Iter_Remove( weapondrop, handle );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock ClearInactiveWeaponDrops( global_timestamp )
|
||||
{
|
||||
foreach ( new dropid : weapondrop ) if ( g_weaponDropData[ dropid ] [ E_EXPIRE_TIMESTAMP ] != 0 && global_timestamp > g_weaponDropData[ dropid ] [ E_EXPIRE_TIMESTAMP ] )
|
||||
{
|
||||
new
|
||||
cur = dropid;
|
||||
|
||||
DestroyDynamicPickup( g_weaponDropData[ dropid ] [ E_PICKUP ] );
|
||||
g_weaponDropData[ dropid ] [ E_EXPIRE_TIMESTAMP ] = 0;
|
||||
g_weaponDropData[ dropid ] [ E_PICKUP ] = -1;
|
||||
Iter_SafeRemove( weapondrop, cur, dropid );
|
||||
}
|
||||
return 1;
|
||||
}
|
93
gamemodes/irresistible/floodcontrol.pwn
Normal file
93
gamemodes/irresistible/floodcontrol.pwn
Normal file
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* SA-MP FloodControl Include (c) 2012
|
||||
* Developed by RyDeR`, JernejL
|
||||
* Module: floodcontrol.inc
|
||||
* Purpose: controls server flooding
|
||||
*/
|
||||
|
||||
#if !defined MAX_JOIN_LOGS
|
||||
#define MAX_JOIN_LOGS (50)
|
||||
#endif
|
||||
|
||||
enum e_JoinLog {
|
||||
e_iIP,
|
||||
e_iTimeStamp
|
||||
};
|
||||
|
||||
static stock
|
||||
g_eaJoinLog[MAX_JOIN_LOGS][e_JoinLog]
|
||||
;
|
||||
|
||||
public OnPlayerConnect(playerid) {
|
||||
static
|
||||
s_iJoinSeq
|
||||
;
|
||||
new
|
||||
szIP[16]
|
||||
;
|
||||
GetPlayerIp(playerid, szIP, sizeof(szIP));
|
||||
|
||||
g_eaJoinLog[s_iJoinSeq][e_iIP] = szIP[0] = IpToInt(szIP);
|
||||
g_eaJoinLog[s_iJoinSeq][e_iTimeStamp] = GetTickCount();
|
||||
|
||||
s_iJoinSeq = ++s_iJoinSeq % MAX_JOIN_LOGS;
|
||||
|
||||
szIP[1] = szIP[2] = 0;
|
||||
szIP[3] = -1;
|
||||
|
||||
for(new i = 0; i < MAX_JOIN_LOGS; ++i) {
|
||||
if(g_eaJoinLog[i][e_iIP] != szIP[0]) {
|
||||
continue;
|
||||
}
|
||||
szIP[1]++;
|
||||
|
||||
if(szIP[3] != -1) {
|
||||
szIP[2] += floatround(floatabs(g_eaJoinLog[i][e_iTimeStamp] - g_eaJoinLog[szIP[3]][e_iTimeStamp]));
|
||||
}
|
||||
szIP[3] = i;
|
||||
}
|
||||
static
|
||||
iHasOPFC = -1,
|
||||
iHasOPC = -1
|
||||
;
|
||||
if(iHasOPFC == -1) {
|
||||
iHasOPFC = funcidx("OnPlayerFloodControl");
|
||||
}
|
||||
if(iHasOPFC != -1) {
|
||||
CallRemoteFunction("OnPlayerFloodControl", "iii", playerid, szIP[1], szIP[2]);
|
||||
}
|
||||
if(iHasOPC == -1) {
|
||||
iHasOPC = funcidx("FC_OnPlayerConnect");
|
||||
}
|
||||
if(iHasOPC != -1) {
|
||||
return CallLocalFunction("FC_OnPlayerConnect", "i", playerid);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined _ALS_OnPlayerConnect
|
||||
#undef OnPlayerConnect
|
||||
#else
|
||||
#define _ALS_OnPlayerConnect
|
||||
#endif
|
||||
|
||||
#define OnPlayerConnect FC_OnPlayerConnect
|
||||
|
||||
static stock IpToInt(const szIP[]) {
|
||||
new
|
||||
aiBytes[1],
|
||||
iPos = 0
|
||||
;
|
||||
aiBytes{0} = strval(szIP[iPos]);
|
||||
while(iPos < 15 && szIP[iPos++] != '.') {}
|
||||
aiBytes{1} = strval(szIP[iPos]);
|
||||
while(iPos < 15 && szIP[iPos++] != '.') {}
|
||||
aiBytes{2} = strval(szIP[iPos]);
|
||||
while(iPos < 15 && szIP[iPos++] != '.') {}
|
||||
aiBytes{3} = strval(szIP[iPos]);
|
||||
|
||||
return aiBytes[0];
|
||||
}
|
||||
|
||||
forward OnPlayerConnect(playerid);
|
||||
forward OnPlayerFloodControl(playerid, iCount, iTimeSpan);
|
11
gamemodes/irresistible/gta/_gta.pwn
Normal file
11
gamemodes/irresistible/gta/_gta.pwn
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: gta/_gta.pwn
|
||||
* Purpose: encloses all gta related data/components
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include "irresistible\gta\map.pwn"
|
||||
#include "irresistible\gta\vehicles.pwn"
|
||||
#include "irresistible\gta\weapon_data.pwn"
|
449
gamemodes/irresistible/gta/map.pwn
Normal file
449
gamemodes/irresistible/gta/map.pwn
Normal file
@ -0,0 +1,449 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Kar, edited by Lorenc Pekaj
|
||||
* Module: gta\map.inc
|
||||
* Purpose: gta map related data
|
||||
*/
|
||||
|
||||
/* ** Defines ** */
|
||||
#define MAX_ZONE_NAME 28
|
||||
|
||||
/* ** Variables ** */
|
||||
enum SAZONE_MAIN {
|
||||
SAZONE_NAME[MAX_ZONE_NAME], Float:SAZONE_AREA[6]
|
||||
};
|
||||
|
||||
enum MainCity {
|
||||
City_Name[MAX_ZONE_NAME], Float:City_Area[6]
|
||||
};
|
||||
|
||||
static const gSACitys[9][MainCity] = {
|
||||
{"Los Santos", {44.60,-2892.90,-242.90,2997.00,-768.00,900.00} },
|
||||
{"Las Venturas", {869.40,596.30,-242.90,2997.00,2993.80,900.00} },
|
||||
{"Bone County", {-480.50,596.30,-242.90,869.40,2993.80,900.00} },
|
||||
{"Tierra Robada", {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00} },
|
||||
{"Tierra Robada", {-1213.90,596.30,-242.90,-480.50,1659.60,900.00} },
|
||||
{"San Fierro", {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00} },
|
||||
{"Red County", {-1213.90,-768.00,-242.90,2997.00,596.30,900.00} },
|
||||
{"Flint County", {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00} },
|
||||
{"Whetstone", {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
|
||||
};
|
||||
|
||||
static const gSAZones[][SAZONE_MAIN] = {
|
||||
// NAME AREA (Xmin,Ymin,Zmin,Xmax,Ymax,Zmax)
|
||||
{"The Big Ear", {-410.00,1403.30,-3.00,-137.90,1681.20,200.00} },
|
||||
{"Aldea Malvada", {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00} },
|
||||
{"Angel Pine", {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00} },
|
||||
{"Arco del Oeste", {-901.10,2221.80,0.00,-592.00,2571.90,200.00} },
|
||||
{"Avispa Country Club", {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00} },
|
||||
{"Avispa Country Club", {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00} },
|
||||
{"Avispa Country Club", {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00} },
|
||||
{"Avispa Country Club", {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10} },
|
||||
{"Avispa Country Club", {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10} },
|
||||
{"Avispa Country Club", {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70} },
|
||||
{"Back o Beyond", {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00} },
|
||||
{"Battery Point", {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00} },
|
||||
{"Bayside", {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00} },
|
||||
{"Bayside Marina", {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00} },
|
||||
{"Beacon Hill", {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50} },
|
||||
{"Blackfield", {964.30,1203.20,-89.00,1197.30,1403.20,110.90} },
|
||||
{"Blackfield", {964.30,1403.20,-89.00,1197.30,1726.20,110.90} },
|
||||
{"Blackfield Chapel", {1375.60,596.30,-89.00,1558.00,823.20,110.90} },
|
||||
{"Blackfield Chapel", {1325.60,596.30,-89.00,1375.60,795.00,110.90} },
|
||||
{"Blackfield Intersection", {1197.30,1044.60,-89.00,1277.00,1163.30,110.90} },
|
||||
{"Blackfield Intersection", {1166.50,795.00,-89.00,1375.60,1044.60,110.90} },
|
||||
{"Blackfield Intersection", {1277.00,1044.60,-89.00,1315.30,1087.60,110.90} },
|
||||
{"Blackfield Intersection", {1375.60,823.20,-89.00,1457.30,919.40,110.90} },
|
||||
{"Blueberry", {104.50,-220.10,2.30,349.60,152.20,200.00} },
|
||||
{"Blueberry", {19.60,-404.10,3.80,349.60,-220.10,200.00} },
|
||||
{"Blueberry Acres", {-319.60,-220.10,0.00,104.50,293.30,200.00} },
|
||||
{"Caligula's Palace", {2087.30,1543.20,-89.00,2437.30,1703.20,110.90} },
|
||||
{"Caligula's Palace", {2137.40,1703.20,-89.00,2437.30,1783.20,110.90} },
|
||||
{"Calton Heights", {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00} },
|
||||
{"Chinatown", {-2274.10,578.30,-7.60,-2078.60,744.10,200.00} },
|
||||
{"City Hall", {-2867.80,277.40,-9.10,-2593.40,458.40,200.00} },
|
||||
{"Come-A-Lot", {2087.30,943.20,-89.00,2623.10,1203.20,110.90} },
|
||||
{"Commerce", {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90} },
|
||||
{"Commerce", {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90} },
|
||||
{"Commerce", {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90} },
|
||||
{"Commerce", {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90} },
|
||||
{"Commerce", {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90} },
|
||||
{"Commerce", {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90} },
|
||||
{"Conference Center", {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90} },
|
||||
{"Conference Center", {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90} },
|
||||
{"Cranberry Station", {-2007.80,56.30,0.00,-1922.00,224.70,100.00} },
|
||||
{"Creek", {2749.90,1937.20,-89.00,2921.60,2669.70,110.90} },
|
||||
{"Dillimore", {580.70,-674.80,-9.50,861.00,-404.70,200.00} },
|
||||
{"Doherty", {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00} },
|
||||
{"Doherty", {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00} },
|
||||
{"Downtown", {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00} },
|
||||
{"Downtown", {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00} },
|
||||
{"Downtown", {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00} },
|
||||
{"Downtown", {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00} },
|
||||
{"Downtown", {-2078.60,578.30,-7.60,-1499.80,744.20,200.00} },
|
||||
{"Downtown", {-1993.20,265.20,-9.10,-1794.90,578.30,200.00} },
|
||||
{"Downtown Los Santos", {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90} },
|
||||
{"Downtown Los Santos", {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90} },
|
||||
{"Downtown Los Santos", {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90} },
|
||||
{"Downtown Los Santos", {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90} },
|
||||
{"Downtown Los Santos", {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90} },
|
||||
{"Downtown Los Santos", {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90} },
|
||||
{"Downtown Los Santos", {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90} },
|
||||
{"Downtown Los Santos", {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90} },
|
||||
{"Downtown Los Santos", {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90} },
|
||||
{"East Beach", {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90} },
|
||||
{"East Beach", {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90} },
|
||||
{"East Beach", {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90} },
|
||||
{"East Beach", {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90} },
|
||||
{"East Los Santos", {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90} },
|
||||
{"East Los Santos", {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90} },
|
||||
{"East Los Santos", {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90} },
|
||||
{"East Los Santos", {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90} },
|
||||
{"East Los Santos", {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90} },
|
||||
{"East Los Santos", {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90} },
|
||||
{"East Los Santos", {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90} },
|
||||
{"Easter Basin", {-1794.90,249.90,-9.10,-1242.90,578.30,200.00} },
|
||||
{"Easter Basin", {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00} },
|
||||
{"Easter Bay Airport", {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00} },
|
||||
{"Easter Bay Airport", {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00} },
|
||||
{"Easter Bay Airport", {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00} },
|
||||
{"Easter Bay Airport", {-1242.90,-50.00,0.00,-1213.90,578.30,200.00} },
|
||||
{"Easter Bay Airport", {-1213.90,-50.00,-4.50,-947.90,578.30,200.00} },
|
||||
{"Easter Bay Airport", {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40} },
|
||||
{"Easter Bay Airport", {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40} },
|
||||
{"Easter Bay Airport", {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40} },
|
||||
{"Easter Bay Chemicals", {-1132.80,-768.00,0.00,-956.40,-578.10,200.00} },
|
||||
{"Easter Bay Chemicals", {-1132.80,-787.30,0.00,-956.40,-768.00,200.00} },
|
||||
{"El Castillo del Diablo", {-464.50,2217.60,0.00,-208.50,2580.30,200.00} },
|
||||
{"El Castillo del Diablo", {-208.50,2123.00,-7.60,114.00,2337.10,200.00} },
|
||||
{"El Castillo del Diablo", {-208.50,2337.10,0.00,8.40,2487.10,200.00} },
|
||||
{"El Corona", {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90} },
|
||||
{"El Corona", {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90} },
|
||||
{"El Quebrados", {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00} },
|
||||
{"Esplanade East", {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00} },
|
||||
{"Esplanade East", {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00} },
|
||||
{"Esplanade East", {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30} },
|
||||
{"Esplanade North", {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00} },
|
||||
{"Esplanade North", {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00} },
|
||||
{"Esplanade North", {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00} },
|
||||
{"Fallen Tree", {-792.20,-698.50,-5.30,-452.40,-380.00,200.00} },
|
||||
{"Fallow Bridge", {434.30,366.50,0.00,603.00,555.60,200.00} },
|
||||
{"Fern Ridge", {508.10,-139.20,0.00,1306.60,119.50,200.00} },
|
||||
{"Financial", {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00} },
|
||||
{"Fisher's Lagoon", {1916.90,-233.30,-100.00,2131.70,13.80,200.00} },
|
||||
{"Flint Intersection", {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90} },
|
||||
{"Flint Range", {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00} },
|
||||
{"Fort Carson", {-376.20,826.30,-3.00,123.70,1249.00,200.00} },
|
||||
{"Foster Valley", {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00} },
|
||||
{"Foster Valley", {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00} },
|
||||
{"Foster Valley", {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00} },
|
||||
{"Foster Valley", {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00} },
|
||||
{"Frederick Bridge", {2759.20,296.50,0.00,2774.20,594.70,200.00} },
|
||||
{"Gant Bridge", {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00} },
|
||||
{"Gant Bridge", {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00} },
|
||||
{"Ganton", {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90} },
|
||||
{"Ganton", {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90} },
|
||||
{"Garcia", {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00} },
|
||||
{"Garcia", {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00} },
|
||||
{"Garver Bridge", {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90} },
|
||||
{"Garver Bridge", {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90} },
|
||||
{"Garver Bridge", {-1499.80,696.40,-179.60,-1339.80,925.30,20.30} },
|
||||
{"Glen Park", {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90} },
|
||||
{"Glen Park", {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90} },
|
||||
{"Glen Park", {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90} },
|
||||
{"Green Palms", {176.50,1305.40,-3.00,338.60,1520.70,200.00} },
|
||||
{"Greenglass College", {964.30,1044.60,-89.00,1197.30,1203.20,110.90} },
|
||||
{"Greenglass College", {964.30,930.80,-89.00,1166.50,1044.60,110.90} },
|
||||
{"Hampton Barns", {603.00,264.30,0.00,761.90,366.50,200.00} },
|
||||
{"Hankypanky Point", {2576.90,62.10,0.00,2759.20,385.50,200.00} },
|
||||
{"Harry Gold Parkway", {1777.30,863.20,-89.00,1817.30,2342.80,110.90} },
|
||||
{"Hashbury", {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00} },
|
||||
{"Hilltop Farm", {967.30,-450.30,-3.00,1176.70,-217.90,200.00} },
|
||||
{"Hunter Quarry", {337.20,710.80,-115.20,860.50,1031.70,203.70} },
|
||||
{"Idlewood", {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90} },
|
||||
{"Idlewood", {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90} },
|
||||
{"Idlewood", {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90} },
|
||||
{"Idlewood", {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90} },
|
||||
{"Idlewood", {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90} },
|
||||
{"Idlewood", {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90} },
|
||||
{"Jefferson", {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90} },
|
||||
{"Jefferson", {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90} },
|
||||
{"Jefferson", {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90} },
|
||||
{"Jefferson", {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90} },
|
||||
{"Jefferson", {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90} },
|
||||
{"Jefferson", {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90} },
|
||||
{"Julius Thruway East", {2623.10,943.20,-89.00,2749.90,1055.90,110.90} },
|
||||
{"Julius Thruway East", {2685.10,1055.90,-89.00,2749.90,2626.50,110.90} },
|
||||
{"Julius Thruway East", {2536.40,2442.50,-89.00,2685.10,2542.50,110.90} },
|
||||
{"Julius Thruway East", {2625.10,2202.70,-89.00,2685.10,2442.50,110.90} },
|
||||
{"Julius Thruway North", {2498.20,2542.50,-89.00,2685.10,2626.50,110.90} },
|
||||
{"Julius Thruway North", {2237.40,2542.50,-89.00,2498.20,2663.10,110.90} },
|
||||
{"Julius Thruway North", {2121.40,2508.20,-89.00,2237.40,2663.10,110.90} },
|
||||
{"Julius Thruway North", {1938.80,2508.20,-89.00,2121.40,2624.20,110.90} },
|
||||
{"Julius Thruway North", {1534.50,2433.20,-89.00,1848.40,2583.20,110.90} },
|
||||
{"Julius Thruway North", {1848.40,2478.40,-89.00,1938.80,2553.40,110.90} },
|
||||
{"Julius Thruway North", {1704.50,2342.80,-89.00,1848.40,2433.20,110.90} },
|
||||
{"Julius Thruway North", {1377.30,2433.20,-89.00,1534.50,2507.20,110.90} },
|
||||
{"Julius Thruway South", {1457.30,823.20,-89.00,2377.30,863.20,110.90} },
|
||||
{"Julius Thruway South", {2377.30,788.80,-89.00,2537.30,897.90,110.90} },
|
||||
{"Julius Thruway West", {1197.30,1163.30,-89.00,1236.60,2243.20,110.90} },
|
||||
{"Julius Thruway West", {1236.60,2142.80,-89.00,1297.40,2243.20,110.90} },
|
||||
{"Juniper Hill", {-2533.00,578.30,-7.60,-2274.10,968.30,200.00} },
|
||||
{"Juniper Hollow", {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00} },
|
||||
{"K.A.C.C. Military Fuels", {2498.20,2626.50,-89.00,2749.90,2861.50,110.90} },
|
||||
{"Kincaid Bridge", {-1339.80,599.20,-89.00,-1213.90,828.10,110.90} },
|
||||
{"Kincaid Bridge", {-1213.90,721.10,-89.00,-1087.90,950.00,110.90} },
|
||||
{"Kincaid Bridge", {-1087.90,855.30,-89.00,-961.90,986.20,110.90} },
|
||||
{"King's", {-2329.30,458.40,-7.60,-1993.20,578.30,200.00} },
|
||||
{"King's", {-2411.20,265.20,-9.10,-1993.20,373.50,200.00} },
|
||||
{"King's", {-2253.50,373.50,-9.10,-1993.20,458.40,200.00} },
|
||||
{"LVA Freight Depot", {1457.30,863.20,-89.00,1777.40,1143.20,110.90} },
|
||||
{"LVA Freight Depot", {1375.60,919.40,-89.00,1457.30,1203.20,110.90} },
|
||||
{"LVA Freight Depot", {1277.00,1087.60,-89.00,1375.60,1203.20,110.90} },
|
||||
{"LVA Freight Depot", {1315.30,1044.60,-89.00,1375.60,1087.60,110.90} },
|
||||
{"LVA Freight Depot", {1236.60,1163.40,-89.00,1277.00,1203.20,110.90} },
|
||||
{"Las Barrancas", {-926.10,1398.70,-3.00,-719.20,1634.60,200.00} },
|
||||
{"Las Brujas", {-365.10,2123.00,-3.00,-208.50,2217.60,200.00} },
|
||||
{"Las Colinas", {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90} },
|
||||
{"Las Colinas", {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90} },
|
||||
{"Las Colinas", {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90} },
|
||||
{"Las Colinas", {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90} },
|
||||
{"Las Colinas", {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90} },
|
||||
{"Las Colinas", {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90} },
|
||||
{"Las Colinas", {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90} },
|
||||
{"Las Payasadas", {-354.30,2580.30,2.00,-133.60,2816.80,200.00} },
|
||||
{"Las Venturas Airport", {1236.60,1203.20,-89.00,1457.30,1883.10,110.90} },
|
||||
{"Las Venturas Airport", {1457.30,1203.20,-89.00,1777.30,1883.10,110.90} },
|
||||
{"Las Venturas Airport", {1457.30,1143.20,-89.00,1777.40,1203.20,110.90} },
|
||||
{"Las Venturas Airport", {1515.80,1586.40,-12.50,1729.90,1714.50,87.50} },
|
||||
{"Last Dime Motel", {1823.00,596.30,-89.00,1997.20,823.20,110.90} },
|
||||
{"Leafy Hollow", {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00} },
|
||||
{"Liberty City", {-1000.00,400.00,1300.00,-700.00,600.00,1400.00} },
|
||||
{"Lil' Probe Inn", {-90.20,1286.80,-3.00,153.80,1554.10,200.00} },
|
||||
{"Linden Side", {2749.90,943.20,-89.00,2923.30,1198.90,110.90} },
|
||||
{"Linden Station", {2749.90,1198.90,-89.00,2923.30,1548.90,110.90} },
|
||||
{"Linden Station", {2811.20,1229.50,-39.50,2861.20,1407.50,60.40} },
|
||||
{"Little Mexico", {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90} },
|
||||
{"Little Mexico", {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90} },
|
||||
{"Los Flores", {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90} },
|
||||
{"Los Flores", {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90} },
|
||||
{"Los Santos International", {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90} },
|
||||
{"Los Santos International", {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90} },
|
||||
{"Los Santos International", {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90} },
|
||||
{"Los Santos International", {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90} },
|
||||
{"Los Santos International", {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90} },
|
||||
{"Los Santos International", {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90} },
|
||||
{"Marina", {647.70,-1804.20,-89.00,851.40,-1577.50,110.90} },
|
||||
{"Marina", {647.70,-1577.50,-89.00,807.90,-1416.20,110.90} },
|
||||
{"Marina", {807.90,-1577.50,-89.00,926.90,-1416.20,110.90} },
|
||||
{"Market", {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90} },
|
||||
{"Market", {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90} },
|
||||
{"Market", {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90} },
|
||||
{"Market", {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90} },
|
||||
{"Market Station", {787.40,-1410.90,-34.10,866.00,-1310.20,65.80} },
|
||||
{"Martin Bridge", {-222.10,293.30,0.00,-122.10,476.40,200.00} },
|
||||
{"Missionary Hill", {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00} },
|
||||
{"Montgomery", {1119.50,119.50,-3.00,1451.40,493.30,200.00} },
|
||||
{"Montgomery", {1451.40,347.40,-6.10,1582.40,420.80,200.00} },
|
||||
{"Montgomery Intersection", {1546.60,208.10,0.00,1745.80,347.40,200.00} },
|
||||
{"Montgomery Intersection", {1582.40,347.40,0.00,1664.60,401.70,200.00} },
|
||||
{"Mulholland", {1414.00,-768.00,-89.00,1667.60,-452.40,110.90} },
|
||||
{"Mulholland", {1281.10,-452.40,-89.00,1641.10,-290.90,110.90} },
|
||||
{"Mulholland", {1269.10,-768.00,-89.00,1414.00,-452.40,110.90} },
|
||||
{"Mulholland", {1357.00,-926.90,-89.00,1463.90,-768.00,110.90} },
|
||||
{"Mulholland", {1318.10,-910.10,-89.00,1357.00,-768.00,110.90} },
|
||||
{"Mulholland", {1169.10,-910.10,-89.00,1318.10,-768.00,110.90} },
|
||||
{"Mulholland", {768.60,-954.60,-89.00,952.60,-860.60,110.90} },
|
||||
{"Mulholland", {687.80,-860.60,-89.00,911.80,-768.00,110.90} },
|
||||
{"Mulholland", {737.50,-768.00,-89.00,1142.20,-674.80,110.90} },
|
||||
{"Mulholland", {1096.40,-910.10,-89.00,1169.10,-768.00,110.90} },
|
||||
{"Mulholland", {952.60,-937.10,-89.00,1096.40,-860.60,110.90} },
|
||||
{"Mulholland", {911.80,-860.60,-89.00,1096.40,-768.00,110.90} },
|
||||
{"Mulholland", {861.00,-674.80,-89.00,1156.50,-600.80,110.90} },
|
||||
{"Mulholland Intersection", {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90} },
|
||||
{"North Rock", {2285.30,-768.00,0.00,2770.50,-269.70,200.00} },
|
||||
{"Ocean Docks", {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90} },
|
||||
{"Ocean Docks", {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90} },
|
||||
{"Ocean Docks", {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90} },
|
||||
{"Ocean Docks", {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90} },
|
||||
{"Ocean Docks", {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90} },
|
||||
{"Ocean Docks", {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90} },
|
||||
{"Ocean Docks", {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90} },
|
||||
{"Ocean Flats", {-2994.40,277.40,-9.10,-2867.80,458.40,200.00} },
|
||||
{"Ocean Flats", {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00} },
|
||||
{"Ocean Flats", {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00} },
|
||||
{"Octane Springs", {338.60,1228.50,0.00,664.30,1655.00,200.00} },
|
||||
{"Old Venturas Strip", {2162.30,2012.10,-89.00,2685.10,2202.70,110.90} },
|
||||
{"Palisades", {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00} },
|
||||
{"Palomino Creek", {2160.20,-149.00,0.00,2576.90,228.30,200.00} },
|
||||
{"Paradiso", {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00} },
|
||||
{"Pershing Square", {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90} },
|
||||
{"Pilgrim", {2437.30,1383.20,-89.00,2624.40,1783.20,110.90} },
|
||||
{"Pilgrim", {2624.40,1383.20,-89.00,2685.10,1783.20,110.90} },
|
||||
{"Pilson Intersection", {1098.30,2243.20,-89.00,1377.30,2507.20,110.90} },
|
||||
{"Pirates in Men's Pants", {1817.30,1469.20,-89.00,2027.40,1703.20,110.90} },
|
||||
{"Playa del Seville", {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90} },
|
||||
{"Prickle Pine", {1534.50,2583.20,-89.00,1848.40,2863.20,110.90} },
|
||||
{"Prickle Pine", {1117.40,2507.20,-89.00,1534.50,2723.20,110.90} },
|
||||
{"Prickle Pine", {1848.40,2553.40,-89.00,1938.80,2863.20,110.90} },
|
||||
{"Prickle Pine", {1938.80,2624.20,-89.00,2121.40,2861.50,110.90} },
|
||||
{"Queens", {-2533.00,458.40,0.00,-2329.30,578.30,200.00} },
|
||||
{"Queens", {-2593.40,54.70,0.00,-2411.20,458.40,200.00} },
|
||||
{"Queens", {-2411.20,373.50,0.00,-2253.50,458.40,200.00} },
|
||||
{"Randolph Industrial Estate", {1558.00,596.30,-89.00,1823.00,823.20,110.90} },
|
||||
{"Redsands East", {1817.30,2011.80,-89.00,2106.70,2202.70,110.90} },
|
||||
{"Redsands East", {1817.30,2202.70,-89.00,2011.90,2342.80,110.90} },
|
||||
{"Redsands East", {1848.40,2342.80,-89.00,2011.90,2478.40,110.90} },
|
||||
{"Redsands West", {1236.60,1883.10,-89.00,1777.30,2142.80,110.90} },
|
||||
{"Redsands West", {1297.40,2142.80,-89.00,1777.30,2243.20,110.90} },
|
||||
{"Redsands West", {1377.30,2243.20,-89.00,1704.50,2433.20,110.90} },
|
||||
{"Redsands West", {1704.50,2243.20,-89.00,1777.30,2342.80,110.90} },
|
||||
{"Regular Tom", {-405.70,1712.80,-3.00,-276.70,1892.70,200.00} },
|
||||
{"Richman", {647.50,-1118.20,-89.00,787.40,-954.60,110.90} },
|
||||
{"Richman", {647.50,-954.60,-89.00,768.60,-860.60,110.90} },
|
||||
{"Richman", {225.10,-1369.60,-89.00,334.50,-1292.00,110.90} },
|
||||
{"Richman", {225.10,-1292.00,-89.00,466.20,-1235.00,110.90} },
|
||||
{"Richman", {72.60,-1404.90,-89.00,225.10,-1235.00,110.90} },
|
||||
{"Richman", {72.60,-1235.00,-89.00,321.30,-1008.10,110.90} },
|
||||
{"Richman", {321.30,-1235.00,-89.00,647.50,-1044.00,110.90} },
|
||||
{"Richman", {321.30,-1044.00,-89.00,647.50,-860.60,110.90} },
|
||||
{"Richman", {321.30,-860.60,-89.00,687.80,-768.00,110.90} },
|
||||
{"Richman", {321.30,-768.00,-89.00,700.70,-674.80,110.90} },
|
||||
{"Robada Intersection", {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90} },
|
||||
{"Roca Escalante", {2237.40,2202.70,-89.00,2536.40,2542.50,110.90} },
|
||||
{"Roca Escalante", {2536.40,2202.70,-89.00,2625.10,2442.50,110.90} },
|
||||
{"Rockshore East", {2537.30,676.50,-89.00,2902.30,943.20,110.90} },
|
||||
{"Rockshore West", {1997.20,596.30,-89.00,2377.30,823.20,110.90} },
|
||||
{"Rockshore West", {2377.30,596.30,-89.00,2537.30,788.80,110.90} },
|
||||
{"Rodeo", {72.60,-1684.60,-89.00,225.10,-1544.10,110.90} },
|
||||
{"Rodeo", {72.60,-1544.10,-89.00,225.10,-1404.90,110.90} },
|
||||
{"Rodeo", {225.10,-1684.60,-89.00,312.80,-1501.90,110.90} },
|
||||
{"Rodeo", {225.10,-1501.90,-89.00,334.50,-1369.60,110.90} },
|
||||
{"Rodeo", {334.50,-1501.90,-89.00,422.60,-1406.00,110.90} },
|
||||
{"Rodeo", {312.80,-1684.60,-89.00,422.60,-1501.90,110.90} },
|
||||
{"Rodeo", {422.60,-1684.60,-89.00,558.00,-1570.20,110.90} },
|
||||
{"Rodeo", {558.00,-1684.60,-89.00,647.50,-1384.90,110.90} },
|
||||
{"Rodeo", {466.20,-1570.20,-89.00,558.00,-1385.00,110.90} },
|
||||
{"Rodeo", {422.60,-1570.20,-89.00,466.20,-1406.00,110.90} },
|
||||
{"Rodeo", {466.20,-1385.00,-89.00,647.50,-1235.00,110.90} },
|
||||
{"Rodeo", {334.50,-1406.00,-89.00,466.20,-1292.00,110.90} },
|
||||
{"Royal Casino", {2087.30,1383.20,-89.00,2437.30,1543.20,110.90} },
|
||||
{"San Andreas Sound", {2450.30,385.50,-100.00,2759.20,562.30,200.00} },
|
||||
{"Santa Flora", {-2741.00,458.40,-7.60,-2533.00,793.40,200.00} },
|
||||
{"Santa Maria Beach", {342.60,-2173.20,-89.00,647.70,-1684.60,110.90} },
|
||||
{"Santa Maria Beach", {72.60,-2173.20,-89.00,342.60,-1684.60,110.90} },
|
||||
{"Shady Cabin", {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00} },
|
||||
{"Shady Creeks", {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00} },
|
||||
{"Shady Creeks", {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00} },
|
||||
{"Sobell Rail Yards", {2749.90,1548.90,-89.00,2923.30,1937.20,110.90} },
|
||||
{"Spinybed", {2121.40,2663.10,-89.00,2498.20,2861.50,110.90} },
|
||||
{"Starfish Casino", {2437.30,1783.20,-89.00,2685.10,2012.10,110.90} },
|
||||
{"Starfish Casino", {2437.30,1858.10,-39.00,2495.00,1970.80,60.90} },
|
||||
{"Starfish Casino", {2162.30,1883.20,-89.00,2437.30,2012.10,110.90} },
|
||||
{"Temple", {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90} },
|
||||
{"Temple", {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90} },
|
||||
{"Temple", {1252.30,-926.90,-89.00,1357.00,-910.10,110.90} },
|
||||
{"Temple", {952.60,-1130.80,-89.00,1096.40,-937.10,110.90} },
|
||||
{"Temple", {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90} },
|
||||
{"Temple", {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90} },
|
||||
{"The Camel's Toe", {2087.30,1203.20,-89.00,2640.40,1383.20,110.90} },
|
||||
{"The Clown's Pocket", {2162.30,1783.20,-89.00,2437.30,1883.20,110.90} },
|
||||
{"The Emerald Isle", {2011.90,2202.70,-89.00,2237.40,2508.20,110.90} },
|
||||
{"The Farm", {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90} },
|
||||
{"The Four Dragons Casino", {1817.30,863.20,-89.00,2027.30,1083.20,110.90} },
|
||||
{"The High Roller", {1817.30,1283.20,-89.00,2027.30,1469.20,110.90} },
|
||||
{"The Mako Span", {1664.60,401.70,0.00,1785.10,567.20,200.00} },
|
||||
{"The Panopticon", {-947.90,-304.30,-1.10,-319.60,327.00,200.00} },
|
||||
{"The Pink Swan", {1817.30,1083.20,-89.00,2027.30,1283.20,110.90} },
|
||||
{"The Sherman Dam", {-968.70,1929.40,-3.00,-481.10,2155.20,200.00} },
|
||||
{"The Strip", {2027.40,863.20,-89.00,2087.30,1703.20,110.90} },
|
||||
{"The Strip", {2106.70,1863.20,-89.00,2162.30,2202.70,110.90} },
|
||||
{"The Strip", {2027.40,1783.20,-89.00,2162.30,1863.20,110.90} },
|
||||
{"The Strip", {2027.40,1703.20,-89.00,2137.40,1783.20,110.90} },
|
||||
{"The Visage", {1817.30,1863.20,-89.00,2106.70,2011.80,110.90} },
|
||||
{"The Visage", {1817.30,1703.20,-89.00,2027.40,1863.20,110.90} },
|
||||
{"Unity Station", {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50} },
|
||||
{"Valle Ocultado", {-936.60,2611.40,2.00,-715.90,2847.90,200.00} },
|
||||
{"Verdant Bluffs", {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90} },
|
||||
{"Verdant Bluffs", {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90} },
|
||||
{"Verdant Bluffs", {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90} },
|
||||
{"Verdant Meadows", {37.00,2337.10,-3.00,435.90,2677.90,200.00} },
|
||||
{"Verona Beach", {647.70,-2173.20,-89.00,930.20,-1804.20,110.90} },
|
||||
{"Verona Beach", {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90} },
|
||||
{"Verona Beach", {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90} },
|
||||
{"Verona Beach", {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90} },
|
||||
{"Verona Beach", {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90} },
|
||||
{"Vinewood", {787.40,-1310.20,-89.00,952.60,-1130.80,110.90} },
|
||||
{"Vinewood", {787.40,-1130.80,-89.00,952.60,-954.60,110.90} },
|
||||
{"Vinewood", {647.50,-1227.20,-89.00,787.40,-1118.20,110.90} },
|
||||
{"Vinewood", {647.70,-1416.20,-89.00,787.40,-1227.20,110.90} },
|
||||
{"Whitewood Estates", {883.30,1726.20,-89.00,1098.30,2507.20,110.90} },
|
||||
{"Whitewood Estates", {1098.30,1726.20,-89.00,1197.30,2243.20,110.90} },
|
||||
{"Willowfield", {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90} },
|
||||
{"Willowfield", {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90} },
|
||||
{"Willowfield", {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90} },
|
||||
{"Willowfield", {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90} },
|
||||
{"Willowfield", {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90} },
|
||||
{"Willowfield", {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90} },
|
||||
{"Willowfield", {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90} },
|
||||
{"Yellow Bell Station", {1377.40,2600.40,-21.90,1492.40,2687.30,78.00} },
|
||||
{"First National Bank", {-479.7844,-212.6335, 983.3784, -467.2004, -195.0383,988.3784} },
|
||||
{"Yellow Bell Golf Club", {1120.0886, 2721.8911, 3.4689, 1535.5258, 2888.8201, 325.5220} },
|
||||
{"Military Fields", {-123.6052, 1617.6372, -30.3906, 493.7519, 2156.4817, 500.3223}}
|
||||
};
|
||||
|
||||
/* ** Functions ** */
|
||||
stock GetPlayer2DZone(playerid, zone[])
|
||||
{
|
||||
new Float:x, Float:y, Float:z;
|
||||
GetPlayerPos(playerid, x, y, z);
|
||||
for( new i = 0, s = sizeof(gSAZones); i < s; i++ )
|
||||
{
|
||||
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
|
||||
{
|
||||
//return format(zone, MAX_ZONE_NAME, gSAZones[i][SAZONE_NAME], 0);
|
||||
return strmid(zone, gSAZones[i][SAZONE_NAME], false, strlen(gSAZones[i][SAZONE_NAME]), MAX_ZONE_NAME);
|
||||
}
|
||||
}
|
||||
return Get2DCity(zone, x, y, z);
|
||||
}
|
||||
|
||||
stock Get2DCity(zone[], Float:x, Float:y, Float:z = 0.0)
|
||||
{
|
||||
#pragma unused z
|
||||
for( new i = 0, s = sizeof(gSACitys); i < s; i++ )
|
||||
{
|
||||
if(x >= gSACitys[i][City_Area][0] && x <= gSACitys[i][City_Area][3] && y >= gSACitys[i][City_Area][1] && y <= gSACitys[i][City_Area][4])
|
||||
{
|
||||
return format(zone, MAX_ZONE_NAME, gSACitys[i][City_Name]);
|
||||
}
|
||||
}
|
||||
return format(zone, MAX_ZONE_NAME, "San Andreas");
|
||||
}
|
||||
|
||||
stock GetZoneFromCoordinates( zone[ ], Float: x, Float: y, Float: z = 0.0 )
|
||||
{
|
||||
#pragma unused z
|
||||
|
||||
new
|
||||
i;
|
||||
|
||||
for( i = 0; i < sizeof( gSAZones ); i++ )
|
||||
if( x >= gSAZones[ i ] [ SAZONE_AREA ] [ 0 ] && x <= gSAZones[ i ] [ SAZONE_AREA ] [ 3 ] && y >= gSAZones[ i ][ SAZONE_AREA ] [ 1 ] && y <= gSAZones[ i ] [ SAZONE_AREA ] [ 4 ] )
|
||||
break;
|
||||
|
||||
if( i >= sizeof( gSAZones ) )
|
||||
return format( zone, MAX_ZONE_NAME, "a place" );
|
||||
|
||||
return strmid( zone, gSAZones[ i ] [ SAZONE_NAME ], false, strlen( gSAZones[ i ] [ SAZONE_NAME ] ), MAX_ZONE_NAME );
|
||||
}
|
||||
|
||||
stock GetPlayerArea(playerid)
|
||||
{
|
||||
new str[MAX_ZONE_NAME] = "Interior";
|
||||
if(GetPlayerInterior(playerid) != 0 || IsPlayerInBank(playerid))
|
||||
return str;
|
||||
|
||||
GetPlayer2DZone(playerid, str);
|
||||
return str;
|
||||
}
|
52
gamemodes/irresistible/gta/vehicles.pwn
Normal file
52
gamemodes/irresistible/gta/vehicles.pwn
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: gta\vehicles.inc
|
||||
* Purpose: gta vehicle related data
|
||||
*/
|
||||
|
||||
/* ** Macros ** */
|
||||
#define GetVehicleName(%0) ((%0 - 400) < 0 || (%0 - 400 >= sizeof(g_aVehicleNames)) ? ("Unknown") : g_aVehicleNames[%0 - 400])
|
||||
|
||||
/* ** Variables ** */
|
||||
stock const g_aVehicleNames[ 212 ] [ ] =
|
||||
{
|
||||
{ "Landstalker" }, { "Bravura" }, { "Buffalo" }, { "Linerunner" }, { "Perenniel" }, { "Sentinel" }, { "Dumper" },
|
||||
{ "Firetruck" }, { "Trashmaster" }, { "Stretch" }, { "Manana" }, { "Infernus" }, { "Voodoo" }, { "Pony" }, { "Mule" },
|
||||
{ "Cheetah" }, { "Ambulance" }, { "Leviathan" }, { "Moonbeam" }, { "Esperanto" }, { "Taxi" }, { "Washington" },
|
||||
{ "Bobcat" }, { "Mr Whoopee" }, { "BF Injection" }, { "Hunter" }, { "Premier" }, { "Enforcer" }, { "Securicar" },
|
||||
{ "Banshee" }, { "Predator" }, { "Bus" },{ "Rhino" }, { "Barracks" }, { "Hotknife" }, { "Trailer 1" }, { "Previon" },
|
||||
{ "Coach" }, { "Cabbie" }, { "Stallion" }, { "Rumpo" }, { "RC Bandit" }, { "Romero" }, { "Packer" }, { "Monster" },
|
||||
{ "Admiral" }, { "Squalo" }, { "Seasparrow" }, { "Pizzaboy" }, { "Tram" }, { "Trailer 2" }, { "Turismo" },
|
||||
{ "Speeder" }, { "Reefer" }, { "Tropic" }, { "Flatbed" }, { "Yankee" }, { "Caddy" }, { "Solair" }, { "Berkley's RC Van" },
|
||||
{ "Skimmer" }, { "PCJ-600" }, { "Faggio" }, { "Freeway" }, { "RC Baron" }, { "RC Raider" }, { "Glendale" }, { "Oceanic" },
|
||||
{ "Sanchez" }, { "Sparrow" }, { "Patriot" }, { "Quad" }, { "Coastguard" }, { "Dinghy" }, { "Hermes" }, { "Sabre" },
|
||||
{ "Rustler" }, { "ZR-350" }, { "Walton" }, { "Regina" }, { "Comet" }, { "BMX" }, { "Burrito" }, { "Camper" }, { "Marquis" },
|
||||
{ "Baggage" }, { "Dozer" }, { "Maverick" }, { "News Chopper" }, { "Rancher" }, { "FBI Rancher" }, { "Virgo" }, { "Greenwood" },
|
||||
{ "Jetmax" }, { "Hotring" }, { "Sandking" }, { "Blista Compact" }, { "Police Maverick" }, { "Boxville" }, { "Benson" },
|
||||
{ "Mesa" }, { "RC Goblin" }, { "Hotring Racer A" }, { "Hotring Racer B" }, { "Bloodring Banger" }, { "Rancher" },
|
||||
{ "Super GT" }, { "Elegant" }, { "Journey" }, { "Bike" }, { "Mountain Bike" }, { "Beagle" }, { "Cropdust" }, { "Stuntplane" },
|
||||
{ "Tanker" }, { "Roadtrain" }, { "Nebula" }, { "Majestic" }, { "Buccaneer" }, { "Shamal" }, { "Hydra" }, { "FCR-900" },
|
||||
{ "NRG-500" }, { "HPV1000" }, { "Cement Truck" }, { "Tow Truck" }, { "Fortune" }, { "Cadrona" }, { "FBI Truck" },
|
||||
{ "Willard" }, { "Forklift" }, { "Tractor" }, { "Combine" }, { "Feltzer" }, { "Remington" }, { "Slamvan" },
|
||||
{ "Blade" }, { "Freight" }, { "Streak" }, { "Vortex" }, { "Vincent" }, { "Bullet" }, { "Clover" }, { "Sadler" },
|
||||
{ "Firetruck LA" }, { "Hustler" }, { "Intruder" }, { "Primo" }, { "Cargobob" }, { "Tampa" }, { "Sunrise" }, { "Merit" },
|
||||
{ "Utility" }, { "Nevada" }, { "Yosemite" }, { "Windsor" }, { "Monster A" }, { "Monster B" }, { "Uranus" }, { "Jester" },
|
||||
{ "Sultan" }, { "Stratum" }, { "Elegy" }, { "Raindance" }, { "RC Tiger" }, { "Flash" }, { "Tahoma" }, { "Savanna" },
|
||||
{ "Bandito" }, { "Freight Flat" }, { "Streak Carriage" }, { "Kart" }, { "Mower" }, { "Duneride" }, { "Sweeper" },
|
||||
{ "Broadway" }, { "Tornado" }, { "AT-400" }, { "DFT-30" }, { "Huntley" }, { "Stafford" }, { "BF-400" }, { "Newsvan" },
|
||||
{ "Tug" }, { "Trailer 3" }, { "Emperor" }, { "Wayfarer" }, { "Euros" }, { "Hotdog" }, { "Club" }, { "Freight Carriage" },
|
||||
{ "Trailer 3" }, { "Andromada" }, { "Dodo" }, { "RC Cam" }, { "Launch" }, { "Police Car LSPD" }, { "Police Car SFPD" },
|
||||
{ "Police LVPD" }, { "Police Ranger" }, { "Picador" }, { "SWAT. Van" }, { "Alpha" }, { "Phoenix" }, { "Glendale" },
|
||||
{ "Sadler" }, { "Luggage Trailer A" }, { "Luggage Trailer B" },{ "Stair Trailer" }, { "Boxville" }, { "Farm Plow" },
|
||||
{ "Utility Trailer"}
|
||||
};
|
||||
|
||||
stock GetVehicleModelFromName( szVehicleName[ ] )
|
||||
{
|
||||
for( new i = 400; i <= 611; i++ )
|
||||
if( strfind( g_aVehicleNames[ i - 400 ], szVehicleName, true ) != -1 )
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
206
gamemodes/irresistible/gta/weapon_data.pwn
Normal file
206
gamemodes/irresistible/gta/weapon_data.pwn
Normal file
@ -0,0 +1,206 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Southclaw
|
||||
* Module: gta\weapon_data.inc
|
||||
* Purpose: advanced weapon damage library
|
||||
*/
|
||||
|
||||
#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];
|
||||
}
|
308
gamemodes/irresistible/helpers.pwn
Normal file
308
gamemodes/irresistible/helpers.pwn
Normal file
@ -0,0 +1,308 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: helpers.inc
|
||||
* Purpose: functions that help scripting
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_va >
|
||||
|
||||
/* ** Macros ** */
|
||||
#define function%1(%2) forward%1(%2); public%1(%2)
|
||||
#define RandomEx(%0,%1) (random((%1) - (%0)) + (%0))
|
||||
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
|
||||
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
|
||||
#define SendUsage(%0,%1) (SendClientMessageFormatted(%0,-1,"{FFAF00}[USAGE]{FFFFFF} " # %1))
|
||||
#define SendError(%0,%1) (SendClientMessageFormatted(%0,-1,"{F81414}[ERROR]{FFFFFF} " # %1))
|
||||
#define SendServerMessage(%0,%1) (SendClientMessageFormatted(%0,-1,"{C0C0C0}[SERVER]{FFFFFF} " # %1))
|
||||
#define SendClientMessageToAllFormatted(%0) (SendClientMessageFormatted(INVALID_PLAYER_ID, %0))
|
||||
#define sprintf(%1) (format(g_szSprintfBuffer, sizeof(g_szSprintfBuffer), %1), g_szSprintfBuffer)
|
||||
#define SetObjectInvisible(%0) (SetDynamicObjectMaterialText(%0, 0, " ", 140, "Arial", 64, 1, -32256, 0, 1))
|
||||
#define fRandomEx(%1,%2) (floatrandom(%2-%1)+%1)
|
||||
#define strmatch(%1,%2) (!strcmp(%1,%2,true))
|
||||
#define Beep(%1) PlayerPlaySound(%1, 1137, 0.0, 0.0, 0.0)
|
||||
#define StopSound(%1) PlayerPlaySound(%1,1186,0.0,0.0,0.0)
|
||||
#define erase(%0) (%0[0]='\0')
|
||||
#define positionToString(%0) (%0==1?("st"):(%0==2?("nd"):(%0==3?("rd"):("th"))))
|
||||
#define SetPlayerPosEx(%0,%1,%2,%3,%4) SetPlayerPos(%0,%1,%2,%3),SetPlayerInterior(%0,%4)
|
||||
#define mysql_single_query(%0) mysql_function_query(dbHandle,(%0),true,"","")
|
||||
#define points_format(%0) (number_format(%0, .prefix = '\0', .decimals = 2))
|
||||
|
||||
// Defines
|
||||
#define KEY_AIM (128)
|
||||
#define thread function // used to look pretty for mysql
|
||||
|
||||
/* ** Variables ** */
|
||||
stock szSmallString[ 32 ];
|
||||
stock szNormalString[ 144 ];
|
||||
stock szBigString[ 256 ];
|
||||
stock szLargeString[ 1024 ];
|
||||
stock szHugeString[ 2048 ];
|
||||
stock g_szSprintfBuffer[ 1024 ];
|
||||
stock tmpVariable;
|
||||
|
||||
/* ** Functions ** */
|
||||
stock SendClientMessageFormatted( playerid, colour, format[ ], va_args<> )
|
||||
{
|
||||
static
|
||||
out[ 144 ];
|
||||
|
||||
va_format( out, sizeof( out ), format, va_start<3> );
|
||||
|
||||
if ( playerid == INVALID_PLAYER_ID ) {
|
||||
return SendClientMessageToAll( colour, out );
|
||||
} else {
|
||||
return SendClientMessage( playerid, colour, out );
|
||||
}
|
||||
}
|
||||
|
||||
// purpose: trim a string
|
||||
stock trimString( strSrc[ ] )
|
||||
{
|
||||
new
|
||||
strPos
|
||||
;
|
||||
for( strPos = strlen( strSrc ); strSrc[ strPos ] <= ' '; )
|
||||
strPos--;
|
||||
|
||||
strSrc[ strPos + 1 ] = EOS;
|
||||
|
||||
for( strPos = 0; strSrc[ strPos ] <= ' '; )
|
||||
strPos++;
|
||||
|
||||
strdel( strSrc, 0, strPos );
|
||||
}
|
||||
|
||||
// purpose: get distance between players
|
||||
stock Float: GetDistanceBetweenPlayers( iPlayer1, iPlayer2, &Float: fDistance = Float: 0x7F800000, bool: bAllowNpc = false )
|
||||
{
|
||||
static
|
||||
Float: fX, Float: fY, Float: fZ;
|
||||
|
||||
if ( ! bAllowNpc && ( IsPlayerNPC( iPlayer1 ) || IsPlayerNPC( iPlayer2 ) ) ) // since this command is designed for players
|
||||
return fDistance;
|
||||
|
||||
if( GetPlayerVirtualWorld( iPlayer1 ) == GetPlayerVirtualWorld( iPlayer2 ) && GetPlayerPos( iPlayer2, fX, fY, fZ ) )
|
||||
fDistance = GetPlayerDistanceFromPoint( iPlayer1, fX, fY, fZ );
|
||||
|
||||
return fDistance;
|
||||
}
|
||||
|
||||
// purpose: sets float precision (0.2313131 = 0.2300000)
|
||||
stock Float: SetFloatPrecision( Float: fValue, iPrecision ) {
|
||||
new
|
||||
Float: fFinal,
|
||||
Float: fFraction = floatfract( fValue )
|
||||
;
|
||||
|
||||
fFinal = fFraction * floatpower( 10.0, iPrecision );
|
||||
fFinal -= floatfract( fFinal );
|
||||
fFinal /= floatpower( 10.0, iPrecision );
|
||||
|
||||
return ( fFinal + fValue - fFraction );
|
||||
}
|
||||
|
||||
// purpose: get distance between 2d points
|
||||
stock Float: GetDistanceFromPointToPoint( Float: fX, Float: fY, Float: fX1, Float: fY1 )
|
||||
return Float: floatsqroot( floatpower( fX - fX1, 2 ) + floatpower( fY - fY1, 2 ) );
|
||||
|
||||
// purpose: get distance between 3d points
|
||||
stock Float: GetDistanceBetweenPoints( Float: x1, Float: y1, Float: z1, Float: x2, Float: y2, Float: z2 )
|
||||
return VectorSize( x1 - x2, y1 - y2, z1 - z2 );
|
||||
|
||||
// purpose: return raw distance without square root
|
||||
stock Float: GetDistanceFromPlayerSquared( playerid, Float: x1, Float: y1, Float: z1 ) {
|
||||
new
|
||||
Float: x2, Float: y2, Float: z2;
|
||||
|
||||
if( !GetPlayerPos( playerid, x2, y2, z2 ) )
|
||||
return FLOAT_INFINITY;
|
||||
|
||||
x1 -= x2;
|
||||
x1 *= x1;
|
||||
y1 -= y2;
|
||||
y1 *= y1;
|
||||
z1 -= z2;
|
||||
z1 *= z1;
|
||||
return ( x1 + y1 + z1 );
|
||||
}
|
||||
|
||||
// purpose: random float number support
|
||||
stock Float: floatrandom( Float:max )
|
||||
return floatmul( floatdiv( float( random( cellmax ) ), float( cellmax - 1 ) ), max );
|
||||
|
||||
// purpose: replace a character
|
||||
stock strreplacechar(string[], oldchar, newchar)
|
||||
{
|
||||
new matches;
|
||||
if (ispacked(string)) {
|
||||
if (newchar == '\0') {
|
||||
for(new i; string{i} != '\0'; i++) {
|
||||
if (string{i} == oldchar) {
|
||||
strdel(string, i, i + 1);
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(new i; string{i} != '\0'; i++) {
|
||||
if (string{i} == oldchar) {
|
||||
string{i} = newchar;
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (newchar == '\0') {
|
||||
for(new i; string[i] != '\0'; i++) {
|
||||
if (string[i] == oldchar) {
|
||||
strdel(string, i, i + 1);
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(new i; string[i] != '\0'; i++) {
|
||||
if (string[i] == oldchar) {
|
||||
string[i] = newchar;
|
||||
matches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
}
|
||||
|
||||
// purpose: replaces a phrase in a string with whatever specified (credit Slice)
|
||||
stock strreplace(string[], const search[], const replacement[], bool:ignorecase = false, pos = 0, limit = -1, maxlength = sizeof(string)) {
|
||||
// No need to do anything if the limit is 0.
|
||||
if (limit == 0)
|
||||
return 0;
|
||||
|
||||
new
|
||||
sublen = strlen(search),
|
||||
replen = strlen(replacement),
|
||||
bool:packed = ispacked(string),
|
||||
maxlen = maxlength,
|
||||
len = strlen(string),
|
||||
count = 0
|
||||
;
|
||||
|
||||
|
||||
// "maxlen" holds the max string length (not to be confused with "maxlength", which holds the max. array size).
|
||||
// Since packed strings hold 4 characters per array slot, we multiply "maxlen" by 4.
|
||||
if (packed)
|
||||
maxlen *= 4;
|
||||
|
||||
// If the length of the substring is 0, we have nothing to look for..
|
||||
if (!sublen)
|
||||
return 0;
|
||||
|
||||
// In this line we both assign the return value from "strfind" to "pos" then check if it's -1.
|
||||
while (-1 != (pos = strfind(string, search, ignorecase, pos))) {
|
||||
// Delete the string we found
|
||||
strdel(string, pos, pos + sublen);
|
||||
|
||||
len -= sublen;
|
||||
|
||||
// If there's anything to put as replacement, insert it. Make sure there's enough room first.
|
||||
if (replen && len + replen < maxlen) {
|
||||
strins(string, replacement, pos, maxlength);
|
||||
|
||||
pos += replen;
|
||||
len += replen;
|
||||
}
|
||||
|
||||
// Is there a limit of number of replacements, if so, did we break it?
|
||||
if (limit != -1 && ++count >= limit)
|
||||
break;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
// purpose: copy a string from a source to a destination
|
||||
/*stock strcpy(dest[], const source[], maxlength=sizeof dest) {
|
||||
strcat((dest[0] = EOS, dest), source, maxlength);
|
||||
}*/
|
||||
|
||||
// purpose: get unattached player object index
|
||||
stock Player_GetUnusedAttachIndex( playerid )
|
||||
{
|
||||
for ( new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i ++ )
|
||||
if ( ! IsPlayerAttachedObjectSlotUsed( playerid, i ) )
|
||||
return i;
|
||||
|
||||
return cellmin;
|
||||
}
|
||||
|
||||
// purpose: convert integer into dollar string (large credit to Slice - i just added a prefix parameter)
|
||||
stock number_format( { _, Float, Text3D, Menu, Text, DB, DBResult, bool, File }: variable, prefix = '$', decimals = -1, thousand_seperator = ',', decimal_point = '.', tag = tagof( variable ) )
|
||||
{
|
||||
static
|
||||
s_szReturn[ 32 ],
|
||||
s_szThousandSeparator[ 2 ] = { ' ', EOS },
|
||||
s_iDecimalPos,
|
||||
s_iChar,
|
||||
s_iSepPos
|
||||
;
|
||||
|
||||
if ( tag == tagof( bool: ) )
|
||||
{
|
||||
if ( variable )
|
||||
memcpy( s_szReturn, "true", 0, 5 * ( cellbits / 8 ) );
|
||||
else
|
||||
memcpy( s_szReturn, "false", 0, 6 * ( cellbits / 8 ) );
|
||||
|
||||
return s_szReturn;
|
||||
}
|
||||
else if ( tag == tagof( Float: ) )
|
||||
{
|
||||
if ( decimals == -1 )
|
||||
decimals = 8;
|
||||
|
||||
format( s_szReturn, sizeof( s_szReturn ), "%.*f", decimals, variable );
|
||||
}
|
||||
else
|
||||
{
|
||||
format( s_szReturn, sizeof( s_szReturn ), "%d", variable );
|
||||
|
||||
if ( decimals > 0 )
|
||||
{
|
||||
strcat( s_szReturn, "." );
|
||||
|
||||
while ( decimals-- )
|
||||
strcat( s_szReturn, "0" );
|
||||
}
|
||||
}
|
||||
|
||||
s_iDecimalPos = strfind( s_szReturn, "." );
|
||||
|
||||
if ( s_iDecimalPos == -1 )
|
||||
s_iDecimalPos = strlen( s_szReturn );
|
||||
else
|
||||
s_szReturn[ s_iDecimalPos ] = decimal_point;
|
||||
|
||||
if ( s_iDecimalPos >= 4 && thousand_seperator )
|
||||
{
|
||||
s_szThousandSeparator[ 0 ] = thousand_seperator;
|
||||
|
||||
s_iChar = s_iDecimalPos;
|
||||
s_iSepPos = 0;
|
||||
|
||||
while ( --s_iChar > 0 )
|
||||
{
|
||||
if ( ++s_iSepPos == 3 )
|
||||
{
|
||||
strins( s_szReturn, s_szThousandSeparator, s_iChar );
|
||||
|
||||
s_iSepPos = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( prefix != '\0' ) {
|
||||
// new minus = strfind( s_szReturn, "-" );
|
||||
strins( s_szReturn, "$", variable < 0 ); // no point finding -
|
||||
}
|
||||
return s_szReturn;
|
||||
}
|
120
gamemodes/irresistible/lookup.pwn
Normal file
120
gamemodes/irresistible/lookup.pwn
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: lookup.inc
|
||||
* Purpose: enables player information to be looked up
|
||||
*/
|
||||
|
||||
// Macros
|
||||
#define GetPlayerCountryCode(%1) (g_lookup_PlayerData[%1][E_CODE])
|
||||
#define GetPlayerCountryName(%1) (g_lookup_PlayerData[%1][E_COUNTRY])
|
||||
#define IsProxyEnabledForPlayer(%1) (g_lookup_Success{%1})
|
||||
|
||||
// Variables
|
||||
enum E_LOOKUP_DATA
|
||||
{
|
||||
E_COUNTRY[ 45 ], E_CODE[ 5 ]
|
||||
};
|
||||
|
||||
stock
|
||||
g_lookup_PlayerData[ MAX_PLAYERS ] [ E_LOOKUP_DATA ],
|
||||
g_lookup_Success[ MAX_PLAYERS char ],
|
||||
g_lookup_Retry[ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
// Forwards
|
||||
public OnLookupResponse( playerid, response, data[ ] );
|
||||
public OnLookupComplete( playerid, success );
|
||||
|
||||
// Hooks
|
||||
public OnPlayerConnect( playerid ) {
|
||||
if ( ! IsPlayerNPC( playerid ) ) {
|
||||
g_lookup_Retry{ playerid } = 0;
|
||||
LookupPlayerIP( playerid );
|
||||
}
|
||||
return CallLocalFunction("Lookup_OnPlayerConnect", "i", playerid);
|
||||
}
|
||||
|
||||
// Functions
|
||||
stock LookupPlayerIP( playerid ) {
|
||||
|
||||
if( IsPlayerNPC( playerid ) )
|
||||
return 0;
|
||||
|
||||
static
|
||||
szIP[ 16 ], szQuery[ 50 ];
|
||||
|
||||
GetPlayerIp( playerid, szIP, sizeof( szIP ) );
|
||||
|
||||
format( szQuery, sizeof( szQuery ), "ip-api.com/csv/%s?fields=3", szIP );
|
||||
return HTTP( playerid, HTTP_GET, szQuery, "", "OnLookupResponse" );
|
||||
}
|
||||
|
||||
stock ResetPlayerIPData( playerid ) {
|
||||
//format( g_lookup_PlayerData[ playerid ] [ E_HOST ], 10, "Unknown" );
|
||||
format( g_lookup_PlayerData[ playerid ] [ E_CODE ], 3, "XX" );
|
||||
format( g_lookup_PlayerData[ playerid ] [ E_COUNTRY ], 10, "Unknown" );
|
||||
//format( g_lookup_PlayerData[ playerid ] [ E_REGION ], 10, "Unknown" );
|
||||
//format( g_lookup_PlayerData[ playerid ] [ E_ISP ], 10, "Unknown" );
|
||||
//g_lookup_PlayerData[ playerid ] [ E_PROXY ] = 0;
|
||||
g_lookup_Success{ playerid } = 0;
|
||||
}
|
||||
|
||||
// Callbacks
|
||||
public OnLookupResponse( playerid, response, data[ ] ) {
|
||||
|
||||
static
|
||||
CountryData[ 96 ];
|
||||
|
||||
if( !IsPlayerConnected( playerid ) )
|
||||
return 0;
|
||||
|
||||
if( response != 200 ) // Fail
|
||||
{
|
||||
if( !g_lookup_Retry{ playerid } ) {
|
||||
g_lookup_Retry{ playerid } = 1;
|
||||
return LookupPlayerIP( playerid );
|
||||
} else {
|
||||
ResetPlayerIPData( playerid );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// format to length of 96
|
||||
format( CountryData, sizeof( CountryData ), "%s", data );
|
||||
|
||||
// search for a quote mark
|
||||
new
|
||||
long_name = strfind( CountryData[ 1 ], "\"," );
|
||||
|
||||
if ( long_name != -1 )
|
||||
{
|
||||
// Incase a country appears "This, Is, A, Country", TIAC
|
||||
strmid( g_lookup_PlayerData[ playerid ] [ E_COUNTRY ], CountryData, 1, long_name + 1 );
|
||||
strmid( g_lookup_PlayerData[ playerid ] [ E_CODE ], CountryData, long_name + 3, sizeof( CountryData ) );
|
||||
}
|
||||
else if ( sscanf( CountryData, "p<,>e<s[45]s[5]>", g_lookup_PlayerData[ playerid ] ) )
|
||||
{
|
||||
if( !g_lookup_Retry{ playerid } ) {
|
||||
g_lookup_Retry{ playerid } = 1;
|
||||
return LookupPlayerIP( playerid );
|
||||
} else {
|
||||
ResetPlayerIPData( playerid );
|
||||
}
|
||||
}
|
||||
|
||||
strreplacechar( g_lookup_PlayerData[ playerid ] [ E_COUNTRY ], '_', ' ' );
|
||||
g_lookup_Success{ playerid } = 1;
|
||||
}
|
||||
return CallLocalFunction( "OnLookupComplete", "ii", playerid, g_lookup_Success{ playerid } );
|
||||
}
|
||||
|
||||
// Hook
|
||||
#if defined _ALS_OnPlayerConnect
|
||||
#undef OnPlayerConnect
|
||||
#else
|
||||
#define _ALS_OnPlayerConnect
|
||||
#endif
|
||||
|
||||
#define OnPlayerConnect Lookup_OnPlayerConnect
|
||||
forward Lookup_OnPlayerConnect( playerid );
|
118
gamemodes/irresistible/mailer.pwn
Normal file
118
gamemodes/irresistible/mailer.pwn
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Slice
|
||||
* Module: mailer.inc
|
||||
* Purpose: mailer implementation in pawn
|
||||
*/
|
||||
#include <a_samp>
|
||||
#include <a_http>
|
||||
|
||||
#if ( !defined MAILER_MAX_MAIL_SIZE )
|
||||
#define MAILER_MAX_MAIL_SIZE (1024)
|
||||
#endif
|
||||
|
||||
#define MAILING_URL "sfcnr.com"
|
||||
#define MAILER_URL MAILING_URL#"/email/process"
|
||||
#if ( !defined MAILER_URL )
|
||||
#error Please define MAILER_URL before including the mailer include.
|
||||
#endif
|
||||
|
||||
stock SendMail( const szReceiver[ ], const szReceiverName[ ], const szSubject[ ], const szMessage[ ] )
|
||||
{
|
||||
new
|
||||
szBuffer[ MAILER_MAX_MAIL_SIZE ] = "t=",
|
||||
iPos = strlen( szBuffer ),
|
||||
iLength = strlen( szReceiver )
|
||||
;
|
||||
|
||||
memcpy( szBuffer, szReceiver, iPos * 4, ( iLength + 1 ) * 4 );
|
||||
|
||||
StringURLEncode( szBuffer[ iPos ], 1024 - iPos );
|
||||
|
||||
strcat( szBuffer, "&n=" );
|
||||
|
||||
iPos = strlen( szBuffer );
|
||||
iLength = strlen( szReceiverName );
|
||||
|
||||
memcpy( szBuffer, szReceiverName, iPos * 4, ( iLength + 1 ) * 4 );
|
||||
|
||||
StringURLEncode( szBuffer[ iPos ], 1024 - iPos );
|
||||
|
||||
strcat( szBuffer, "&s=" );
|
||||
|
||||
iPos = strlen( szBuffer );
|
||||
iLength = strlen( szSubject );
|
||||
|
||||
memcpy( szBuffer, szSubject, iPos * 4, ( iLength + 1 ) * 4 );
|
||||
|
||||
StringURLEncode( szBuffer[ iPos ], 1024 - iPos );
|
||||
|
||||
strcat( szBuffer, "&m=" );
|
||||
|
||||
iPos = strlen( szBuffer );
|
||||
iLength = strlen( szMessage );
|
||||
|
||||
memcpy( szBuffer, szMessage, iPos * 4, ( iLength + 1 ) * 4 );
|
||||
|
||||
StringURLEncode( szBuffer[ iPos ], 1024 - iPos );
|
||||
|
||||
// printf("Buffer %s", szBuffer);
|
||||
HTTP( 0xD00D, HTTP_POST, MAILER_URL, szBuffer, "OnMailScriptResponse" );
|
||||
}
|
||||
|
||||
forward OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] );
|
||||
public OnMailScriptResponse( iIndex, iResponseCode, const szData[ ] )
|
||||
{
|
||||
if ( szData[ 0 ] )
|
||||
print( "Mailer script has failed" );
|
||||
}
|
||||
|
||||
stock StringURLEncode( szString[ ], iSize = sizeof( szString ) )
|
||||
{
|
||||
for ( new i = 0, l = strlen( szString ); i < l; i++ )
|
||||
{
|
||||
switch ( szString[ i ] )
|
||||
{
|
||||
case '!', '(', ')', '\'', '*',
|
||||
'0' .. '9',
|
||||
'A' .. 'Z',
|
||||
'a' .. 'z':
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
case ' ':
|
||||
{
|
||||
szString[ i ] = '+';
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
new
|
||||
s_szHex[ 8 ]
|
||||
;
|
||||
|
||||
if ( i + 3 >= iSize )
|
||||
{
|
||||
szString[ i ] = EOS;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ( l + 3 >= iSize )
|
||||
szString[ iSize - 3 ] = EOS;
|
||||
|
||||
format( s_szHex, sizeof( s_szHex ), "%02h", szString[ i ] );
|
||||
|
||||
szString[ i ] = '%';
|
||||
|
||||
strins( szString, s_szHex, i + 1, iSize );
|
||||
|
||||
l += 2;
|
||||
i += 2;
|
||||
|
||||
if ( l > iSize - 1 )
|
||||
l = iSize - 1;
|
||||
}
|
||||
}
|
48
gamemodes/irresistible/sampac.pwn
Normal file
48
gamemodes/irresistible/sampac.pwn
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module:
|
||||
* Purpose:
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
#include < sampcac >
|
||||
|
||||
/* ** Definitions ** */
|
||||
#define AC_WEBSITE "www.sampcac.xyz"
|
||||
#define IsPlayerUsingSampAC CAC_GetStatus
|
||||
|
||||
/* ** Variables ** */
|
||||
new const
|
||||
g_szCheatNames [ ] [ ] =
|
||||
{
|
||||
"Aimbot (1)", "Aimbot (2)", "Triggerbot (1)", "Triggerbot (2)", "Nametag wallhack (1)", "ESP wallhack (1)", "Macro keybind (1)",
|
||||
"Fake ping (1)", "Weapon info (1)", "No recoil (1)", "No recoil (2)", "Aimbot (3)", "Aimbot (4)", "CLEO"
|
||||
}
|
||||
;
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
CAC_SetGameOptionStatus( CAC_GAMEOPTION__SPRINT, CAC_GAMEOPTION_STATUS__SPRINT_ALLSURFACES );
|
||||
// CAC_SetGameOptionStatus( CAC_GAMEOPTION__INFINITESPRINT, 1 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Callbacks ** */
|
||||
function OnPlayerCheat( player_id, cheat_id )
|
||||
{
|
||||
new
|
||||
playerName[MAX_PLAYER_NAME] = "*not connected*";
|
||||
|
||||
if ( IsPlayerConnected( player_id ) ) {
|
||||
GetPlayerName( player_id, playerName, sizeof( playerName ) );
|
||||
}
|
||||
|
||||
// AdvancedBan( player_id, "Server", g_szCheatNames[ cheat_id ], ReturnPlayerIP( player_id ) );
|
||||
format( szNormalString, sizeof( szNormalString ), "[ANTI-CHEAT]{FFFFFF} %s(%d) has been detected using %s.", playerName, player_id, g_szCheatNames[ cheat_id ] );
|
||||
SendClientMessageToAdmins( COLOR_PINK, szNormalString );
|
||||
print( szNormalString );
|
||||
return 1;
|
||||
}
|
189
gamemodes/irresistible/security.pwn
Normal file
189
gamemodes/irresistible/security.pwn
Normal file
@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Irresistible Gaming 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: security.inc
|
||||
* Purpose: security related functions for ig servers
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Macros ** */
|
||||
#define GetServerName(%0) g_igServerNames[%0]
|
||||
#define ReturnPlayerIP(%0) (p_PlayerIP[(%0)])
|
||||
#define ReturnPlayerName(%0) (p_PlayerName[(%0)])
|
||||
|
||||
/* ** Constants ** */
|
||||
stock const
|
||||
g_igServerNames [ ] [ 28 ] = { "San Fierro Cops And Robbers" };
|
||||
|
||||
/* ** Variables ** */
|
||||
new
|
||||
p_PlayerName [ MAX_PLAYERS ] [ MAX_PLAYER_NAME ],
|
||||
p_PlayerIP [ MAX_PLAYERS ] [ 16 ],
|
||||
p_RconLoginFails [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
forward OnNpcConnect( npcid );
|
||||
forward OnNpcDisconnect( npcid, reason );
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnRconLoginAttempt( ip[ ], password[ ], success )
|
||||
{
|
||||
new
|
||||
playerid = INVALID_PLAYER_ID,
|
||||
szIP[ 16 ]
|
||||
;
|
||||
|
||||
foreach(new i : Player)
|
||||
{
|
||||
if( GetPlayerIp( i, szIP, sizeof( szIP ) ) )
|
||||
{
|
||||
if( !strcmp( szIP, ip, true ) )
|
||||
{
|
||||
playerid = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !success )
|
||||
{
|
||||
if( IsPlayerConnected( playerid ) )
|
||||
{
|
||||
p_RconLoginFails{ playerid } ++;
|
||||
SendClientMessageFormatted( playerid, -1, "{FF0000}[ERROR]{FFFFFF} You have entered an invalid rcon password. {C0C0C0}[%d/2]", p_RconLoginFails{ playerid } );
|
||||
|
||||
if( p_RconLoginFails{ playerid } >= 2 ) {
|
||||
SendClientMessageFormatted( playerid, -1, "{C0C0C0}[SERVER]{FFFFFF} If you are not the server operator or manager, don't bother trying!" );
|
||||
Kick( playerid );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsPlayerConnected( playerid ) )
|
||||
{
|
||||
new
|
||||
name[ 24 ];
|
||||
|
||||
GetPlayerName( playerid, name, sizeof( name ) );
|
||||
|
||||
//if( strcmp( name, "Lorenc", true ) && strcmp( name, "Banging7Grams", true ) )
|
||||
if ( GetPlayerAccountID( playerid ) != 1 && GetPlayerAccountID( playerid ) != 277833 )
|
||||
{
|
||||
RangeBanPlayer( playerid );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerConnect( playerid )
|
||||
{
|
||||
static
|
||||
szName[ MAX_PLAYER_NAME ], szIP[ 16 ];
|
||||
|
||||
GetPlayerIp( playerid, szIP, sizeof( szIP ) );
|
||||
GetPlayerName( playerid, szName, sizeof( szName ) );
|
||||
|
||||
if ( IsPlayerNPC( playerid ) ) {
|
||||
CallLocalFunction( "OnNpcConnect", "d", playerid );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
strcpy( p_PlayerIP[ playerid ], szIP );
|
||||
strcpy( p_PlayerName[ playerid ], szName );
|
||||
|
||||
// get out the bots/invalid player ids
|
||||
if ( ! ( 0 <= playerid < MAX_PLAYERS ) ) {
|
||||
Kick( playerid );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
// check for invalid name
|
||||
if ( strlen( ReturnPlayerName( playerid ) ) <= 2 ) {
|
||||
Kick( playerid );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
if ( IsPlayerNPC( playerid ) ) {
|
||||
CallLocalFunction( "OnNpcDisconnect", "dd", playerid, reason );
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
// Filter out bots
|
||||
if ( ! ( 0 <= playerid < MAX_PLAYERS ) ) {
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined DEBUG_MODE
|
||||
// aims to clear the banned from the server bug
|
||||
public OnIncomingConnection( playerid, ip_address[ ], port ) {
|
||||
SendRconCommand( "reloadbans" );
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ** Hooked Functions ** */
|
||||
stock Security_SetPlayerName( playerid, const name[ ] )
|
||||
{
|
||||
if ( 0 <= playerid < MAX_PLAYERS ) {
|
||||
format ( p_PlayerName[ playerid ], sizeof ( p_PlayerName[ ] ), "%s", name );
|
||||
}
|
||||
return SetPlayerName( playerid, name );
|
||||
}
|
||||
|
||||
#if defined _ALS_SetPlayerName
|
||||
#undef SetPlayerName
|
||||
#else
|
||||
#define _ALS_SetPlayerName
|
||||
#endif
|
||||
|
||||
#define SetPlayerName Security_SetPlayerName
|
||||
|
||||
/* ** Functions ** */
|
||||
stock RangeBanPlayer( playerid )
|
||||
{
|
||||
if ( !IsPlayerConnected( playerid ) )
|
||||
return 0;
|
||||
|
||||
new
|
||||
szBan[ 24 ],
|
||||
szIP[ 16 ]
|
||||
;
|
||||
GetPlayerIp( playerid, szIP, sizeof( szIP ) );
|
||||
GetRangeIP( szIP, sizeof( szIP ) );
|
||||
|
||||
format( szBan, sizeof( szBan ), "banip %s", szIP );
|
||||
SendRconCommand( szBan );
|
||||
|
||||
KickPlayerTimed( playerid );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock GetRangeIP( szIP[ ], iSize = sizeof( szIP ) )
|
||||
{
|
||||
new
|
||||
iCount = 0
|
||||
;
|
||||
for( new i; szIP[ i ] != '\0'; i ++ )
|
||||
{
|
||||
if ( szIP[ i ] == '.' && ( iCount ++ ) == 1 )
|
||||
{
|
||||
strdel( szIP, i, strlen( szIP ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
format( szIP, iSize, "%s.*.*", szIP );
|
||||
}
|
84
gamemodes/irresistible/servervars.pwn
Normal file
84
gamemodes/irresistible/servervars.pwn
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc Pekaj
|
||||
* Module: servervars.inc
|
||||
* Purpose: savable server variables
|
||||
*/
|
||||
|
||||
#if !defined __irresistible_servervars
|
||||
#define __irresistible_servervars
|
||||
#endif
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnGameModeInit( )
|
||||
{
|
||||
mysql_function_query( dbHandle, "SELECT * FROM `SERVER`", true, "OnLoadServerVariables", "" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
thread OnLoadServerVariables( )
|
||||
{
|
||||
new
|
||||
rows, fields, i = -1,
|
||||
Field[ 30 ],
|
||||
szName[ 64 ],
|
||||
iValue,
|
||||
Float: fValue,
|
||||
iType
|
||||
;
|
||||
|
||||
cache_get_data( rows, fields );
|
||||
if ( rows )
|
||||
{
|
||||
while( ++i < rows )
|
||||
{
|
||||
cache_get_field_content( i, "NAME", szName );
|
||||
cache_get_field_content( i, "STRING_VAL", szBigString );
|
||||
cache_get_field_content( i, "INT_VAL", Field ), iValue = strval( Field );
|
||||
cache_get_field_content( i, "FLOAT_VAL", Field ), fValue = floatstr( Field );
|
||||
cache_get_field_content( i, "TYPE", Field ), iType = strval( Field );
|
||||
|
||||
switch( iType )
|
||||
{
|
||||
case GLOBAL_VARTYPE_INT: SetGVarInt( szName, iValue );
|
||||
case GLOBAL_VARTYPE_STRING: SetGVarString( szName, szBigString );
|
||||
case GLOBAL_VARTYPE_FLOAT: SetGVarFloat( szName, fValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
printf( "[SERVER] %d server variables have been loaded.", rows );
|
||||
return 1;
|
||||
}
|
||||
|
||||
stock UpdateServerVariable( szName[ 64 ], intVal, Float: floatVal, stringVal[ 128 ], type )
|
||||
{
|
||||
static
|
||||
szString[ 256 ];
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case GLOBAL_VARTYPE_INT: format( szString, 128, "UPDATE `SERVER` SET `INT_VAL`=%d WHERE `NAME`='%s'", intVal, mysql_escape( szName ) ), SetGVarInt( szName, intVal );
|
||||
case GLOBAL_VARTYPE_STRING: format( szString, 256, "UPDATE `SERVER` SET `STRING_VAL`='%s' WHERE `NAME`='%s'", mysql_escape( stringVal ), mysql_escape( szName ) ), SetGVarString( szName, stringVal );
|
||||
case GLOBAL_VARTYPE_FLOAT: format( szString, 128, "UPDATE `SERVER` SET `FLOAT_VAL`=%f WHERE `NAME`='%s'", floatVal, mysql_escape( szName ) ), SetGVarFloat( szName, floatVal );
|
||||
default: return;
|
||||
}
|
||||
|
||||
mysql_single_query( szString );
|
||||
}
|
||||
|
||||
stock AddServerVariable( szName[ 64 ], szValue[ 128 ], type )
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case GLOBAL_VARTYPE_INT: format( szLargeString, 164, "INSERT IGNORE INTO `SERVER`(`NAME`,`INT_VAL`,`TYPE`) VALUES ('%s',%d,%d)", mysql_escape( szName ), strval( szValue ), type );
|
||||
case GLOBAL_VARTYPE_STRING: format( szLargeString, 296, "INSERT IGNORE INTO `SERVER`(`NAME`,`STRING_VAL`,`TYPE`) VALUES ('%s','%s',%d)", mysql_escape( szName ), mysql_escape( szValue ), type );
|
||||
case GLOBAL_VARTYPE_FLOAT: format( szLargeString, 164, "INSERT IGNORE INTO `SERVER`(`NAME`,`FLOAT_VAL`,`TYPE`) VALUES ('%s',%f,%d)", mysql_escape( szName ), floatstr( szValue ), type );
|
||||
default: return;
|
||||
}
|
||||
|
||||
mysql_single_query( szLargeString );
|
||||
}
|
@ -15,7 +15,8 @@
|
||||
#pragma compat 1
|
||||
//#pragma option -d3
|
||||
#pragma dynamic 7200000
|
||||
//#define DEBUG_MODE
|
||||
|
||||
#define DEBUG_MODE
|
||||
|
||||
#if defined DEBUG_MODE
|
||||
#pragma option -d3
|
||||
@ -43,7 +44,6 @@
|
||||
#include < gvar >
|
||||
#include < RouteConnector >
|
||||
#include < merrandom >
|
||||
// #include < sampac >
|
||||
#include < MathParser >
|
||||
#include < mapandreas >
|
||||
#include < md-sort >
|
||||
@ -51,28 +51,8 @@ native WP_Hash ( buffer[ ], len, const str[ ] );
|
||||
native IsValidVehicle ( vehicleid );
|
||||
native gpci ( playerid, serial[ ], len );
|
||||
|
||||
/* ** Anticheat ** */
|
||||
#if !defined AC_INCLUDED
|
||||
#include < anticheat\global >
|
||||
#include < anticheat\player >
|
||||
|
||||
#include < anticheat\weapon >
|
||||
//#include < anticheat\spectate >
|
||||
#include < anticheat\airbrake >
|
||||
#include < anticheat\proaim >
|
||||
#include < anticheat\autocbug >
|
||||
#include < anticheat\flying >
|
||||
#include < anticheat\remotejack > // Works fine
|
||||
|
||||
#include < anticheat\hooks >
|
||||
|
||||
#include < anticheat\hitpoints > // Good
|
||||
|
||||
#define AC_INCLUDED
|
||||
#endif
|
||||
|
||||
/* ** SF-CNR ** */
|
||||
#include < irresistible\main >
|
||||
#include "irresistible\_main.pwn"
|
||||
|
||||
/* ** Useful macros ** */
|
||||
#define DQCMD:%1(%2) forward discord_%1(%2); public discord_%1(%2)
|
||||
@ -103,7 +83,6 @@ native gpci ( playerid, serial[ ], len );
|
||||
#define replacePercentageSymbol(%0) strreplacechar(szString,'%','#')
|
||||
#define IsPlayerInEntrance(%0,%1) (p_LastEnteredEntrance[%0]==(%1))
|
||||
#define IsPlayerInPlayerGang(%0,%1) (p_Class[%0] == p_Class[%1] && p_Class[%0] == CLASS_CIVILIAN && p_GangID[%0] == p_GangID[%1] && p_GangID[%0] != INVALID_GANG_ID)
|
||||
#define INVALID_TIMER_ID (-1)
|
||||
#define IsPlayerNpcEx(%0) (IsPlayerNPC(%0) || strmatch(p_PlayerIP[%0], "127.0.0.1"))
|
||||
#define GetBusinessSecurity(%0) (g_businessSecurityData[%0][E_LEVEL])
|
||||
#define ResetSpawnLocation(%0) SetPlayerSpawnLocation(%0, "")
|
||||
@ -261,6 +240,8 @@ enum E_DONATION_DATA
|
||||
#define CP_CASINO_BAR ( 38 )
|
||||
#define CP_ALCATRAZ_EXPORT ( 39 )
|
||||
|
||||
new g_Checkpoints [ ALL_CHECKPOINTS ];
|
||||
|
||||
/* ** Discord ** */
|
||||
//#include <discord-connector>
|
||||
#define ENABLE_DISCORD false
|
||||
@ -2879,288 +2860,6 @@ new
|
||||
Iterator:business<MAX_BUSINESSES>
|
||||
;
|
||||
|
||||
/* ** Player Data ** */
|
||||
new
|
||||
bool: p_Spawned [ MAX_PLAYERS char ],
|
||||
bool: p_PlayerLogged [ MAX_PLAYERS char ],
|
||||
p_AccountID [ MAX_PLAYERS ],
|
||||
p_AdminLevel [ MAX_PLAYERS ],
|
||||
p_Job [ MAX_PLAYERS char ],
|
||||
p_VIPJob [ MAX_PLAYERS char ],
|
||||
bool: p_JobSet [ MAX_PLAYERS char ],
|
||||
// bool: p_CitySet [ MAX_PLAYERS char ],
|
||||
p_JailTime [ MAX_PLAYERS ],
|
||||
p_AdminJailed [ MAX_PLAYERS char ],
|
||||
p_JailTimer [ MAX_PLAYERS ],
|
||||
bool: p_Jailed [ MAX_PLAYERS char ],
|
||||
p_WantedLevel [ MAX_PLAYERS ],
|
||||
bool: p_Tazed [ MAX_PLAYERS char ],
|
||||
p_LastVehicle [ MAX_PLAYERS ] = { INVALID_VEHICLE_ID, ... },
|
||||
bool: p_Cuffed [ MAX_PLAYERS char ],
|
||||
p_CuffAbuseTimer [ MAX_PLAYERS ],
|
||||
p_Cash [ MAX_PLAYERS ],
|
||||
p_AntiRobSpam [ MAX_PLAYERS ],
|
||||
p_AntiRapeSpam [ MAX_PLAYERS ],
|
||||
bool: p_Tied [ MAX_PLAYERS char ],
|
||||
p_Ropes [ MAX_PLAYERS ],
|
||||
bool: p_Kidnapped [ MAX_PLAYERS char ],
|
||||
bool: p_ToggledViewPM [ MAX_PLAYERS char ],
|
||||
p_TicketTimestamp [ MAX_PLAYERS ],
|
||||
p_TicketIssuer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CheckpointEnterTick [ MAX_PLAYERS ],
|
||||
bool: p_pausedToLoad [ MAX_PLAYERS char ],
|
||||
bool: p_CantUseReport [ MAX_PLAYERS char ],
|
||||
p_pausedToLoadTimer [ MAX_PLAYERS ],
|
||||
p_BankMoney [ MAX_PLAYERS ],
|
||||
p_OwnedHouses [ MAX_PLAYERS ],
|
||||
p_OwnedVehicles [ MAX_PLAYERS ],
|
||||
p_OwnedBusinesses [ MAX_PLAYERS ],
|
||||
p_TrackingTimer [ MAX_PLAYERS ] = { INVALID_TIMER_ID, ... },
|
||||
p_ContractedAmount [ MAX_PLAYERS ],
|
||||
p_MetalMelter [ MAX_PLAYERS ],
|
||||
p_Kills [ MAX_PLAYERS ],
|
||||
p_Deaths [ MAX_PLAYERS ],
|
||||
p_VIPLevel [ MAX_PLAYERS ],
|
||||
p_XP [ MAX_PLAYERS ],
|
||||
p_CureDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CureTick [ MAX_PLAYERS ],
|
||||
p_HealDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_HealTick [ MAX_PLAYERS ],
|
||||
bool: p_Spectating [ MAX_PLAYERS char ],
|
||||
bool: p_Muted [ MAX_PLAYERS char ],
|
||||
bool: p_InfectedHIV [ MAX_PLAYERS char ],
|
||||
p_InHouse [ MAX_PLAYERS ],
|
||||
p_ExperienceHideTimer [ MAX_PLAYERS ],
|
||||
p_AntiTextSpam [ MAX_PLAYERS ],
|
||||
bool: p_BlockedPM [ MAX_PLAYERS ] [ MAX_PLAYERS ],
|
||||
bool: p_inFBI [ MAX_PLAYERS char ],
|
||||
bool: p_inArmy [ MAX_PLAYERS char ],
|
||||
p_MutedTime [ MAX_PLAYERS ],
|
||||
p_AntiCommandSpam [ MAX_PLAYERS ],
|
||||
p_PmResponder [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
bool: justConnected [ MAX_PLAYERS char ],
|
||||
p_BailOfferer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_DamageTDTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
Text3D: p_InfoLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_InfoLabelString [ MAX_PLAYERS ] [ 32 ],
|
||||
bool: p_inMovieMode [ MAX_PLAYERS char ],
|
||||
bool: p_inCIA [ MAX_PLAYERS char ],
|
||||
p_AntiEmpSpam [ MAX_PLAYERS ],
|
||||
bool: p_inPaintBall [ MAX_PLAYERS char ],
|
||||
p_Scissors [ MAX_PLAYERS ],
|
||||
// p_TaxTime [ MAX_PLAYERS ],
|
||||
bool: p_GPSToggled [ MAX_PLAYERS char ],
|
||||
p_GPSTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
p_GPSLocation [ MAX_PLAYERS ],
|
||||
p_GPSObject [ MAX_PLAYERS ] = { INVALID_OBJECT_ID, ... },
|
||||
p_VIPArmourRedeem [ MAX_PLAYERS ],
|
||||
p_VIPWeaponRedeem [ MAX_PLAYERS ],
|
||||
p_VIPExpiretime [ MAX_PLAYERS ],
|
||||
p_LastSkin [ MAX_PLAYERS ],
|
||||
bool: p_MoneyBag [ MAX_PLAYERS char ],
|
||||
p_CopBanned [ MAX_PLAYERS char ],
|
||||
p_AntiEMP [ MAX_PLAYERS ],
|
||||
p_FireDistanceTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
p_Warns [ MAX_PLAYERS ],
|
||||
p_Wood [ MAX_PLAYERS ],
|
||||
p_LumberjackDeliver [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_LumberjackReturn [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_LumberjackTimeElapsed [ MAX_PLAYERS ],
|
||||
bool: p_StartedLumberjack [ MAX_PLAYERS char ],
|
||||
p_Uptime [ MAX_PLAYERS ],
|
||||
p_AchievementTimer [ MAX_PLAYERS ] = { 0xFF, ... },
|
||||
bool: p_SecureWallet [ MAX_PLAYERS char ],
|
||||
p_WeedGrams [ MAX_PLAYERS ],
|
||||
p_WeedDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_WeedTick [ MAX_PLAYERS ],
|
||||
p_WeedSellingGrams [ MAX_PLAYERS ],
|
||||
p_Arrests [ MAX_PLAYERS ],
|
||||
bool: p_AidsVaccine [ MAX_PLAYERS char ],
|
||||
bool: p_CantUseAsk [ MAX_PLAYERS char ],
|
||||
bool: p_AdminLog [ MAX_PLAYERS char ],
|
||||
LastDeath [ MAX_PLAYERS ],
|
||||
DeathSpam [ MAX_PLAYERS char ],
|
||||
bool: p_beingSpectated [ MAX_PLAYERS ],
|
||||
p_whomSpectating [ MAX_PLAYERS ],
|
||||
bool: p_InAnimation [ MAX_PLAYERS char ],
|
||||
p_AntiSaveStatsSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFixSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechNosSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechEmpSpam [ MAX_PLAYERS ],
|
||||
bool: p_GivingBlowjob [ MAX_PLAYERS char ],
|
||||
bool: p_GettingBlowjob [ MAX_PLAYERS char ],
|
||||
p_AntiBlowJobSpam [ MAX_PLAYERS ],
|
||||
p_EntranceTickcount [ MAX_PLAYERS ],
|
||||
p_VIPWep1 [ MAX_PLAYERS char ],
|
||||
p_VIPWep2 [ MAX_PLAYERS char ],
|
||||
p_VIPWep3 [ MAX_PLAYERS char ],
|
||||
p_VIPWep_Modify [ MAX_PLAYERS char ],
|
||||
p_BobbyPins [ MAX_PLAYERS ],
|
||||
p_IncorrectLogins [ MAX_PLAYERS char ],
|
||||
p_Robberies [ MAX_PLAYERS ],
|
||||
p_ViewingStats [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_CarWarpTime [ MAX_PLAYERS ],
|
||||
p_CarWarpVehicleID [ MAX_PLAYERS ],
|
||||
p_AntiTextSpamCount [ MAX_PLAYERS char ],
|
||||
Float: p_PlayerBuggerX [ MAX_PLAYERS ],
|
||||
Float: p_PlayerBuggerY [ MAX_PLAYERS ],
|
||||
Float: p_PlayerBuggerZ [ MAX_PLAYERS ],
|
||||
p_DamageSpamTime [ MAX_PLAYERS ],
|
||||
p_DamageSpamCount [ MAX_PLAYERS char ],
|
||||
p_PingImmunity [ MAX_PLAYERS char ],
|
||||
p_Fires [ MAX_PLAYERS ],
|
||||
p_ApartmentEnter [ MAX_PLAYERS char ],
|
||||
p_AntiTieSpam [ MAX_PLAYERS ],
|
||||
p_RansomPlacer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_RansomAmount [ MAX_PLAYERS ],
|
||||
p_LastDrovenPoliceVeh [ MAX_PLAYERS ] = { INVALID_VEHICLE_ID, ... },
|
||||
Text3D: p_SpawnKillLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_AntiSpawnKill [ MAX_PLAYERS ],
|
||||
bool: p_AntiSpawnKillEnabled [ MAX_PLAYERS char ],
|
||||
p_HitsComplete [ MAX_PLAYERS ],
|
||||
/*p_CopTutorial [ MAX_PLAYERS char ],
|
||||
p_CopTutorialProgress [ MAX_PLAYERS char ],
|
||||
p_CopTutorialTick [ MAX_PLAYERS ],*/
|
||||
p_WeaponDealTick [ MAX_PLAYERS ],
|
||||
p_WeaponDealer [ MAX_PLAYERS ] = { INVALID_PLAYER_ID, ... },
|
||||
p_WeaponDealMenu [ MAX_PLAYERS char ],
|
||||
p_WeaponLockerMenu [ MAX_PLAYERS char ],
|
||||
bool: p_WeaponDealing [ MAX_PLAYERS char ],
|
||||
p_BlowjobOfferer [ MAX_PLAYERS ],
|
||||
p_BlowjobDealTick [ MAX_PLAYERS ],
|
||||
p_LastEnteredEntrance [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_ViewingGangTalk [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_SearchedCountTick [ MAX_PLAYERS ],
|
||||
p_SellingWeedTick [ MAX_PLAYERS ],
|
||||
p_AntiKidnapSpam [ MAX_PLAYERS ],
|
||||
//p_JoinTimestamp [ MAX_PLAYERS ],
|
||||
p_PasswordedHouse [ MAX_PLAYERS ],
|
||||
p_HouseWeaponAddSlot [ MAX_PLAYERS char ],
|
||||
Text3D: p_AdminLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
bool: p_AdminOnDuty [ MAX_PLAYERS char ],
|
||||
p_FurnitureCategory [ MAX_PLAYERS char ],
|
||||
p_FurnitureRotAxis [ MAX_PLAYERS char ],
|
||||
Float: p_ProgressStatus [ MAX_PLAYERS ],
|
||||
bool: p_ProgressStarted [ MAX_PLAYERS char ],
|
||||
p_HouseCrackingPW [ MAX_PLAYERS ],
|
||||
p_PawnStoreExport [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_Burglaries [ MAX_PLAYERS ],
|
||||
p_ArmyBanned [ MAX_PLAYERS char ],
|
||||
//Text3D: p_DetainedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
//bool: p_Detained [ MAX_PLAYERS char ],
|
||||
//p_DetainedBy [ MAX_PLAYERS ],
|
||||
p_BailTimestamp [ MAX_PLAYERS ],
|
||||
p_AFKTime [ MAX_PLAYERS ],
|
||||
bool: p_ClassSelection [ MAX_PLAYERS char ],
|
||||
p_MiningExport [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
Text3D: p_WeedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
LastPickupTimestamp [ MAX_PLAYERS ],
|
||||
PreviousPickupID [ MAX_PLAYERS ],
|
||||
//p_LastAnimIndex [ MAX_PLAYERS ],
|
||||
p_SpawningCity [ MAX_PLAYERS char ],
|
||||
p_UsingRobberySafe [ MAX_PLAYERS ] = { -1, ... },
|
||||
bool: p_CancelProgress [ MAX_PLAYERS char ],
|
||||
p_LumberjackMapIcon [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_PawnStoreMapIcon [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_SpectateWeapons [ MAX_PLAYERS ] [ 13 ] [ 2 ],
|
||||
bool: p_LeftCuffed [ MAX_PLAYERS char ],
|
||||
p_LabelColor [ MAX_PLAYERS ] = { COLOR_GREY, ... },
|
||||
p_RapidFireTickCount [ MAX_PLAYERS ],
|
||||
p_RapidFireShots [ MAX_PLAYERS char ],
|
||||
p_BulletInvulnerbility [ MAX_PLAYERS ],
|
||||
p_ProgressUpdateTimer [ MAX_PLAYERS ] = { 0xFFFF, ... },
|
||||
p_DeathMessage [ MAX_PLAYERS ] [ 32 ],
|
||||
p_ViewingInterior [ MAX_PLAYERS char ],
|
||||
p_MethYielded [ MAX_PLAYERS ],
|
||||
p_CarsJacked [ MAX_PLAYERS ],
|
||||
p_BankBlown [ MAX_PLAYERS ],
|
||||
p_JailsBlown [ MAX_PLAYERS ],
|
||||
p_AntiExportCarSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFlipSpam [ MAX_PLAYERS ],
|
||||
bool: p_inAlcatraz [ MAX_PLAYERS char ],
|
||||
Float: p_LastPickupPos [ MAX_PLAYERS ] [ 3 ],
|
||||
Text3D: p_TiedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_TiedBy [ MAX_PLAYERS ],
|
||||
p_BlowjobPrice [ MAX_PLAYERS ],
|
||||
p_DesyncTime [ MAX_PLAYERS ],
|
||||
p_AnswerDelay [ MAX_PLAYERS ],
|
||||
p_LastPlayerState [ MAX_PLAYERS char ],
|
||||
p_RespondDelay [ MAX_PLAYERS ],
|
||||
p_VisibleOnRadar [ MAX_PLAYERS ],
|
||||
p_InGarage [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_WorkCooldown [ MAX_PLAYERS ],
|
||||
p_AntiSpammyTS [ MAX_PLAYERS ],
|
||||
p_TruckedCargo [ MAX_PLAYERS ],
|
||||
p_KidnapImmunity [ MAX_PLAYERS ],
|
||||
p_GangSplitProfits [ MAX_PLAYERS ],
|
||||
Float: p_IrresistiblePoints [ MAX_PLAYERS ],
|
||||
p_SafeHelperTimer [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_HouseOfferer [ MAX_PLAYERS ],
|
||||
p_HouseOfferTicks [ MAX_PLAYERS ],
|
||||
p_HouseSellingID [ MAX_PLAYERS ],
|
||||
p_HouseSellingPrice [ MAX_PLAYERS ],
|
||||
p_RansomTimestamp [ MAX_PLAYERS ],
|
||||
p_QuitToAvoidTimestamp [ MAX_PLAYERS ],
|
||||
p_TimeTiedAt [ MAX_PLAYERS ],
|
||||
p_CopRefillTimestamp [ MAX_PLAYERS ],
|
||||
p_AdminCommandPause [ MAX_PLAYERS ],
|
||||
p_WeaponKills [ MAX_PLAYERS ] [ MAX_WEAPONS ],
|
||||
p_forcedAnticheat [ MAX_PLAYERS ],
|
||||
p_TiedAtTimestamp [ MAX_PLAYERS ],
|
||||
bool: p_AutoSpin [ MAX_PLAYERS char ],
|
||||
p_InBusiness [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_VehicleBringCooldown [ MAX_PLAYERS ],
|
||||
p_Fireworks [ MAX_PLAYERS ],
|
||||
p_ExplosiveBullets [ MAX_PLAYERS ],
|
||||
bool: p_AddedEmail [ MAX_PLAYERS char ],
|
||||
p_SpawningKey [ MAX_PLAYERS ] [ 4 ],
|
||||
p_SpawningIndex [ MAX_PLAYERS ],
|
||||
p_TazingImmunity [ MAX_PLAYERS ],
|
||||
p_PlayerAltBind [ MAX_PLAYERS ] = { -1, ... },
|
||||
p_PlayerAltBindTick [ MAX_PLAYERS ]
|
||||
;
|
||||
|
||||
/* ** Server Data ** */
|
||||
new
|
||||
g_Checkpoints [ ALL_CHECKPOINTS ],
|
||||
g_redeemVipWait = 0,
|
||||
g_TrolleyVehicles [ 5 ],
|
||||
engine, lights, doors, bonnet, boot, objective, alarm, panels, tires,
|
||||
g_RestoreRobberiesBribes = 0,
|
||||
g_ServerUptime = 0,
|
||||
rl_ServerUpdate = 0xFF,
|
||||
rl_ZoneUpdate = 0xFF,
|
||||
rl_AutoVehicleRespawner = 0xFF,
|
||||
bool: g_adminSpawnedCar [ MAX_VEHICLES char ],
|
||||
g_WorldClockSeconds = 0,
|
||||
g_WorldDayCount = 0,
|
||||
g_WorldWeather = 10,
|
||||
g_LogsInStock = 0,
|
||||
g_PingLimit = 1024,
|
||||
g_circleall_CD = false,
|
||||
g_randomMessageTick = 0,
|
||||
log__Text [ 6 ][ 90 ],
|
||||
szReportsLog [ 8 ][ 128 ],
|
||||
szQuestionsLog [ 8 ][ 128 ],
|
||||
bool: g_CommandLogging = false,
|
||||
bool: g_DialogLogging = false,
|
||||
szRules [ 3300 ],
|
||||
g_BannedDrivebyWeapons [ ] =
|
||||
{
|
||||
24, 26, 27, 34, 33
|
||||
},
|
||||
bool: g_Debugging = false,
|
||||
bool: g_Driveby = false,
|
||||
bool: g_VipPrivateMsging = false,
|
||||
bool: g_HappyHour = false,
|
||||
Float: g_HappyHourRate = 0.0,
|
||||
g_iTime = 0,
|
||||
g_VehicleLastAttacker [ MAX_VEHICLES ] = { INVALID_PLAYER_ID, ... },
|
||||
g_VehicleLastAttacked [ MAX_VEHICLES ],
|
||||
g_TopDonorWall = INVALID_OBJECT_ID,
|
||||
g_AlcatrazArea = -1
|
||||
;
|
||||
|
||||
/* ** Forwards ** */
|
||||
public OnPlayerDriveVehicle( playerid, vehicleid );
|
||||
public OnServerUpdate( );
|
||||
@ -5728,7 +5427,7 @@ public OnPlayerRequestClass( playerid, classid )
|
||||
PlayerTextDrawHide( playerid, p_PlayerRankTD[ playerid ] );
|
||||
PlayerTextDrawHide( playerid, p_PlayerRankTextTD[ playerid ] );
|
||||
KillTimer( p_TrackingTimer[ playerid ] );
|
||||
p_TrackingTimer[ playerid ] = INVALID_TIMER_ID;
|
||||
p_TrackingTimer[ playerid ] = -1;
|
||||
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] );
|
||||
PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] );
|
||||
HidePlayerTogglableTextdraws( playerid );
|
||||
@ -7316,7 +7015,7 @@ public OnPlayerDeath( playerid, killerid, reason )
|
||||
p_ClassSelection{ playerid } = false;
|
||||
p_TicketIssuer[ playerid ] = INVALID_PLAYER_ID;
|
||||
KillTimer( p_TrackingTimer[ playerid ] );
|
||||
p_TrackingTimer[ playerid ] = INVALID_TIMER_ID;
|
||||
p_TrackingTimer[ playerid ] = -1;
|
||||
p_GPSLocation [ playerid ] = 0;
|
||||
p_GPSToggled { playerid } = false;
|
||||
TextDrawHideForPlayer( playerid, p_GPSInformation[ playerid ] );
|
||||
@ -13300,10 +12999,10 @@ CMD:hidetracker( playerid, params[ ] )
|
||||
{
|
||||
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." );
|
||||
if ( !JobEquals( playerid, JOB_HITMAN ) ) return SendError( playerid, "You have to be a hitman to use this command." );
|
||||
if ( p_TrackingTimer[ playerid ] == INVALID_TIMER_ID ) return SendError( playerid, "Your tracker is already deactivated." );
|
||||
if ( p_TrackingTimer[ playerid ] == -1 ) return SendError( playerid, "Your tracker is already deactivated." );
|
||||
SendServerMessage(playerid, "You have de-activated the tracker.");
|
||||
KillTimer( p_TrackingTimer[ playerid ] );
|
||||
p_TrackingTimer[ playerid ] = INVALID_TIMER_ID;
|
||||
p_TrackingTimer[ playerid ] = -1;
|
||||
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] );
|
||||
return 1;
|
||||
}
|
||||
@ -13335,7 +13034,7 @@ function TrackPlayer_timer( playerid, victimid )
|
||||
{
|
||||
if ( !IsPlayerConnected( victimid ) || p_AdminOnDuty{ victimid } == true || GetPlayerState( victimid ) == PLAYER_STATE_SPECTATING || !JobEquals( playerid, JOB_HITMAN ) || p_Class[ playerid ] != CLASS_CIVILIAN )
|
||||
{
|
||||
KillTimer( p_TrackingTimer[ playerid ] ), p_TrackingTimer[ playerid ] = INVALID_TIMER_ID;
|
||||
KillTimer( p_TrackingTimer[ playerid ] ), p_TrackingTimer[ playerid ] = -1;
|
||||
TextDrawHideForPlayer( playerid, p_TrackPlayerTD[ playerid ] );
|
||||
}
|
||||
else
|
||||
@ -18756,24 +18455,6 @@ public OnPlayerExitVehicle(playerid, vehicleid)
|
||||
SendClientMessageToRace( iRace, COLOR_GREY, "[RACE]"COL_WHITE" %s(%d) has exited their vehicle and left the race.", ReturnPlayerName( playerid ), playerid );
|
||||
RemovePlayerFromRace( playerid );
|
||||
}
|
||||
|
||||
#if defined AC_INCLUDED
|
||||
|
||||
// Weapon Hacks - credits to wups
|
||||
|
||||
switch( GetVehicleModel( vehicleid ) )
|
||||
{
|
||||
case 457:
|
||||
p_PlayerHasWeapon[ playerid ] { 2 } = true;
|
||||
|
||||
case 592, 577, 511, 512, 520, 593, 553, 476, 519, 460, 513, 548, 425, 417, 487, 488, 497, 563, 447, 469:
|
||||
p_PlayerHasWeapon[ playerid ] { 46 } = true;
|
||||
|
||||
case 596, 597, 598, 599:
|
||||
p_PlayerHasWeapon[ playerid ] { 25 } = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -20736,10 +20417,12 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
GivePlayerWantedLevel( playerid, 6 - p_WantedLevel[ playerid ] );
|
||||
}
|
||||
|
||||
// prevent team kills
|
||||
if ( p_Class[ playerid ] != CLASS_POLICE && p_Class[ i ] != CLASS_POLICE ) {
|
||||
AC_UpdateDamageInformation( i, playerid, PRESSED( KEY_FIRE ) ? 51 : 38 );
|
||||
}
|
||||
#if defined AC_INCLUDED
|
||||
// prevent team kills
|
||||
if ( p_Class[ playerid ] != CLASS_POLICE && p_Class[ i ] != CLASS_POLICE ) {
|
||||
AC_UpdateDamageInformation( i, playerid, PRESSED( KEY_FIRE ) ? 51 : 38 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// debug
|
||||
@ -21273,7 +20956,7 @@ function unpause_Player( playerid )
|
||||
}
|
||||
else
|
||||
{
|
||||
SendClientMessageToAdmins( -1, ""COL_PINK"[ANTI-CHEAT]"COL_GREY" %s(%d) has been detected for %s.", ReturnPlayerName( playerid ), playerid, detectionToString( detection ) );
|
||||
SendClientMessageToAdmins( -1, ""COL_PINK"[ANTI-CHEAT]"COL_GREY" %s(%d) has been detected for %s.", ReturnPlayerName( playerid ), playerid, AC_DetectedCheatToString( detection ) );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user