Merge pull request #6 from zeelorenc/master

Merge
This commit is contained in:
Dusan 2019-06-02 00:06:26 +02:00 committed by GitHub
commit 54d7cc62f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 428 additions and 210 deletions

View File

@ -252,38 +252,19 @@ hook OnPlayerSpawn( playerid )
hook OnPlayerRequestClass( playerid, classid )
{
// SetPlayerPos( playerid, -1971.1536, 129.4870, 27.6875 );
// SetPlayerFacingAngle( playerid, 90.0 );
SetPlayerPos( playerid, 229.613998, 87.164001, 1605.039978 );
SetPlayerFacingAngle( playerid, -90.000000 );
SetPlayerPos( playerid, -1971.1536, 129.4870, 27.6875 );
SetPlayerInterior( playerid, 0 );
SetPlayerVirtualWorld( playerid, 0 );
//SetPlayerCameraPos( playerid, -1974.1431, 133.3700, 29.7107 );
//SetPlayerCameraLookAt( playerid, -1970.6431, 129.3700, 28.2107 );
SetPlayerFacingAngle( playerid, 90.0 );
if ( p_ClassSelection{ playerid } == false )
{
static const Float: START_POS[ 3 ] = { 243.5, 87.23, 1605.9 };
static const Float: FINAL_POS[ 3 ] = { 231.9, 87.23, 1605.9 };
InterpolateCameraPos( playerid, START_POS[ 0 ], START_POS[ 1 ], START_POS[ 2 ], FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], 17500, CAMERA_MOVE );
InterpolateCameraLookAt( playerid, FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], FINAL_POS[ 0 ] - 0.4, FINAL_POS[ 1 ], FINAL_POS[ 2 ] - 0.05, 15000, CAMERA_MOVE );
// InterpolateCameraPos( playerid, -1976.4252, 119.9899, 30.0, -1974.0302, 133.0427, 27.6940, 10000, CAMERA_MOVE );
// InterpolateCameraLookAt( playerid, -1974.0302,133.0427,27.6940, -1971.1536,129.4870,27.6875, 10000, CAMERA_MOVE );
{
InterpolateCameraPos( playerid, -1976.4252, 119.9899, 30.0, -1974.0302, 133.0427, 27.6940, 10000, CAMERA_MOVE );
InterpolateCameraLookAt( playerid, -1974.0302,133.0427,27.6940, -1971.1536,129.4870,27.6875, 10000, CAMERA_MOVE );
p_ClassSelection{ playerid } = true;
}
RemovePlayerAttachedObject( playerid, 1 );
SetPlayerAttachedObject( playerid, 1, 19560, 6, 0.084999, 0.060998, -0.164999, 3.8, 81.6001, -19.3, .materialcolor1 = 0xFF000000 );
Streamer_Update( playerid, STREAMER_TYPE_OBJECT );
// ApplyAnimation( playerid, "MISC", "SEAT_TALK_02", 2.0, 1, 0, 0, 0, 0 );
if ( GetPlayerSpecialAction( playerid ) != SPECIAL_ACTION_CARRY ) {
TogglePlayerControllable( playerid, 0 );
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CARRY );
}
//ApplyAnimation( playerid, "FOOD", "FF_Sit_Look", 4.0, 1, 0, 0, 0, 0 );
ApplyAnimation( playerid, "MISC", "SEAT_TALK_02", 2.0, 1, 0, 0, 0, 0 );
if ( CLASS_CIVILIAN_RANGE[ 0 ] <= classid <= CLASS_CIVILIAN_RANGE[ 1 ] )
{
@ -420,7 +401,6 @@ stock IsPlayerClassApproved( playerid ) {
TextDrawHideForPlayer( playerid, g_classTextdrawName[ i ] );
}
TextDrawHideForPlayer( playerid, g_classBoxTD );
RemovePlayerAttachedObject( playerid, 1 );
return 1;
}

View File

@ -145,6 +145,7 @@ static stock
{ 5, "/achangename", "Change a players name" },
{ 5, "/unbanip", "Unbanning a IP address" },
{ 5, "/unban", "Unban a player from the server" },
{ 5, "/unforceac", "Unforce a player from using CAC" },
{ 5, "/doublexp", "Enable/disable double XP" },
{ 5, "/toggleviewpm", "Toggle to view private messages" },
{ 5, "/respawnallv", "Respawning all server vehicles" },

View File

@ -6,6 +6,24 @@
*/
/* ** Commands ** */
CMD:givearmour( playerid, params[ ] )
{
new pID;
if ( p_AdminLevel[ playerid] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT);
else if (sscanf (params, "u", pID ) ) SendUsage(playerid, "/givearmour [PLAYER_ID]");
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( IsPlayerJailed( pID ) ) return SendError( playerid, "This player is jailed, you cannot do this." );
else if ( IsPlayerAdminOnDuty( pID ) ) return SendError( playerid, "This player is an admin on duty, you cannot do this." );
else
{
SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" %s(%d) gave you armour.", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have given armour to %s(%d).", ReturnPlayerName( pID ), pID );
AddAdminLogLineFormatted( "%s(%d) has given armour to %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
SetPlayerArmour( pID, 100.0 );
}
return 1;
}
CMD:armorall( playerid, params[ ] )
{
if ( p_AdminLevel[ playerid ] < 5 )
@ -111,28 +129,68 @@ CMD:c( playerid, params[ ] )
CMD:creategarage( playerid, params[ ] )
{
new
cost, iTmp, iVehicle,
Float: X, Float: Y, Float: Z, Float: Angle
;
pID, cost;
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "d", cost ) ) return SendUsage( playerid, "/creategarage [COST]" );
else if ( sscanf( params, "dU(-1)", cost, pID ) ) return SendUsage( playerid, "/creategarage [COST] [PLAYER_ID (optional)]" );
else if ( ! IsPlayerServerMaintainer( playerid ) && ! IsPlayerConnected( pID ) && cost < 50000 ) return SendError( playerid, "You must specify a player for garages under $50,000." );
else if ( cost < 100 ) return SendError( playerid, "The price must be located above 100 dollars." );
else if ( !( iVehicle = GetPlayerVehicleID( playerid ) ) ) return SendError( playerid, "You are not in any vehicle." );
else
{
AddAdminLogLineFormatted( "%s(%d) has created a garage", ReturnPlayerName( playerid ), playerid );
mysql_format(
dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Garage%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0
);
mysql_tquery( dbHandle, szBigString, "OnAdminCreateGarage", "ddd", playerid, pID, cost );
}
return 1;
}
if ( GetVehiclePos( iVehicle, X, Y, Z ) && GetVehicleZAngle( iVehicle, Angle ) )
thread OnAdminCreateGarage( playerid, targetid, cost )
{
new
num_rows = cache_get_row_count( );
// if there is a note or the player is a maintainer
if ( IsPlayerServerMaintainer( playerid ) || num_rows || cost >= 50000 )
{
new
noteid = -1; // incase the lead maintainer makes it anyway
// remove the note if there is one
if ( num_rows )
{
if ( ( iTmp = CreateGarage( 0, cost, 0, X, Y, Z, Angle ) ) != -1 )
{
SaveToAdminLog( playerid, iTmp, "created garage" );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GARAGE]"COL_WHITE" You have created a %s garage taking up garage id %d.", cash_format( cost ), iTmp );
}
else
SendClientMessage( playerid, -1, ""COL_PINK"[GARAGE]"COL_WHITE" Unable to create a garage due to a unexpected error." );
// get the first note
noteid = cache_get_field_content_int( 0, "ID", dbHandle );
// remove the note
SaveToAdminLog( playerid, noteid, "consumed player's note" );
mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", GetPlayerAccountID( playerid ), noteid ) );
}
static
Float: X, Float: Y, Float: Z, Float: Angle, iVehicle, iTmp;
// proceed by creating the garage
if ( !( iVehicle = GetPlayerVehicleID( playerid ) ) ) return SendError( playerid, "You are not in any vehicle." );
if ( GetVehiclePos( iVehicle, X, Y, Z ) && GetVehicleZAngle( iVehicle, Angle ) && ( iTmp = CreateGarage( 0, cost, 0, X, Y, Z, Angle ) != -1 ) ) {
if ( IsPlayerConnected( targetid ) ) {
SaveToAdminLogFormatted( playerid, iTmp, "created garage (garage id %d) for %s (acc id %d, note id %d)", iTmp, ReturnPlayerName( targetid ), p_AccountID[ targetid ], noteid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GARAGE]"COL_WHITE" You have created a garage in the name of %s(%d).", ReturnPlayerName( targetid ), targetid );
AddAdminLogLineFormatted( "%s(%d) has created a garage for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( targetid ), targetid );
} else {
SaveToAdminLogFormatted( playerid, iTmp, "created garage (garage id %d)", iTmp );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GARAGE]"COL_WHITE" You have created a garage." );
AddAdminLogLineFormatted( "%s(%d) has created a house", ReturnPlayerName( playerid ), playerid );
}
} else {
SendClientMessage( playerid, -1, ""COL_PINK"[GARAGE]"COL_WHITE" Unable to create a garage due to a unexpected error." );
}
}
else
{
SendError( playerid, "This user does not have a V.I.P Garage note." );
}
return 1;
}
@ -597,9 +655,7 @@ CMD:destroybribe( playerid, params[ ] )
CMD:createcar( playerid, params[ ] )
{
new
vName[ 24 ], pID,
Float: X, Float: Y, Float: Z, Float: Angle
;
vName[ 24 ], pID, iModel;
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "us[24]", pID, vName ) ) return SendUsage( playerid, "/createcar [PLAYER_ID] [VEHICLE_NAME]" );
@ -607,27 +663,64 @@ CMD:createcar( playerid, params[ ] )
else if ( p_OwnedVehicles[ pID ] >= GetPlayerVehicleSlots( pID ) ) return SendError( playerid, "This player has too many vehicles." );
else
{
new
iModel, iTmp;
if ( ( iModel = GetVehicleModelFromName( vName ) ) != -1 ) {
AddAdminLogLineFormatted( "%s(%d) has created a vehicle for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
GetPlayerPos( playerid, X, Y, Z );
GetPlayerFacingAngle( playerid, Angle );
if ( ( iTmp = CreateBuyableVehicle( pID, iModel, 0, 0, X, Y, Z, Angle, 1337 ) ) != -1 ) {
SaveToAdminLogFormatted( playerid, iTmp, "created car (model id %d) for %s (acc id %d)", iModel, ReturnPlayerName( pID ), p_AccountID[ pID ] );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[VEHICLE]"COL_WHITE" You have created a vehicle in the name of %s(%d).", ReturnPlayerName( pID ), pID );
PutPlayerInVehicle( playerid, g_vehicleData[ pID ] [ iTmp ] [ E_VEHICLE_ID ], 0 );
}
else SendClientMessage( playerid, -1, ""COL_PINK"[VEHICLE]"COL_WHITE" Unable to create a vehicle due to a unexpected error." );
mysql_format(
dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Vehicle%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
GetPlayerAccountID( pID )
);
mysql_tquery( dbHandle, szBigString, "OnAdminCreateVehicle", "ddd", playerid, pID, iModel );
}
else SendError( playerid, "Invalid Vehicle Model." );
}
return 1;
}
thread OnAdminCreateVehicle( playerid, targetid, modelid )
{
new
num_rows = cache_get_row_count( );
// if there is a note or the player is a maintainer
if ( IsPlayerServerMaintainer( playerid ) || num_rows )
{
new
noteid = -1; // incase the lead maintainer makes it anyway
// remove the note if there is one
if ( num_rows )
{
// get the first note
noteid = cache_get_field_content_int( 0, "ID", dbHandle );
// remove the note
SaveToAdminLog( playerid, noteid, "consumed player's note" );
mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", GetPlayerAccountID( playerid ), noteid ) );
}
static
Float: X, Float: Y, Float: Z, Float: Angle, iTmp;
// proceed by creating the vehicle
GetPlayerPos( playerid, X, Y, Z );
GetPlayerFacingAngle( playerid, Angle );
if ( ( iTmp = CreateBuyableVehicle( targetid, modelid, 0, 0, X, Y, Z, Angle, 1337 ) ) != -1 ) {
SaveToAdminLogFormatted( playerid, iTmp, "created car (model id %d) for %s (acc id %d, note id %d)", modelid, ReturnPlayerName( targetid ), p_AccountID[ targetid ], noteid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[VEHICLE]"COL_WHITE" You have created a vehicle in the name of %s(%d).", ReturnPlayerName( targetid ), targetid );
AddAdminLogLineFormatted( "%s(%d) has created a vehicle for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( targetid ), targetid );
PutPlayerInVehicle( playerid, g_vehicleData[ targetid ] [ iTmp ] [ E_VEHICLE_ID ], 0 );
} else {
SendClientMessage( playerid, -1, ""COL_PINK"[VEHICLE]"COL_WHITE" Unable to create a vehicle due to a unexpected error." );
}
}
else
{
SendError( playerid, "This user does not have a V.I.P Vehicle note." );
}
return 1;
}
CMD:destroycar( playerid, params[ ] )
{
new
@ -680,28 +773,117 @@ CMD:stripcarmods( playerid, params[ ] )
return 1;
}
CMD:replacecar( playerid, params[ ] )
{
new
vName[ 24 ], iModel;
if ( sscanf( params, "s[24]", vName ) ) return SendUsage(playerid, "/replacecar [VEHICLE_NAME]");
if ( p_AdminLevel[ playerid ] < 5 )
return SendError( playerid, ADMIN_COMMAND_REJECT );
if ( !IsPlayerInAnyVehicle( playerid ) )
return SendError( playerid, "You are not in any vehicle." );
if ( g_buyableVehicle{ GetPlayerVehicleID( playerid ) } == false )
return SendError( playerid, "This vehicle isn't a buyable vehicle." );
if ( ( iModel = GetVehicleModelFromName( vName ) ) != -1 ) {
new
oldmodel, ownerid, slotid, vehicleid = GetPlayerVehicleID( playerid ),
v = getVehicleSlotFromID( vehicleid, ownerid, slotid ),
Float: X, Float: Y, Float: Z, Float: Angle
;
if ( v == -1 ) return SendError( playerid, "This vehicle doesn't look like it can be replaced. (0xAA)" );
if ( g_vehicleData[ ownerid ] [ slotid ] [ E_CREATED ] == false ) return SendError( playerid, "This vehicle doesn't look like it can be replaced. (0xAF)" );
GetVehiclePos( vehicleid, X, Y, Z );
GetVehicleZAngle( vehicleid, Angle );
oldmodel = GetVehicleModel( vehicleid );
g_vehicleData[ ownerid ] [ slotid ] [ E_MODEL ] = iModel;
PutPlayerInVehicle( playerid, RespawnBuyableVehicle( vehicleid, playerid ), 0 );
SaveVehicleData( ownerid, slotid );
SendClientMessage( playerid, -1, ""COL_GREY"[VEHICLE]"COL_WHITE" You have replaced model of this vehicle via administration." );
SaveToAdminLogFormatted( playerid, slotid, "replaced car on %s (acc id %d, model id %d)", ReturnPlayerName( ownerid ), p_AccountID[ ownerid ], g_vehicleData[ ownerid ] [ slotid ] [ E_MODEL ] );
AddAdminLogLineFormatted( "%s(%d) changed %s(%d)'s vehicle from %s to %s", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( ownerid ), ownerid, GetVehicleName( oldmodel ), GetVehicleName( iModel ) );
}
else
{
SendError( playerid, "Invalid Vehicle Model." );
}
return 1;
}
CMD:createhouse( playerid, params[ ] )
{
new
cost, iTmp,
Float: X, Float: Y, Float: Z
;
pID, cost;
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "d", cost ) ) return SendUsage( playerid, "/createhouse [COST]" );
else if ( sscanf( params, "dU(-1)", cost, pID ) ) return SendUsage( playerid, "/createhouse [COST] [PLAYER_ID (optional)]" );
else if ( ! IsPlayerServerMaintainer( playerid ) && ! IsPlayerConnected( pID ) && cost < 50000 ) return SendError( playerid, "You must specify a player for homes under $50,000." );
else if ( cost < 100 ) return SendError( playerid, "The price must be located above 100 dollars." );
else
{
AddAdminLogLineFormatted( "%s(%d) has created a house", ReturnPlayerName( playerid ), playerid );
if ( GetPlayerPos( playerid, X, Y, Z ) )
mysql_format(
dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P House%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0
);
mysql_tquery( dbHandle, szBigString, "OnAdminCreateHouse", "ddd", playerid, pID, cost );
}
return 1;
}
thread OnAdminCreateHouse( playerid, targetid, cost )
{
new
num_rows = cache_get_row_count( );
// if there is a note or the player is a maintainer
if ( IsPlayerServerMaintainer( playerid ) || num_rows || cost >= 50000 )
{
new
noteid = -1; // incase the lead maintainer makes it anyway
// remove the note if there is one
if ( num_rows )
{
if ( ( iTmp = CreateHouse( "Home", cost, X, Y, Z ) ) != -1 )
{
SaveToAdminLogFormatted( playerid, iTmp, "created house for %s", cash_format( cost ) );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" You have created a %s house taking up house id %d.", cash_format( cost ), iTmp );
}
else SendClientMessage( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" Unable to create a house due to a unexpected error." );
// get the first note
noteid = cache_get_field_content_int( 0, "ID", dbHandle );
// remove the note
SaveToAdminLog( playerid, noteid, "consumed player's note" );
mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", GetPlayerAccountID( playerid ), noteid ) );
}
static
Float: X, Float: Y, Float: Z, iTmp;
// proceed by creating the house
if ( GetPlayerPos( playerid, X, Y, Z ) && ( iTmp = CreateHouse( "Home", cost, X, Y, Z ) ) != -1 ) {
if ( IsPlayerConnected( targetid ) ) {
SaveToAdminLogFormatted( playerid, iTmp, "created house (house id %d) for %s (acc id %d, note id %d)", iTmp, ReturnPlayerName( targetid ), p_AccountID[ targetid ], noteid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" You have created a house in the name of %s(%d).", ReturnPlayerName( targetid ), targetid );
AddAdminLogLineFormatted( "%s(%d) has created a house for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( targetid ), targetid );
} else {
SaveToAdminLogFormatted( playerid, iTmp, "created house (house id %d)", iTmp );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" You have created a house." );
AddAdminLogLineFormatted( "%s(%d) has created a house", ReturnPlayerName( playerid ), playerid );
}
} else {
SendClientMessage( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" Unable to create a house due to a unexpected error." );
}
}
else
{
SendError( playerid, "This user does not have a V.I.P House note." );
}
return 1;
}
@ -755,7 +937,7 @@ CMD:unforceac( playerid, params[ ] )
Query[ 70 ];
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "s[24]", player ) ) SendUsage( playerid, "/unban [NAME]" );
else if ( sscanf( params, "s[24]", player ) ) SendUsage( playerid, "/unforceac [PLAYER_NAME]" );
else
{
new pID = GetPlayerIDFromName( player );
@ -780,7 +962,7 @@ thread OnPlayerUnforceAC( playerid, player[ ], pID, bool:offline )
Query[ 70 ], rows = cache_get_row_count( );
if ( !rows ) return SendError( playerid, "The database does not contain the username you are attempting to remove from forced ac." );
if ( offline )
{
@ -806,4 +988,4 @@ thread OnPlayerUnforceAC( playerid, player[ ], pID, bool:offline )
}
return 1;
}
}

View File

@ -9,28 +9,69 @@
CMD:createbusiness( playerid, params[ ] )
{
new
Float: X, Float: Y, Float: Z, cost, type
;
pID, cost, type;
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "dd", cost, type ) ) return SendUsage( playerid, "/createbusiness [COST] [TYPE]" );
else if ( sscanf( params, "ddU(-1)", cost, type, pID ) ) return SendUsage( playerid, "/createhouse [COST] [TYPE] [PLAYER_ID (optional)]" );
else if ( ! IsPlayerServerMaintainer( playerid ) && ! IsPlayerConnected( pID ) && cost < 50000 ) return SendError( playerid, "You must specify a player for business under $50,000." );
else if ( cost < 100 ) return SendError( playerid, "The price must be located above 100 dollars." );
else if ( ! ( 0 <= type <= 3 ) ) return SendError( playerid, "Invalid business type (Weed=0, Meth=1, Coke=2, Weapons=3)." );
else
{
GetPlayerPos( playerid, X, Y, Z );
AddAdminLogLineFormatted( "%s(%d) has created a business", ReturnPlayerName( playerid ), playerid );
mysql_format(
dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}%%Business%%') AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0
);
mysql_tquery( dbHandle, szBigString, "OnAdminCreateBusiness", "dddd", playerid, pID, cost, type );
}
return 1;
}
thread OnAdminCreateBusiness( playerid, targetid, cost, type )
{
new
num_rows = cache_get_row_count( );
// if there is a note or the player is a maintainer
if ( IsPlayerServerMaintainer( playerid ) || num_rows || cost >= 50000 )
{
new
iTmp = CreateBusiness( 0, "Business", cost, type, X, Y, Z );
noteid = -1; // incase the lead maintainer makes it anyway
if ( iTmp != ITER_NONE ) {
SaveToAdminLog( playerid, iTmp, "created business" );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[BUSINESS]"COL_WHITE" You have created a %s business taking up business id %d.", cash_format( cost ), iTmp );
} else {
// remove the note if there is one
if ( num_rows )
{
// get the first note
noteid = cache_get_field_content_int( 0, "ID", dbHandle );
// remove the note
SaveToAdminLog( playerid, noteid, "consumed player's note" );
mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", GetPlayerAccountID( playerid ), noteid ) );
}
static
Float: X, Float: Y, Float: Z, iTmp;
// proceed by creating the business
if ( GetPlayerPos( playerid, X, Y, Z ) && ( iTmp = CreateBusiness( 0, "Business", cost, type, X, Y, Z ) != ITER_NONE ) ) {
if ( IsPlayerConnected( targetid ) ) {
SaveToAdminLogFormatted( playerid, iTmp, "created business (business id %d) for %s (acc id %d, note id %d)", iTmp, ReturnPlayerName( targetid ), p_AccountID[ targetid ], noteid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[BUSINESS]"COL_WHITE" You have created a business in the name of %s(%d).", ReturnPlayerName( targetid ), targetid );
AddAdminLogLineFormatted( "%s(%d) has created a business for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( targetid ), targetid );
} else {
SaveToAdminLogFormatted( playerid, iTmp, "created business (business id %d)", iTmp );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[BUSINESS]"COL_WHITE" You have created a business." );
AddAdminLogLineFormatted( "%s(%d) has created a business", ReturnPlayerName( playerid ), playerid );
}
} else {
SendClientMessage( playerid, -1, ""COL_PINK"[BUSINESS]"COL_WHITE" Unable to create a business due to a unexpected error." );
}
}
else
{
SendError( playerid, "This user does not have a V.I.P Business note." );
}
return 1;
}
@ -72,7 +113,7 @@ CMD:createentrance( playerid, params[ ] )
;
if ( p_AdminLevel[ playerid ] < 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "ufffdddds[32]", ownerid, toX, toY, toZ, interior, world, customInterior, vipOnly, label ) ) return SendUsage( playerid, "/createhouse [OWNER] [TO_X] [TO_Y] [TO_Z] [INTERIOR] [WORLD] [CUSTOM_INTERIOR] [VIP_ONLY] [LABEL]" );
else if ( sscanf( params, "ufffdddds[32]", ownerid, toX, toY, toZ, interior, world, customInterior, vipOnly, label ) ) return SendUsage( playerid, "/createentrance [OWNER] [TO_X] [TO_Y] [TO_Z] [INTERIOR] [WORLD] [CUSTOM_INTERIOR] [VIP_ONLY] [LABEL]" );
else if ( !IsPlayerConnected( ownerid ) || IsPlayerNPC( ownerid ) ) return SendError( playerid, "Invalid Player ID." );
else
{
@ -83,7 +124,7 @@ CMD:createentrance( playerid, params[ ] )
entranceid = CreateEntrance( label, X, Y, Z, toX, toY, toZ, interior, world, customInterior > 0, vipOnly > 0 );
if ( entranceid == -1 )
return SendClientMessage( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" Unable to create a entrance due to a unexpected error." );
return SendClientMessage( playerid, -1, ""COL_PINK"[ENTRANCE]"COL_WHITE" Unable to create a entrance due to a unexpected error." );
SaveToAdminLog( playerid, entranceid, "created entrance" );
g_entranceData[ entranceid ] [ E_SAVED ] = true;
@ -91,7 +132,7 @@ CMD:createentrance( playerid, params[ ] )
format( szBigString, 256, "INSERT INTO `ENTRANCES` (`OWNER`, `LABEL`, `X`, `Y`, `Z`, `EX`, `EY`, `EZ`, `INTERIOR`, `WORLD`, `CUSTOM`, `VIP_ONLY`) VALUES ('%s','%s',%f,%f,%f,%f,%f,%f,%d,%d,%d,%d)", mysql_escape( ReturnPlayerName( ownerid ) ), mysql_escape( label ), X, Y, Z, toX, toY, toZ, interior, world, customInterior, vipOnly );
mysql_single_query( szBigString );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" You have created a entrance using id %d.", entranceid );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ENTRANCE]"COL_WHITE" You have created a entrance using id %d.", entranceid );
}
}
return 1;

View File

@ -507,7 +507,7 @@ CMD:ban( playerid, params [ ] )
CMD:banlog( playerid, params[ ] )
{
new
new
iName[ MAX_PLAYER_NAME ];
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
@ -522,14 +522,14 @@ CMD:banlog( playerid, params[ ] )
thread OnPlayerBanLog( playerid, const Name[ ] )
{
new
new
rows = cache_get_row_count( );
if ( ! rows ) {
return SendError( playerid, "This player isn't banned." );
}
static
static
ban_ip[ 16 ],
ban_reason[ 80 ],
ban_by[ 24 ],
@ -632,8 +632,7 @@ CMD:chatban( playerid, params[ ] )
p_ChatBannedBy[ pID ] = ReturnPlayerName( playerid );
p_ChatBanReason[ pID ] = reason;
mysql_single_query( sprintf( "INSERT INTO `CHAT_BANS` (`ID`, `NAME`, `BANNED_BY_ID`, `BANNED_BY`, `REASON`) VALUES (%d, '%s', %d, '%s', '%s')", p_AccountID[ pID ], mysql_escape( ReturnPlayerName( pID ) ), p_AccountID[ playerid ], mysql_escape( ReturnPlayerName( playerid ) ), mysql_escape( reason ) ) );
SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat banned by %s for '%s'.", ReturnPlayerName( playerid ), reason );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat banned %s for '%s'.", ReturnPlayerName( pID ), reason );
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s has chat banned %s(%d) "COL_GREEN"[REASON: %s]", ReturnPlayerName( playerid ), ReturnPlayerName( pID ), pID, reason );
AddAdminLogLineFormatted( "%s(%d) has chat banned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat ban" );
}
@ -643,7 +642,7 @@ CMD:chatban( playerid, params[ ] )
CMD:unchatban( playerid, params[ ] )
{
new pID;
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
@ -655,8 +654,7 @@ CMD:unchatban( playerid, params[ ] )
{
p_ChatBanned{ pID } = false;
mysql_single_query( sprintf( "DELETE FROM `CHAT_BANS` WHERE `ID`=%d", p_AccountID[ pID ] ) );
SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat unbanned by %s.", ReturnPlayerName( pID ) );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat unbanned %s.", ReturnPlayerName( pID ) );
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s(%d) has been chat un-banned by %s", ReturnPlayerName( pID ), pID, ReturnPlayerName( playerid ) );
AddAdminLogLineFormatted( "%s(%d) has chat unbanned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" );
}

View File

@ -22,11 +22,6 @@ CMD:help( playerid, params[ ] ) {
}
CMD:features( playerid, params[ ] ) {
return DisplayFeatures( playerid );
}
stock DisplayFeatures( playerid )
{
SetPVarInt( playerid, "help_category", 1 );
mysql_function_query( dbHandle, "SELECT `SUBJECT`,`ID`,`CATEGORY` FROM `HELP` WHERE `CATEGORY`=1 ORDER BY `SUBJECT` ASC", true, "OnFetchCategoryResponse", "dd", playerid, 1 );
return 1;

View File

@ -6,7 +6,7 @@
*/
/* ** Enable or disable discord ** */
// #define DISCORD_DISABLED // !!!! DISABLED BY DEFAULT !!!!
#define DISCORD_DISABLED // !!!! DISABLED BY DEFAULT !!!!
/* ** Includes ** */
#include < YSI\y_hooks >

View File

@ -366,6 +366,6 @@ stock SetPlayerC4Amount( playerid, amount ) {
stock GivePlayerC4( playerid, amount )
{
mysql_single_query( sprintf( "UPDATE `USERS` SET `C4` = %d WHERE `ID` = %d", p_C4Amount[ playerid ], GetPlayerAccountID( playerid ) ) );
mysql_single_query( sprintf( "UPDATE `USERS` SET `C4` = %d WHERE `ID` = %d", GetPlayerC4Amount( playerid ) + amount, GetPlayerAccountID( playerid ) ) );
SetPlayerC4Amount( playerid, GetPlayerC4Amount( playerid ) + amount );
}

View File

@ -9,6 +9,8 @@
#include < YSI\y_hooks >
/* ** Variables ** */
static const COP_ARREST_PAY_PER_WANTED = 330;
static const COP_DETAIN_PAY_PER_WANTED = 385;
/* ** Forwards ** */
forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople );
@ -54,7 +56,7 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid )
totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
iDetained++;
iCashEarned += ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 350 );
iCashEarned += ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_DETAIN_PAY_PER_WANTED );
KillTimer( p_CuffAbuseTimer[ victimid ] );
SetPlayerSpecialAction( victimid, SPECIAL_ACTION_NONE );
RemovePlayerAttachedObject( victimid, 2 );
@ -176,7 +178,7 @@ CMD:arrest( playerid, params[ ] )
if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "You cannot arrest a person that is inside a vehicle." );
if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." );
if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." );
new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 300 );
new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_ARREST_PAY_PER_WANTED );
new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER );
GivePlayerScore( playerid, 2 );
GivePlayerExperience( playerid, E_POLICE );

View File

@ -275,6 +275,10 @@ stock JailPlayer( playerid, seconds, admin = 0 )
SetPlayerPosToPrison ( playerid );
Player_CheckPokerGame ( playerid, "Jailed" );
#if defined __cloudy_event_system
RemovePlayerFromEvent ( playerid, true );
#endif
// External Functions
SetPlayerSpecialAction ( playerid, SPECIAL_ACTION_NONE );
ClearAnimations ( playerid );
@ -541,4 +545,4 @@ stock jailDoors( playerid, remove = false, set_closed = true )
DestroyDynamicObject( p_AlcatrazObject[ playerid ] ), p_AlcatrazObject[ playerid ] = INVALID_OBJECT_ID;
}
}
}

View File

@ -1,8 +1,8 @@
/*
* Irresistible Gaming (c) 2018
* Developed by Steven
* Developed by Stev
* Module: cnr/features/duel.pwn
* Purpose: player duling system
* Purpose: player dueling system
*/
/* ** Includes ** */
@ -11,26 +11,18 @@
/* ** 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 E_DUEL_DATA
{
E_PLAYER, E_WEAPON[ 2 ], E_BET,
Float: E_ARMOUR, Float: E_HEALTH, E_COUNTDOWN,
E_TIMER, E_LOCATION_ID, E_ROUNDS,
bool: E_CAC
};
enum E_DUEL_LOCATION_DATA
{
E_NAME [ 19 ], Float: E_POS_ONE[ 3 ], Float: E_POS_TWO[ 3 ]
E_NAME [ 22 ], Float: E_POS_ONE[ 3 ], Float: E_POS_TWO[ 3 ]
};
new
@ -39,19 +31,18 @@ new
g_duelData [ MAX_PLAYERS ][ E_DUEL_DATA ],
g_duelLocationData [ ][ E_DUEL_LOCATION_DATA ] =
{
{ "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 }}
{ "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 } },
{ "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 } },
{ "Gacia Baseball Ground", { -2305.7549, 92.3505, 35.3516 }, { -2322.0908, 108.5021, 35.3984 } }
},
bool: p_playerDueling [ MAX_PLAYERS char ],
p_duelInvitation [ MAX_PLAYERS ][ MAX_PLAYERS ],
@ -178,6 +169,14 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] )
case 6: ShowPlayerDialog(playerid, DIALOG_DUEL_WAGER, DIALOG_STYLE_INPUT, ""COL_WHITE"Duel Settings - Set A Wager", ""COL_WHITE"Please enter the wager for this duel:", "Select", "Back");
case 7:
{
g_duelData[ playerid ][ E_CAC ] = !g_duelData[ playerid ][ E_CAC ];
SendClientMessageFormatted( playerid, -1, ""COL_DUEL"[DUEL]{FFFFFF} You have %s "COL_GREY"CAC Only"COL_WHITE".", g_duelData[ playerid ][ E_CAC ] ? ( "enabled" ) : ( "disabled" ) );
ShowPlayerDuelMenu( playerid );
}
case 8:
{
new
pID = g_duelData [ playerid ][ E_PLAYER ];
@ -188,8 +187,15 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] )
return ShowPlayerDuelMenu( playerid );
}
if ( g_duelData[ playerid ][ E_CAC ] && ( ! IsPlayerUsingSampAC( pID ) && ! IsPlayerUsingSampAC( playerid ) ) )
{
SendError( playerid, "You and your opponent must be using CAC to duel!" );
return ShowPlayerDuelMenu( playerid );
}
p_duelInvitation[ playerid ][ pID ] = gettime( ) + 60;
ShowPlayerHelpDialog( pID, 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 ), g_duelLocationData [ g_duelData[ playerid ][ E_LOCATION_ID ] ][ E_NAME ], ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 0 ] ), ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 1 ] ), cash_format(g_duelData[ playerid ][ E_BET ]));
ShowPlayerHelpDialog( pID, 10000, "%s wants to duel!~n~~n~~y~Location: ~w~%s~n~~y~Weapon: ~w~%s and %s~n~~y~Wager: ~w~%s~n~~y~CAC: ~w~%s", ReturnPlayerName( playerid ), g_duelLocationData [ g_duelData[ playerid ][ E_LOCATION_ID ] ][ E_NAME ], ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 0 ] ), ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 1 ] ), cash_format(g_duelData[ playerid ][ E_BET ] ), g_duelData[ playerid ][ E_CAC ] ? ( "~g~Yes" ) : ( "~r~No" ) );
SendClientMessageFormatted( playerid, -1, ""COL_DUEL"[DUEL]"COL_WHITE" You have sent a duel invitation to %s for "COL_GOLD"%s"COL_WHITE".", ReturnPlayerName( pID ), cash_format( g_duelData[ playerid ][ E_BET ] ) );
SendClientMessageFormatted( pID, -1, ""COL_DUEL"[DUEL]"COL_WHITE" You are invited to duel %s for "COL_GOLD"%s"COL_WHITE", use \"/duel accept %d\".", ReturnPlayerName( playerid ), cash_format( g_duelData[ playerid ][ E_BET ] ), playerid );
}
@ -495,14 +501,15 @@ stock ShowPlayerDuelMenu( playerid )
return SendError( playerid, "You cannot duel whilst having a wanted level.");
format( szBigString, sizeof(szBigString),
"Player\t"COL_GREY"%s\nHealth\t"COL_GREY"%.2f%%\nArmour\t"COL_GREY"%.2f%%\nPrimary Weapon\t"COL_GREY"%s\nSecondary Weapon\t"COL_GREY"%s\nLocation\t"COL_GREY"%s\nWager\t"COL_GREY"%s\n"COL_GOLD"Send Invite\t"COL_GOLD">>>",
"Player\t"COL_GREY"%s\nHealth\t"COL_GREY"%.2f%%\nArmour\t"COL_GREY"%.2f%%\nPrimary Weapon\t"COL_GREY"%s\nSecondary Weapon\t"COL_GREY"%s\nLocation\t"COL_GREY"%s\nWager\t"COL_GREY"%s\nCAC Only\t"COL_GREY"%s\n"COL_GOLD"Send Invite\t"COL_GOLD">>>",
( ! IsPlayerConnected( g_duelData[ playerid ][ E_PLAYER ] ) ? ( ""COL_RED"No-one" ) : ( ReturnPlayerName( g_duelData[ playerid ][ E_PLAYER ] ) ) ),
g_duelData[ playerid ][ E_HEALTH ],
g_duelData[ playerid ][ E_ARMOUR ],
ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 0 ] ),
ReturnWeaponName( g_duelData[ playerid ][ E_WEAPON ][ 1 ] ),
g_duelLocationData[ g_duelData[ playerid ][ E_LOCATION_ID ] ][ E_NAME ],
cash_format( g_duelData[ playerid ][ E_BET ] )
cash_format( g_duelData[ playerid ][ E_BET ] ),
( g_duelData[ playerid ][ E_CAC ] ? ( ""COL_GREEN"ENABLED" ) : ( ""COL_RED"DISABLED" ) )
);
ShowPlayerDialog( playerid, DIALOG_DUEL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Duel Settings", szBigString, "Select", "Cancel" );

View File

@ -285,14 +285,7 @@ hook OnPlayerEnterDynArea( playerid, areaid )
new
first_turf = Turf_GetFirstTurf( playerid );
if ( ! IsPlayerMovieMode( playerid ) )
{
if ( first_turf == INVALID_GANG_TURF )
return PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], "_" );
// if ( p_GangID[ playerid ] != INVALID_GANG_ID && g_gangTurfData[ first_turf ] [ E_OWNER ] == INVALID_GANG_ID ) ShowPlayerHelpDialog( playerid, 2000, "You can take over this turf by typing ~g~/takeover" );
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], sprintf( "~r~~h~(%s)~n~~w~~h~%s", g_gangTurfData[ first_turf ] [ E_FACILITY_GANG ] != INVALID_GANG_ID ? ( "FACILITY" ) : ( "TERRITORY" ), ReturnGangName( g_gangTurfData[ first_turf ] [ E_OWNER ] ) ) );
}
CallLocalFunction( "OnPlayerUpdateGangZone", "dd", playerid, first_turf );
}
return Y_HOOKS_CONTINUE_RETURN_1;
}
@ -346,6 +339,21 @@ hook OnPlayerLeaveDynArea( playerid, areaid )
return Y_HOOKS_CONTINUE_RETURN_1;
}
public OnPlayerUpdateGangZone( playerid, zoneid )
{
if ( ! IsPlayerMovieMode( playerid ) )
{
if ( zoneid == INVALID_GANG_TURF )
return PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], "_" );
if ( p_GangID[ playerid ] != INVALID_GANG_ID && g_gangTurfData[ zoneid ] [ E_OWNER ] == INVALID_GANG_ID )
ShowPlayerHelpDialog( playerid, 6000, "You can take over this turf by typing ~g~/takeover" );
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], sprintf( "~r~~h~(%s)~n~~w~~h~%s", g_gangTurfData[ zoneid ] [ E_FACILITY_GANG ] != INVALID_GANG_ID ? ( "FACILITY" ) : ( "TERRITORY" ), g_gangTurfData[ zoneid ] [ E_OWNER ] == -1 ? ( "Uncaptured" ) : ( ReturnGangName( g_gangTurfData[ zoneid ] [ E_OWNER ] ) ) ) );
}
return 1;
}
/* ** Commands ** */
CMD:takeover( playerid, params[ ] )
{

View File

@ -322,7 +322,7 @@ hook OnPlayerEditDynObject( playerid, objectid, response, Float: x, Float: y, Fl
g_gateData[ gID ] [ E_RX ] = float( floatround( rx ) );
g_gateData[ gID ] [ E_RY ] = float( floatround( ry ) );
g_gateData[ gID ] [ E_RZ ] = float( floatround( rz ) );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GATE]"COL_WHITE" Gate Open Position: "COL_GREY" %f, %f, %f, %f, %f, %f", g_gateData[ gID ] [ E_X ], g_gateData[ gID ] [ E_Y ], g_gateData[ gID ] [ E_Z ], g_gateData[ gID ] [ E_RX ], g_gateData[ gID ] [ E_RY ], g_gateData[ gID ] [ E_RZ ] );
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GATE]"COL_WHITE" Gate Close Position: "COL_GREY" %f, %f, %f, %f, %f, %f", g_gateData[ gID ] [ E_X ], g_gateData[ gID ] [ E_Y ], g_gateData[ gID ] [ E_Z ], g_gateData[ gID ] [ E_RX ], g_gateData[ gID ] [ E_RY ], g_gateData[ gID ] [ E_RZ ] );
}
case 10:
{

View File

@ -18,7 +18,7 @@
/* ** Constants ** */
static const
HOUSE_LISTING_FEE = 75000;
HOUSE_LISTING_FEE = 50000;
/* ** Variables ** */
static stock
@ -124,8 +124,8 @@ CMD:estate( playerid, params[ ] )
else if ( ! Iter_Contains( houses, houseid ) ) return SendError( playerid, "You are not inside of any home." );
else if ( g_houseData[ houseid ] [ E_COST ] > 2500 ) return SendError( playerid, "This home is not a V.I.P home." );
else if ( ! IsPlayerHomeOwner( playerid, houseid ) ) return SendError( playerid, "You are not the owner of this home." );
else if ( cash < 10000 ) return SendError( playerid, "Please specify an ask price greater than $100.000." );
else if ( cash > 100000000 ) return SendError( playerid, "Please specify an ask price less than $100.000.000." );
else if ( cash < 10000 ) return SendError( playerid, "Please specify an ask price greater than $100,000." );
else if ( cash > 100000000 ) return SendError( playerid, "Please specify an ask price less than $100,000,000." );
else if ( GetPlayerCash( playerid ) < HOUSE_LISTING_FEE && GetPlayerVIPLevel( playerid ) < VIP_PLATINUM ) return SendError( playerid, "You need at least %s to create a house listing.", cash_format( HOUSE_LISTING_FEE ) );
else
{
@ -314,7 +314,7 @@ thread HouseListing_OnCreateListing( playerid, houseid, ask_price )
// insert into database and notify
mysql_single_query( sprintf( "INSERT INTO `HOUSE_LISTINGS` (`HOUSE_ID`, `USER_ID`, `ASK`) VALUES (%d, %d, %d)", houseid, GetPlayerAccountID( playerid ), ask_price ) );
return SendServerMessage( playerid, "You have listed your home. You can retract your listing using "COL_GREY"/estate list cancel"COL_WHITE"." );
return SendServerMessage( playerid, "You have listed your home for "COL_GOLD"%s"COL_WHITE". Retract the listing by "COL_GREY"/estate list cancel"COL_WHITE".", cash_format( ask_price ) );
}
else
{

View File

@ -208,13 +208,21 @@ thread OnGrabLatestDonor( hidden )
new Float: last_donation = cache_get_field_content_float( 0, "LAST_AMOUNT", dbHandle );
new Float: total_donations = cache_get_field_content_float( 0, "TOTAL_DONATIONS", dbHandle );
new Float: funding_goal_percent = total_donations / GetServerVariableFloat( "donation_goal_amount" ) * 100.0;
// Prevents total revenue for the month being disclosed mathematically
if ( funding_goal_percent >= 100.0 ) {
TextDrawSetString( g_TopDonorTD, sprintf( "Latest Donor %s - $%0.2f, ~g~Month Is Fully %0.2f%% Funded!", szName, last_donation, 100.0 ) );
new Float: funding_goal = GetServerVariableFloat( "donation_goal_amount" );
// make this optional
if ( funding_goal > 0.0 ) {
new Float: funding_goal_percent = total_donations / funding_goal * 100.0;
// Prevents total revenue for the month being disclosed mathematically
if ( funding_goal_percent >= 100.0 ) {
TextDrawSetString( g_TopDonorTD, sprintf( "Latest Donor %s - $%0.2f, ~g~Month Is Fully %0.2f%% Funded!", szName, last_donation, 100.0 ) );
} else {
TextDrawSetString( g_TopDonorTD, sprintf( "Latest Donor %s - $%0.2f, ~r~Month Is Only %0.2f%% Funded!", szName, last_donation, funding_goal_percent ) );
}
} else {
TextDrawSetString( g_TopDonorTD, sprintf( "Latest Donor %s - $%0.2f, ~r~Month Is Only %0.2f%% Funded!", szName, last_donation, funding_goal_percent ) );
TextDrawSetString( g_TopDonorTD, sprintf( "Latest Donor %s - $%0.2f", szName, last_donation ) );
}
// Play song!
@ -299,7 +307,7 @@ CMD:updatedonategoal( playerid, params[ ] )
if ( ! IsPlayerAdmin( playerid ) && ! IsPlayerLeadMaintainer( playerid ) ) return 0;
else if ( sscanf( params, "f", donation_goal ) ) return SendUsage( playerid, "/updatedonationreq [DONATION_GOAL_AMOUNT]" );
else if ( ! ( 1.0 <= donation_goal < 10000.0 ) ) return SendError( playerid, "Donation goal amount must be between $1 and $10,000." );
else if ( ! ( 0.0 <= donation_goal < 10000.0 ) ) return SendError( playerid, "Donation goal amount must be between $0 and $10,000." );
else
{
new

View File

@ -11,45 +11,6 @@
/* ** Functions ** */
hook OnScriptInit( )
{
// Classes
CreateDynamicObject( 14846, 242.121002, 77.313003, 1605.078002, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 2605, 237.936004, 85.197998, 1604.431030, 0.000000, 0.000000, 80.000000, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 2356, 238.682006, 84.823997, 1604.057983, 0.000000, 0.000000, 61.299999, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 19623, 236.035995, 86.892997, 1605.670043, 0.000000, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 19611, 236.072998, 86.892997, 1604.037963, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 );
SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 85.385002, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 );
SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.037002, 87.126998, 1605.214965, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 );
SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.035003, 87.125000, 1605.713012, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.453979, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.104003, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.754028, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.404052, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.053955, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.223999, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.333984, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.884033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.994018, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.524047, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.634033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 88.864997, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 );
SetDynamicObjectMaterial( CreateDynamicObject( 2834, 230.143997, 86.521003, 1604.057983, 0.000000, 0.000000, 8.199999, .priority = 9999, .streamdistance = -1.0 ), 0, 6287, "pierc_law2", "bluemetal", -16 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.284057, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.163940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 );
SetDynamicObjectMaterial( CreateDynamicObject( 19377, 228.938995, 87.805999, 1605.038940, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 19377, "none", "none", 1 );
CreateDynamicObject( 927, 229.072006, 89.900001, 1605.298950, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 927, 229.072006, 84.360000, 1605.698974, 0.000000, 180.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 );
CreateDynamicObject( 927, 229.072006, 82.709999, 1606.699951, 0.000000, -90.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.413940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "7'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.063964, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "6'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 );
SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.014038, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 );
tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199999, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 );
SetDynamicObjectMaterialText( tmpVariable, 0, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
SetDynamicObjectMaterialText( tmpVariable, 1, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
SetDynamicObjectMaterialText( tmpVariable, 2, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
SetDynamicObjectMaterialText( tmpVariable, 3, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 );
// Misc
CreateDynamicObject(1498, 308.68, 312.10, 1002.30, 0.00, 0.00, 0.00); // Michelle's interior door
CreateDynamicObject(19312, 191.16823, 1870.02869, 21.45658, 0.00, 0.00, 0.00); // Area 51

View File

@ -135,7 +135,7 @@ hook OnScriptInit( )
TextDrawColor(g_MotdTD, -1);
TextDrawSetOutline(g_MotdTD, 1);
TextDrawSetProportional(g_MotdTD, 1);
TextDrawSetString( g_MotdTD, "~w~Want more ~g~money~w~, ~r~houses~w~, and ~b~vehicles~w~? Consider donating! ~y~/vip" );
TextDrawSetString( g_MotdTD, "_" );
g_ObjectLoadTD = TextDrawCreate(320.000000, 148.000000, "Loading Objects...~n~Please Wait...");
TextDrawAlignment(g_ObjectLoadTD, 2);

View File

@ -1,7 +1,7 @@
-- CREATE A MIGRATION ENTRY
INSERT INTO `DB_MIGRATIONS` (`MIGRATION`) VALUES ('20190405_cnr_chat_ban_creation');
--BEGIN
-- BEGIN
-- CREATE TABLE
CREATE TABLE IF NOT EXISTS `CHAT_BANS` (

View File

@ -4,4 +4,5 @@ INSERT INTO `DB_MIGRATIONS` (`MIGRATION`) VALUES ('20190530_cnr_realestate_ask')
-- BEGIN
-- -- ALTER COLUMN TO BE INT INSTEAD OF FLOAT
ALTER TABLE `house_listings` CHANGE COLUMN `ASK` `ASK` INT NULL DEFAULT NULL AFTER `USER_ID`;
ALTER TABLE `HOUSE_LISTINGS` CHANGE COLUMN `ASK` `ASK` INT NULL DEFAULT NULL AFTER `USER_ID`;
TRUNCATE TABLE `HOUSE_LISTINGS`;

View File

@ -105,7 +105,7 @@ public OnGameModeInit()
strcat( szLargeString, "LEFT JOIN `TOYS` as a9 ON a9.`USER_ID` = a1.`ID` " );
strcat( szLargeString, "LEFT JOIN `GARAGES` as a10 ON a10.`OWNER` = a1.`ID` " );
strcat( szLargeString, "LEFT JOIN `BUSINESSES` as a11 ON a11.`OWNER_ID` = a1.`ID` " );
strcat( szLargeString, "WHERE UNIX_TIMESTAMP()-a1.`LASTLOGGED` > 15552000" );
strcat( szLargeString, "WHERE UNIX_TIMESTAMP()-a1.`LASTLOGGED` > 11510640000" );
mysql_function_query( dbHandle, szLargeString, true, "onRemoveInactiveRows", "d", 0 );
// Reset VIPs
@ -1040,11 +1040,40 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
/*if ( p_Class[ issuerid ] == CLASS_POLICE && p_Class[ playerid ] != CLASS_POLICE && !p_WantedLevel[ playerid ] && GetPlayerState( playerid ) != PLAYER_STATE_WASTED ) {
ShowPlayerHelpDialog( issuerid, 2000, "You should not hurt innocent civilians, you're a ~b~cop~w~~h~!" );
}*/
if ( p_Class[ issuerid ] == CLASS_POLICE && p_Class[ playerid ] != CLASS_POLICE && !p_WantedLevel[ playerid ] && GetPlayerState( playerid ) != PLAYER_STATE_WASTED && ! IsPlayerInEvent( issuerid ) )
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot hurt innocent civilians, you're a ~b~cop~w~~h~!" ), 0;
if ( p_Class[ playerid ] == p_Class[ issuerid ] && p_Class[ playerid ] != CLASS_CIVILIAN )
#if defined __cloudy_event_system
if( IsPlayerInEvent( issuerid ) && IsPlayerInEvent( playerid ) )
{
if( g_eventData[ EV_FIGHT_TYPE] == 3 ) return 0;
if( p_Class[ issuerid ] == p_Class[ playerid ] )
{
if ( p_Class[ issuerid ] == CLASS_CIVILIAN && g_eventData[ EV_FIGHT_TYPE ] == 0 ) // Cops Vs Civilians
return 0;
if ( p_Class[ issuerid ] == CLASS_POLICE && g_eventData[ EV_FIGHT_TYPE ] < 2 ) // ( Cops Vs Civilians ) Or ( Civilians Vs Civilians Vs Cops )
return 0;
}
}
#endif
#if defined __cloudy_event_system
if ( p_Class[ issuerid ] == CLASS_POLICE && p_Class[ playerid ] != CLASS_POLICE && !p_WantedLevel[ playerid ] && GetPlayerState( playerid ) != PLAYER_STATE_WASTED && ! ( IsPlayerInEvent( issuerid ) && IsPlayerInEvent( playerid ) && g_eventData[ EV_FIGHT_TYPE ] < 3 ) )
#else
if ( p_Class[ issuerid ] == CLASS_POLICE && p_Class[ playerid ] != CLASS_POLICE && !p_WantedLevel[ playerid ] && GetPlayerState( playerid ) != PLAYER_STATE_WASTED )
#endif
{
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot hurt innocent civilians, you're a ~b~cop~w~~h~!" ), 0;
}
#if defined __cloudy_event_system
if ( p_Class[ playerid ] == p_Class[ issuerid ] && p_Class[ playerid ] != CLASS_CIVILIAN && ! ( IsPlayerInEvent( issuerid ) && IsPlayerInEvent( playerid ) && g_eventData[ EV_FIGHT_TYPE ] == 2 ) )
#else
if ( p_Class[ playerid ] == p_Class[ issuerid ] && p_Class[ playerid ] != CLASS_CIVILIAN )
#endif
{
return 0;
}
if ( p_BulletInvulnerbility[ playerid ] > g_iTime )
return ShowPlayerHelpDialog( issuerid, 2000, "This player is immune from damage!" ), 0;
@ -1058,15 +1087,16 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
if ( IsPlayerTazed( playerid ) || IsPlayerCuffed( playerid ) || IsPlayerKidnapped( playerid ) || IsPlayerTied( playerid ) || IsPlayerLoadingObjects( playerid ) || IsPlayerAdminOnDuty( playerid ) || IsPlayerSpawnProtected( playerid ) )
return 0;
// Rhino damage invulnerable
if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 )
return 0;
// Anti RDM and gang member damage
if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
if ( ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
{
if ( IsPlayerInPlayerGang( issuerid, playerid ) ) {
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
#if defined __cloudy_event_system
if ( IsPlayerInPlayerGang( issuerid, playerid ) && ! ( IsPlayerInEvent( playerid ) && IsPlayerInEvent( issuerid ) && g_eventData[ EV_FIGHT_TYPE] <= 2 ) )
#else
if ( IsPlayerInPlayerGang( issuerid, playerid ) )
#endif
{
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
}
// Anti Random Deathmatch
@ -1092,13 +1122,11 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b
// Headshots
#if defined __cloudy_event_system
if ( ( weaponid == WEAPON_SNIPER || weaponid == WEAPON_RIFLE ) && bodypart == 9 && ( ! IsPlayerInEvent( playerid ) || ( IsPlayerInEvent( playerid ) && EventSettingAllow( EVENT_SETTING_HEADSHOT ) ) ) )
if ( ( weaponid == WEAPON_SNIPER || weaponid == WEAPON_RIFLE ) && bodypart == 9 && ( ! IsPlayerInEvent( playerid ) || ( IsPlayerInEvent( playerid ) && EventSettingAllow( 3 ) ) ) )
#else
if ( ( weaponid == WEAPON_SNIPER || weaponid == WEAPON_RIFLE ) && bodypart == 9 )
#endif
{
amount *= 1.5;
}
// Paintball Headshot
if ( issuerid != INVALID_PLAYER_ID && p_inPaintBall{ playerid } == true )
@ -1297,7 +1325,7 @@ public OnPlayerDeath( playerid, killerid, reason )
if ( p_WantedLevel[ playerid ] > 5 )
{
static const killedWords[ ] [ ] = { { "murked" }, { "killed" }, { "ended" }, { "slain" }, { "massacred" }, { "destroyed" }, { "screwed" } };
new cashEarned = ( p_WantedLevel[ playerid ] < MAX_WANTED_LVL ? p_WantedLevel[ playerid ] : MAX_WANTED_LVL ) * ( reason == 38 || reason == 51 ? 160 : 270 );
new cashEarned = ( p_WantedLevel[ playerid ] < MAX_WANTED_LVL ? p_WantedLevel[ playerid ] : MAX_WANTED_LVL ) * ( reason == 38 || reason == 51 ? 150 : 300 );
GivePlayerCash( killerid, cashEarned );
GivePlayerScore( killerid, 2 );
GivePlayerExperience( killerid, E_POLICE, 0.5 );
@ -4768,8 +4796,6 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
// ShowPlayerDialog( playerid, DIALOG_SPAWN_CITY, DIALOG_STYLE_LIST, "{FFFFFF}Select Spawning City", "San Fierro\nLas Venturas\nLos Santos\nRandom City", "Select", "" );
SendServerMessage( playerid, "Your job has been set to %s. you can change it at the City Hall for "COL_GOLD"$5,000"COL_WHITE".", GetJobName( p_Job{ playerid } ) );
DisplayFeatures( playerid );
}
else
{
@ -7147,4 +7173,4 @@ CMD:peak( playerid, params[] )
{
if ( p_AdminLevel[ playerid ] != 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
return SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" The current peak player count since startup is: %i", playersPeakCount );
}
}

View File

@ -1,5 +1,9 @@
(+) Cloudy's advanced event system has been added.
(+) Night's discord implementation has been added.
(/) "/estate" now works on a cash basis. Homes are traded for in-game money.
(/) Fee for real estate reduced to $50,000 per home.
(/) Players will lose only 5% of their stock if it drops 80% in a day.
(/) Full reversion of the turf war system to how it was pre-hardpoint.
(/) You need Bronze V.I.P to send Irresistible Coins.
(/) You need Bronze V.I.P to send Irresistible Coins.
(/) Army is now vulnerable to damage in rhinos.
(/) Police are now paid 10% extra.