commit
638f34a732
@ -376,6 +376,11 @@ stock SavePlayerData( playerid, bool: logout = false )
|
||||
if ( IsPlayerCuffed( playerid ) || IsPlayerTazed( playerid ) || IsPlayerTied( playerid ) || p_LeftCuffed{ playerid } || p_QuitToAvoidTimestamp[ playerid ] > g_iTime )
|
||||
bQuitToAvoid = true;
|
||||
|
||||
#if defined __cloudy_event_system
|
||||
if ( IsPlayerInEvent( playerid ) )
|
||||
bQuitToAvoid = false;
|
||||
#endif
|
||||
|
||||
format( Query, sizeof( Query ), "UPDATE `USERS` SET `SCORE`=%d,`ADMINLEVEL`=%d,`OWNEDHOUSES`=%d,`KILLS`=%d,`DEATHS`=%d,`VIP_PACKAGE`=%d,`OWNEDCARS`=%d,`LASTLOGGED`=%d,`VIP_EXPIRE`=%d,`LAST_SKIN`=%d,`BURGLARIES`=%d,`UPTIME`=%d,`ARRESTS`=%d,`CITY`=%d,`METH`=%d,`SODA`=%d,`ACID`=%d,`GAS`=%d,",
|
||||
GetPlayerScore( playerid ), p_AdminLevel[ playerid ],
|
||||
p_OwnedHouses[ playerid ], p_Kills[ playerid ],
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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" },
|
||||
@ -163,6 +164,7 @@ static stock
|
||||
{ 5, "/seteventhost", "Setting event host to player" },
|
||||
{ 5, "/weather", "Settings world weather" },
|
||||
{ 5, "/viewpolicechat", "Viewing the police radio/chat" },
|
||||
{ 5, "/viewpbchat", "Viewing all paintball lobbies chats" },
|
||||
|
||||
/* ** Level 6 Commands ** */
|
||||
{ 6, "/reloadeditor", "Reloads object editer script" },
|
||||
|
@ -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 )
|
||||
@ -32,6 +50,18 @@ CMD:viewpolicechat( playerid, params[ ] )
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:viewpbchat( playerid, params[ ] )
|
||||
{
|
||||
if ( p_AdminLevel[ playerid ] < 5 && !IsPlayerUnderCover( playerid ) ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||
p_TogglePBChat{ playerid } = !p_TogglePBChat{ playerid };
|
||||
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have %s viewing paint-ball chat.", p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") );
|
||||
if ( !IsPlayerUnderCover( playerid ) ) {
|
||||
AddAdminLogLineFormatted( "%s(%d) has %s viewing paintball chat", ReturnPlayerName( playerid ), playerid, p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
CMD:check( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
@ -111,29 +141,69 @@ 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 );
|
||||
|
||||
if ( GetVehiclePos( iVehicle, X, Y, Z ) && GetVehicleZAngle( iVehicle, Angle ) )
|
||||
{
|
||||
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 );
|
||||
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 );
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
// 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 +667,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,23 +675,60 @@ 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 ) {
|
||||
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;
|
||||
}
|
||||
|
||||
AddAdminLogLineFormatted( "%s(%d) has created a vehicle for %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
|
||||
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( 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 );
|
||||
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 SendClientMessage( playerid, -1, ""COL_PINK"[VEHICLE]"COL_WHITE" Unable to create a vehicle due to a unexpected error." );
|
||||
}
|
||||
else SendError( playerid, "Invalid Vehicle Model." );
|
||||
else
|
||||
{
|
||||
SendError( playerid, "This user does not have a V.I.P Vehicle note." );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -680,29 +785,118 @@ 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
|
||||
{
|
||||
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 )
|
||||
{
|
||||
// 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 );
|
||||
if ( GetPlayerPos( playerid, X, Y, Z ) )
|
||||
{
|
||||
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." );
|
||||
} 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 +949,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 );
|
||||
|
@ -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
|
||||
iTmp = CreateBusiness( 0, "Business", cost, type, X, Y, Z );
|
||||
num_rows = cache_get_row_count( );
|
||||
|
||||
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 );
|
||||
// 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 )
|
||||
{
|
||||
// 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;
|
||||
|
@ -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" );
|
||||
}
|
||||
@ -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" );
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -210,8 +210,9 @@
|
||||
#define DIALOG_COMPONENTS_SELL 1200
|
||||
#define DIALOG_HOUSE_SELL 1201
|
||||
#define DIALOG_BUSINESS_SELL_CONFIRM 1202
|
||||
#define DIALOG_NEXT_PAGE_VIP 1204
|
||||
#define DIALOG_VIP_MAIN 1204
|
||||
#define DIALOG_XPMARKET_SELL 1205
|
||||
#define DIALOG_BUY_VIP_MAIN 1206
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
|
@ -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 >
|
||||
|
@ -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 );
|
||||
}
|
@ -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 );
|
||||
@ -438,6 +440,11 @@ stock AwardNearestLEO( playerid, reason )
|
||||
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || IsPlayerDead( playerid ) )
|
||||
return false;
|
||||
|
||||
#if defined __cloudy_event_system
|
||||
if ( IsPlayerInEvent( playerid ) )
|
||||
return false;
|
||||
#endif
|
||||
|
||||
new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker.
|
||||
|
||||
new closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius );
|
||||
|
@ -264,6 +264,9 @@ stock JailPlayer( playerid, seconds, admin = 0 )
|
||||
p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||
p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
|
||||
|
||||
#if defined __cloudy_event_system
|
||||
RemovePlayerFromEvent ( playerid, true );
|
||||
#endif
|
||||
CancelEdit ( playerid );
|
||||
RemovePlayerStolensFromHands( playerid );
|
||||
StopPlayerUsingSlotMachine ( playerid );
|
||||
@ -275,6 +278,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 );
|
||||
|
@ -221,10 +221,11 @@ public OnPlayerTakenDamage( playerid, issuerid, Float: amount, weaponid, bodypar
|
||||
SetTimerEx( "HideDamageObject", 1000, false, "d", playerid );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// mark player as hit
|
||||
p_GotHit{ playerid } = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* ** Hitmarker ** */
|
||||
DamageFeedAddHitGiven( issuerid, playerid, amount, weaponid );
|
||||
|
@ -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" );
|
||||
|
@ -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[ ] )
|
||||
{
|
||||
|
@ -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:
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
/* ** Constants ** */
|
||||
static const
|
||||
HOUSE_LISTING_FEE = 75000;
|
||||
HOUSE_LISTING_FEE = 50000;
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
@ -118,18 +118,18 @@ CMD:estate( playerid, params[ ] )
|
||||
else if ( !strcmp( params, "list", false, 4 ) )
|
||||
{
|
||||
new
|
||||
Float: coins;
|
||||
cash;
|
||||
|
||||
if ( sscanf( params[ 5 ], "f", coins ) ) return SendUsage( playerid, "/estate list [IC_ASK_PRICE/CANCEL]");
|
||||
if ( sscanf( params[ 5 ], "d", cash ) ) return SendUsage( playerid, "/estate list [CASH_ASK_PRICE/CANCEL]");
|
||||
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 ( coins < 25.0 ) return SendError( playerid, "Please specify an ask price greater than 25.00 IC." );
|
||||
else if ( coins > 25000.0 ) return SendError( playerid, "Please specify an ask price less than 25,000 IC." );
|
||||
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
|
||||
{
|
||||
mysql_tquery( dbHandle, sprintf( "SELECT * FROM `HOUSE_LISTINGS` WHERE `HOUSE_ID` = %d AND `SALE_DATE` IS NULL", houseid ), "HouseListing_OnCreateListing", "ddf", playerid, houseid, coins );
|
||||
mysql_tquery( dbHandle, sprintf( "SELECT * FROM `HOUSE_LISTINGS` WHERE `HOUSE_ID` = %d AND `SALE_DATE` IS NULL", houseid ), "HouseListing_OnCreateListing", "ddf", playerid, houseid, cash );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -155,7 +155,7 @@ thread HouseListing_OnShowHomes( playerid, page )
|
||||
owner[ 24 ];
|
||||
|
||||
// set headers
|
||||
szHugeString = ""COL_GREY"House\t"COL_GREY"Owner\t"COL_GREY"Location\t"COL_GREY"Ask Price (IC)\n";
|
||||
szHugeString = ""COL_GREY"House\t"COL_GREY"Owner\t"COL_GREY"Location\t"COL_GREY"Ask Price ($)\n";
|
||||
|
||||
for ( new row = 0; row < sizeof ( p_CurrentListings[ ] ); row ++ )
|
||||
{
|
||||
@ -172,9 +172,9 @@ thread HouseListing_OnShowHomes( playerid, page )
|
||||
Get2DCityShort( city, g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ] );
|
||||
GetZoneFromCoordinates( location, g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ], .placeholder = "Island" );
|
||||
|
||||
new Float: coins = cache_get_field_content_float( row, "ASK" );
|
||||
new cash = cache_get_field_content_int( row, "ASK" );
|
||||
|
||||
format( szHugeString, sizeof( szHugeString ), "%s%s\t%s\t%s, %s\t"COL_GREEN"%s IC\n", szHugeString, house_name, owner, location, city, number_format( coins, .decimals = 2 ) );
|
||||
format( szHugeString, sizeof( szHugeString ), "%s%s\t%s\t%s, %s\t"COL_GREEN"%s\n", szHugeString, house_name, owner, location, city, cash_format( cash ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -193,7 +193,7 @@ thread HouseListing_OnShowHomes( playerid, page )
|
||||
SetPVarInt( playerid, "houselisting_page", page );
|
||||
SetPVarInt( playerid, "houselisting_rows", rows );
|
||||
|
||||
return ShowPlayerDialog( playerid, DIALOG_HOUSE_LISTINGS, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin - "COL_WHITE"Premium Home Estate", szHugeString, "Select", "Close" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_HOUSE_LISTINGS, DIALOG_STYLE_TABLIST_HEADERS, "Premium Home Estate", szHugeString, "Select", "Close" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -209,15 +209,15 @@ thread HouseListing_OnShowHome( playerid, house_listing_id )
|
||||
if ( rows )
|
||||
{
|
||||
new house_id = cache_get_field_content_int( 0, "HOUSE_ID" );
|
||||
new Float: coins = cache_get_field_content_float( 0, "ASK" );
|
||||
new cash = cache_get_field_content_int( 0, "ASK" );
|
||||
|
||||
SetPVarInt( playerid, "house_listing_viewid", house_listing_id );
|
||||
SetPVarInt( playerid, "house_listing_houseid", house_id );
|
||||
|
||||
return ShowPlayerDialog(
|
||||
playerid, DIALOG_HOUSE_LIST_VIEW, DIALOG_STYLE_TABLIST,
|
||||
""COL_GOLD"Irresistible Coin - "COL_WHITE"Premium Home Estate",
|
||||
sprintf( "Purchase Home\t"COL_GREEN"%s IC\nSet GPS Waypoint\t"COL_GREY">>>", number_format( coins, .decimals = 2 ) ),
|
||||
"Premium Home Estate",
|
||||
sprintf( "Purchase Home\t"COL_GREEN"%s\nSet GPS Waypoint\t"COL_GREY">>>", cash_format( cash ) ),
|
||||
"Select", "Back"
|
||||
);
|
||||
}
|
||||
@ -235,12 +235,12 @@ thread HouseListing_OnBuyHome( playerid, house_listing_id )
|
||||
if ( rows )
|
||||
{
|
||||
new
|
||||
Float: ask_price = cache_get_field_content_float( 0, "ASK" );
|
||||
ask_price = cache_get_field_content_int( 0, "ASK" );
|
||||
|
||||
// does the dude even have the coins
|
||||
if ( GetPlayerIrresistibleCoins( playerid ) < ask_price ) {
|
||||
// does the dude even have the cash
|
||||
if ( GetPlayerCash( playerid ) < ask_price ) {
|
||||
ShowPlayerHomeListing( playerid, house_listing_id );
|
||||
return SendError( playerid, "You do not have enough Irresistible Coins for this home (%s IC).", number_format( ask_price, .decimals = 2 ) );
|
||||
return SendError( playerid, "You do not have enough money for this home (%s).", cash_format( ask_price ) );
|
||||
}
|
||||
|
||||
// check if player is over the limit
|
||||
@ -278,19 +278,19 @@ thread HouseListing_OnBuyHome( playerid, house_listing_id )
|
||||
// validate seller id
|
||||
if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) ) {
|
||||
p_OwnedHouses[ sellerid ] --;
|
||||
GivePlayerIrresistibleCoins( sellerid, ask_price );
|
||||
SendServerMessage( sellerid, "You have successfully sold your home (%s) for "COL_GOLD"%s IC"COL_WHITE" to %s(%d)!", g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ), ReturnPlayerName( playerid ), playerid );
|
||||
GivePlayerCash( sellerid, ask_price );
|
||||
SendServerMessage( sellerid, "You have successfully sold your home (%s) for "COL_GOLD"%s"COL_WHITE" to %s(%d)!", g_houseData[ houseid ] [ E_HOUSE_NAME ], cash_format( ask_price ), ReturnPlayerName( playerid ), playerid );
|
||||
} else {
|
||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `COINS` = `COINS` + %f WHERE `ID` = %d", ask_price, owner_account_id ) );
|
||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `CASH` = `CASH` + %d WHERE `ID` = %d", ask_price, owner_account_id ) );
|
||||
}
|
||||
|
||||
// show sellers name & house name
|
||||
SendServerMessage( playerid, "You have successfully bought %s's home (%s"COL_WHITE") for "COL_GOLD"%s IC"COL_WHITE"!", g_houseData[ houseid ] [ E_OWNER ], g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ) );
|
||||
SendServerMessage( playerid, "You have successfully bought %s's home (%s"COL_WHITE") for "COL_GOLD"%s"COL_WHITE"!", g_houseData[ houseid ] [ E_OWNER ], g_houseData[ houseid ] [ E_HOUSE_NAME ], cash_format( ask_price ) );
|
||||
|
||||
// set listing as sold and transfer home
|
||||
mysql_single_query( sprintf( "UPDATE `HOUSE_LISTINGS` SET `SALE_DATE` = CURRENT_TIMESTAMP WHERE `ID` = %d", house_listing_id ) );
|
||||
SetHouseOwner( houseid, GetPlayerAccountID( playerid ), ReturnPlayerName( playerid ) );
|
||||
GivePlayerIrresistibleCoins( playerid, -ask_price );
|
||||
GivePlayerCash( playerid, -ask_price );
|
||||
p_OwnedHouses[ playerid ] ++;
|
||||
return 1;
|
||||
}
|
||||
@ -300,7 +300,7 @@ thread HouseListing_OnBuyHome( playerid, house_listing_id )
|
||||
}
|
||||
}
|
||||
|
||||
thread HouseListing_OnCreateListing( playerid, houseid, Float: ask_price )
|
||||
thread HouseListing_OnCreateListing( playerid, houseid, ask_price )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
@ -313,8 +313,8 @@ thread HouseListing_OnCreateListing( playerid, houseid, Float: ask_price )
|
||||
}
|
||||
|
||||
// insert into database and notify
|
||||
mysql_single_query( sprintf( "INSERT INTO `HOUSE_LISTINGS` (`HOUSE_ID`, `USER_ID`, `ASK`) VALUES (%d, %d, %f)", 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"." );
|
||||
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 for "COL_GOLD"%s"COL_WHITE". Retract the listing by "COL_GREY"/estate list cancel"COL_WHITE".", cash_format( ask_price ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -364,7 +364,7 @@ stock ShowPlayerHomeListings( playerid, page = 0 )
|
||||
ID int(11) AUTO_INCREMENT PRIMARY KEY,
|
||||
HOUSE_ID int(11),
|
||||
USER_ID int(11),
|
||||
ASK float,
|
||||
ASK int(11),
|
||||
LISTING_DATE TIMESTAMP default CURRENT_TIMESTAMP,
|
||||
SALE_DATE TIMESTAMP nullable default null,
|
||||
FOREIGN KEY (HOUSE_ID) REFERENCES HOUSES (ID) ON DELETE CASCADE
|
||||
|
372
gamemodes/irresistible/cnr/features/houses/realestate.pwn.old
Normal file
372
gamemodes/irresistible/cnr/features/houses/realestate.pwn.old
Normal file
@ -0,0 +1,372 @@
|
||||
/*
|
||||
* Irresistible Gaming (c) 2018
|
||||
* Developed by Lorenc
|
||||
* Module: cnr\features\home\realestate.pwn
|
||||
* Purpose: home listings for player homes
|
||||
*/
|
||||
|
||||
/* ** Includes ** */
|
||||
#include < YSI\y_hooks >
|
||||
|
||||
/* ** Definitions ** */
|
||||
// #define DIALOG_HOUSE_LISTINGS 5838
|
||||
// #define DIALOG_HOUSE_LIST_VIEW 5839
|
||||
|
||||
/* ** Macros ** */
|
||||
#define ShowPlayerHomeListing(%0,%1) \
|
||||
mysql_tquery( dbHandle, sprintf( "SELECT * FROM `HOUSE_LISTINGS` WHERE `ID` = %d", %1 ), "HouseListing_OnShowHome", "dd", %0, %1 )
|
||||
|
||||
/* ** Constants ** */
|
||||
static const
|
||||
HOUSE_LISTING_FEE = 75000;
|
||||
|
||||
/* ** Variables ** */
|
||||
static stock
|
||||
p_CurrentListings [ MAX_PLAYERS ] [ 20 ];
|
||||
|
||||
/* ** Hooks ** */
|
||||
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( dialogid == DIALOG_HOUSE_LISTINGS && response )
|
||||
{
|
||||
new curr_page = GetPVarInt( playerid, "houselisting_page" );
|
||||
new curr_page_items = GetPVarInt( playerid, "houselisting_rows" );
|
||||
|
||||
// pressed previous
|
||||
if ( listitem >= curr_page_items + 1 )
|
||||
{
|
||||
return ShowPlayerHomeListings( playerid, curr_page - 1 );
|
||||
}
|
||||
|
||||
// pressed previous (on last page) / next page
|
||||
else if ( listitem == curr_page_items )
|
||||
{
|
||||
// pressed first item, but theres not even 20 items?
|
||||
if ( curr_page_items < sizeof ( p_CurrentListings[ ] ) ) {
|
||||
return ShowPlayerHomeListings( playerid, curr_page - 1 );
|
||||
} else {
|
||||
return ShowPlayerHomeListings( playerid, curr_page + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
for ( new i = 0, x = 0; i < sizeof ( p_CurrentListings[ ] ); i ++ ) if ( p_CurrentListings[ playerid ] [ i ] != -1 )
|
||||
{
|
||||
if ( x == listitem )
|
||||
{
|
||||
ShowPlayerHomeListing( playerid, p_CurrentListings[ playerid ] [ i ] );
|
||||
break;
|
||||
}
|
||||
x ++;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else if ( dialogid == DIALOG_HOUSE_LIST_VIEW )
|
||||
{
|
||||
if ( ! response )
|
||||
return ShowPlayerHomeListings( playerid, GetPVarInt( playerid, "houselisting_page" ) );
|
||||
|
||||
new houseid = GetPVarInt( playerid, "house_listing_houseid" );
|
||||
new listingid = GetPVarInt( playerid, "house_listing_viewid" );
|
||||
|
||||
switch ( listitem )
|
||||
{
|
||||
case 0: mysql_tquery( dbHandle, sprintf( "SELECT *, UNIX_TIMESTAMP(`SALE_DATE`) as `SALE_DATE_TS` FROM `HOUSE_LISTINGS` WHERE `ID` = %d", listingid ), "HouseListing_OnBuyHome", "dd", playerid, listingid );
|
||||
case 1:
|
||||
{
|
||||
if ( IsPlayerInAnyVehicle( playerid ) )
|
||||
{
|
||||
GPS_SetPlayerWaypoint( playerid, g_houseData[ houseid ] [ E_HOUSE_NAME ], g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ], g_houseData[ houseid ] [ E_EZ ] );
|
||||
SendClientMessageFormatted( playerid, -1, ""COL_GREY"[GPS]"COL_WHITE" You have set your destination to %s"COL_WHITE". Follow the arrow to reach your destination.", g_houseData[ houseid ] [ E_HOUSE_NAME ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowPlayerHomeListing( playerid, listingid );
|
||||
SendError( playerid, "You need to be in a vehicle to set a GPS waypoint." );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
hook OnHouseOwnerChange( houseid, owner )
|
||||
{
|
||||
mysql_single_query( sprintf( "DELETE FROM `HOUSE_LISTINGS` WHERE `HOUSE_ID` = %d AND `SALE_DATE` IS NULL", houseid ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ** Commands ** */
|
||||
CMD:realestate( playerid, params[ ] ) return cmd_estate( playerid, params );
|
||||
CMD:estate( playerid, params[ ] )
|
||||
{
|
||||
new
|
||||
houseid = p_InHouse[ playerid ];
|
||||
|
||||
if ( strmatch( params, "list cancel" ) )
|
||||
{
|
||||
if ( ! Iter_Contains( houses, houseid ) ) return SendError( playerid, "You are not inside of any home." );
|
||||
else if ( ! IsPlayerHomeOwner( playerid, houseid ) ) return SendError( playerid, "You are not the owner of this home." );
|
||||
{
|
||||
mysql_tquery( dbHandle, sprintf( "DELETE FROM `HOUSE_LISTINGS` WHERE `HOUSE_ID` = %d AND `SALE_DATE` IS NULL", houseid ), "HouseListing_OnDeleteListing", "dd", playerid, houseid );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else if ( !strcmp( params, "list", false, 4 ) )
|
||||
{
|
||||
new
|
||||
Float: coins;
|
||||
|
||||
if ( sscanf( params[ 5 ], "f", coins ) ) return SendUsage( playerid, "/estate list [IC_ASK_PRICE/CANCEL]");
|
||||
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 ( coins < 25.0 ) return SendError( playerid, "Please specify an ask price greater than 25.00 IC." );
|
||||
else if ( coins > 25000.0 ) return SendError( playerid, "Please specify an ask price less than 25,000 IC." );
|
||||
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
|
||||
{
|
||||
mysql_tquery( dbHandle, sprintf( "SELECT * FROM `HOUSE_LISTINGS` WHERE `HOUSE_ID` = %d AND `SALE_DATE` IS NULL", houseid ), "HouseListing_OnCreateListing", "ddf", playerid, houseid, coins );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SendServerMessage( playerid, "You can list your own home using "COL_GREY"/estate list"COL_WHITE" for %s.", p_VIPLevel[ playerid ] < VIP_PLATINUM ? ( cash_format( HOUSE_LISTING_FEE ) ) : ( "FREE" ) );
|
||||
return ShowPlayerHomeListings( playerid );
|
||||
}
|
||||
}
|
||||
|
||||
/* ** SQL Threads ** */
|
||||
thread HouseListing_OnShowHomes( playerid, page )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( rows )
|
||||
{
|
||||
static
|
||||
location[ MAX_ZONE_NAME ],
|
||||
city[ 3 ],
|
||||
house_name[ 32 ],
|
||||
owner[ 24 ];
|
||||
|
||||
// set headers
|
||||
szHugeString = ""COL_GREY"House\t"COL_GREY"Owner\t"COL_GREY"Location\t"COL_GREY"Ask Price (IC)\n";
|
||||
|
||||
for ( new row = 0; row < sizeof ( p_CurrentListings[ ] ); row ++ )
|
||||
{
|
||||
if ( row < rows )
|
||||
{
|
||||
// store all the listing ids to the player
|
||||
p_CurrentListings[ playerid ] [ row ] = cache_get_field_content_int( row, "ID" );
|
||||
|
||||
cache_get_field_content( row, "NAME", house_name );
|
||||
cache_get_field_content( row, "OWNER", owner );
|
||||
|
||||
new houseid = cache_get_field_content_int( row, "HOUSE_ID" );
|
||||
|
||||
Get2DCityShort( city, g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ] );
|
||||
GetZoneFromCoordinates( location, g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ], .placeholder = "Island" );
|
||||
|
||||
new Float: coins = cache_get_field_content_float( row, "ASK" );
|
||||
|
||||
format( szHugeString, sizeof( szHugeString ), "%s%s\t%s\t%s, %s\t"COL_GREEN"%s IC\n", szHugeString, house_name, owner, location, city, number_format( coins, .decimals = 2 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
p_CurrentListings[ playerid ] [ row ] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( rows >= sizeof ( p_CurrentListings[ ] ) ) {
|
||||
strcat( szHugeString, ""COL_GREEN"Next Page\t"COL_GREEN">>>\t"COL_GREEN">>>\t"COL_GREEN">>>\t"COL_GREEN">>>\n" );
|
||||
}
|
||||
|
||||
if ( page ) {
|
||||
strcat( szHugeString, ""COL_ORANGE"Previous Page\t"COL_ORANGE"<<<\t"COL_ORANGE"<<<\t"COL_ORANGE"<<<\t"COL_ORANGE"<<<\n" );
|
||||
}
|
||||
|
||||
SetPVarInt( playerid, "houselisting_page", page );
|
||||
SetPVarInt( playerid, "houselisting_rows", rows );
|
||||
|
||||
return ShowPlayerDialog( playerid, DIALOG_HOUSE_LISTINGS, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin - "COL_WHITE"Premium Home Estate", szHugeString, "Select", "Close" );
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "There are no available homes for sale at current." );
|
||||
}
|
||||
}
|
||||
|
||||
thread HouseListing_OnShowHome( playerid, house_listing_id )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( rows )
|
||||
{
|
||||
new house_id = cache_get_field_content_int( 0, "HOUSE_ID" );
|
||||
new Float: coins = cache_get_field_content_float( 0, "ASK" );
|
||||
|
||||
SetPVarInt( playerid, "house_listing_viewid", house_listing_id );
|
||||
SetPVarInt( playerid, "house_listing_houseid", house_id );
|
||||
|
||||
return ShowPlayerDialog(
|
||||
playerid, DIALOG_HOUSE_LIST_VIEW, DIALOG_STYLE_TABLIST,
|
||||
""COL_GOLD"Irresistible Coin - "COL_WHITE"Premium Home Estate",
|
||||
sprintf( "Purchase Home\t"COL_GREEN"%s IC\nSet GPS Waypoint\t"COL_GREY">>>", number_format( coins, .decimals = 2 ) ),
|
||||
"Select", "Back"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "An error has occurred, please try again." );
|
||||
}
|
||||
}
|
||||
|
||||
thread HouseListing_OnBuyHome( playerid, house_listing_id )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( rows )
|
||||
{
|
||||
new
|
||||
Float: ask_price = cache_get_field_content_float( 0, "ASK" );
|
||||
|
||||
// does the dude even have the coins
|
||||
if ( GetPlayerIrresistibleCoins( playerid ) < ask_price ) {
|
||||
ShowPlayerHomeListing( playerid, house_listing_id );
|
||||
return SendError( playerid, "You do not have enough Irresistible Coins for this home (%s IC).", number_format( ask_price, .decimals = 2 ) );
|
||||
}
|
||||
|
||||
// check if player is over the limit
|
||||
if ( p_OwnedHouses[ playerid ] >= GetPlayerHouseSlots( playerid ) ) {
|
||||
ShowPlayerHomeListing( playerid, house_listing_id );
|
||||
return SendError( playerid, "You cannot purchase any more houses, you've reached the limit." );
|
||||
}
|
||||
|
||||
// check if sale already completed
|
||||
new
|
||||
sale_date_ts = cache_get_field_content_int( 0, "SALE_DATE_TS" );
|
||||
|
||||
if ( sale_date_ts != 0 && GetServerTime( ) > sale_date_ts ) {
|
||||
return SendError( playerid, "You can no longer buy this home as it has been sold." );
|
||||
}
|
||||
|
||||
// check if buyer is the player himself
|
||||
new
|
||||
owner_account_id = cache_get_field_content_int( 0, "USER_ID" );
|
||||
|
||||
if ( GetPlayerAccountID( playerid ) == owner_account_id ) {
|
||||
ShowPlayerHomeListing( playerid, house_listing_id );
|
||||
return SendError( playerid, "You cannot buy your own home." );
|
||||
}
|
||||
|
||||
// credit seller if they are on/offline
|
||||
new
|
||||
houseid = cache_get_field_content_int( 0, "HOUSE_ID" ),
|
||||
sellerid;
|
||||
|
||||
foreach ( sellerid : Player ) if ( GetPlayerAccountID( sellerid ) == owner_account_id ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// validate seller id
|
||||
if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) ) {
|
||||
p_OwnedHouses[ sellerid ] --;
|
||||
GivePlayerIrresistibleCoins( sellerid, ask_price );
|
||||
SendServerMessage( sellerid, "You have successfully sold your home (%s) for "COL_GOLD"%s IC"COL_WHITE" to %s(%d)!", g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ), ReturnPlayerName( playerid ), playerid );
|
||||
} else {
|
||||
mysql_single_query( sprintf( "UPDATE `USERS` SET `COINS` = `COINS` + %f WHERE `ID` = %d", ask_price, owner_account_id ) );
|
||||
}
|
||||
|
||||
// show sellers name & house name
|
||||
SendServerMessage( playerid, "You have successfully bought %s's home (%s"COL_WHITE") for "COL_GOLD"%s IC"COL_WHITE"!", g_houseData[ houseid ] [ E_OWNER ], g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ) );
|
||||
|
||||
// set listing as sold and transfer home
|
||||
mysql_single_query( sprintf( "UPDATE `HOUSE_LISTINGS` SET `SALE_DATE` = CURRENT_TIMESTAMP WHERE `ID` = %d", house_listing_id ) );
|
||||
SetHouseOwner( houseid, GetPlayerAccountID( playerid ), ReturnPlayerName( playerid ) );
|
||||
GivePlayerIrresistibleCoins( playerid, -ask_price );
|
||||
p_OwnedHouses[ playerid ] ++;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "An error has occurred, please try again." );
|
||||
}
|
||||
}
|
||||
|
||||
thread HouseListing_OnCreateListing( playerid, houseid, Float: ask_price )
|
||||
{
|
||||
new
|
||||
rows = cache_get_row_count( );
|
||||
|
||||
if ( ! rows )
|
||||
{
|
||||
// debit user account
|
||||
if ( GetPlayerVIPLevel( playerid ) < VIP_PLATINUM ) {
|
||||
GivePlayerCash( playerid, -HOUSE_LISTING_FEE );
|
||||
}
|
||||
|
||||
// insert into database and notify
|
||||
mysql_single_query( sprintf( "INSERT INTO `HOUSE_LISTINGS` (`HOUSE_ID`, `USER_ID`, `ASK`) VALUES (%d, %d, %f)", 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"." );
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "This home is already listed. You can retract your listing using "COL_GREY"/estate list cancel"COL_WHITE"." );
|
||||
}
|
||||
}
|
||||
|
||||
thread HouseListing_OnDeleteListing( playerid, houseid )
|
||||
{
|
||||
new
|
||||
deleted_rows = cache_affected_rows( );
|
||||
|
||||
if ( deleted_rows )
|
||||
{
|
||||
return SendServerMessage( playerid, "You have delisted your home. You can create a new listing using "COL_GREY"/estate list"COL_WHITE"." );
|
||||
}
|
||||
else
|
||||
{
|
||||
return SendError( playerid, "This home is not listed on the premium realestate market." );
|
||||
}
|
||||
}
|
||||
|
||||
/* ** Functions ** */
|
||||
stock ShowPlayerHomeListings( playerid, page = 0 )
|
||||
{
|
||||
// just incase we get some negative page from user ... reset
|
||||
if ( page < 0 ) {
|
||||
page = 0;
|
||||
}
|
||||
|
||||
// format query, offset according to page
|
||||
format(
|
||||
szBigString, sizeof( szBigString ),
|
||||
"SELECT HL.ID, HL.HOUSE_ID, H.NAME, U.NAME AS OWNER, HL.ASK FROM HOUSE_LISTINGS HL " \
|
||||
"INNER JOIN HOUSES H ON H.ID = HL.HOUSE_ID " \
|
||||
"INNER JOIN USERS U ON U.ID = HL.USER_ID " \
|
||||
"WHERE SALE_DATE IS NULL LIMIT %d OFFSET %d",
|
||||
sizeof( p_CurrentListings[ ] ), page * sizeof( p_CurrentListings[ ] )
|
||||
);
|
||||
return mysql_tquery( dbHandle, szBigString, "HouseListing_OnShowHomes", "dd", playerid, page );
|
||||
}
|
||||
|
||||
/* ** Migrations ** */
|
||||
/*
|
||||
DROP TABLE HOUSE_LISTINGS;
|
||||
CREATE TABLE IF NOT EXISTS HOUSE_LISTINGS (
|
||||
ID int(11) AUTO_INCREMENT PRIMARY KEY,
|
||||
HOUSE_ID int(11),
|
||||
USER_ID int(11),
|
||||
ASK float,
|
||||
LISTING_DATE TIMESTAMP default CURRENT_TIMESTAMP,
|
||||
SALE_DATE TIMESTAMP nullable default null,
|
||||
FOREIGN KEY (HOUSE_ID) REFERENCES HOUSES (ID) ON DELETE CASCADE
|
||||
)
|
||||
*/
|
@ -26,7 +26,8 @@ static stock
|
||||
{ -2767.3765, 1257.077, 11.7703, 0xFFFF, "{FFFFFF}You can mine ores and store your ores in dunes for exportation! Grab the spade and hit the ore!" }, // Mining
|
||||
{ 1954.71890, 1038.251, 992.859, 0xFFFF, "{FFFFFF}Test out your luck on the slot machines, maybe you might win the mega jackpot!" }, // Slots
|
||||
{ 1955.69070, 1005.167, 992.468, 0xFFFF, "{FFFFFF}Roulette can payout up to $3.5M! Single bets return 35x your money whereas outside bets can return 2x to 3x!" }, // Roulette
|
||||
{ 2085.5896, 1239.4589, 414.745, 0xFFFF, "{FFFFFF}Buy materials at a convience store and cook meth! Aim and shoot each ingredient to add them as you /meth cook!" } // Meth Cook
|
||||
{ 2085.5896, 1239.4589, 414.745, 0xFFFF, "{FFFFFF}Buy materials at a convience store and cook meth! Aim and shoot each ingredient to add them as you /meth cook!" }, // Meth Cook
|
||||
{ -1486.1608, 701.3732, 7.17900, 0xFFFF, "{FFFFFF}Get a boat and sail around the sea to get a fish every few seconds of sailing." } // Fishing
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -171,6 +171,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
//SendServerMessage( playerid, "You've made "COL_GOLD"%s"COL_WHITE" from exporting. Go and pick another box up!" );
|
||||
GivePlayerCash( playerid, cash );
|
||||
GivePlayerScore( playerid, 5 );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY );
|
||||
|
||||
DestroyDynamicMapIcon( p_LumberjackMapIcon[ playerid ] );
|
||||
p_LumberjackMapIcon[ playerid ] = CreateDynamicMapIconEx( -2330.8535, -113.9084, 34.00, 51, 0, MAPICON_GLOBAL, 6000.0, { -1 }, { -1 }, aPlayer );
|
||||
|
@ -43,6 +43,7 @@ static stock
|
||||
|
||||
g_orePrices [ ] = { 675, 900, 600, 2750, 3000, 3500, 4000, 2200, 2300, 1200 },
|
||||
g_oreMiningTime [ ] = { 2000, 2800, 1600, 6800, 7200, 7600, 8000, 6400, 6560, 4000 },
|
||||
Float: g_oreMiningXp [ ] = { 0.25, 0.35, 0.2, 0.85, 0.9, 0.8, 1.0, 0.8, 0.82, 0.5 },
|
||||
g_oreQuanities [ ] = { 8, 8, 8, 8, 5, 3, 3, 5, 5, 6 },
|
||||
|
||||
// Iterator
|
||||
@ -155,21 +156,24 @@ hook OnProgressCompleted( playerid, progressid, params )
|
||||
if ( progressid == PROGRESS_MINING )
|
||||
{
|
||||
new m = p_MiningOre{ playerid };
|
||||
new iRandom = random( 101 );
|
||||
new Float: iRandom = fRandomEx( 0.0, 100.0 );
|
||||
|
||||
// increase success rate parallel to the player roleplay level
|
||||
iRandom *= 1.0 + ( GetPlayerLevel( playerid, E_ROLEPLAY ) / 100.0 );
|
||||
|
||||
p_isMining{ playerid } = false;
|
||||
g_miningData[ m ] [ E_MINING ] = INVALID_PLAYER_ID;
|
||||
|
||||
if ( ( g_miningData[ m ] [ E_ORE ] == ORE_IRON && iRandom > 80 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_BAUXITE && iRandom > 85 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_GOLD && iRandom > 45 ) ||
|
||||
if ( ( g_miningData[ m ] [ E_ORE ] == ORE_IRON && iRandom > 80.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_BAUXITE && iRandom > 85.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_GOLD && iRandom > 45.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_COAL && iRandom > 90 ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_DIAMOND && iRandom > 30 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_RUBY && iRandom > 35 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_SAPHHIRE && iRandom > 30 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_EMERALD && iRandom > 52 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_PLATINUM && iRandom > 25 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_AMETHYST && iRandom > 75 ) )
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_DIAMOND && iRandom > 30.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_RUBY && iRandom > 35.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_SAPHHIRE && iRandom > 30.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_EMERALD && iRandom > 52.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_PLATINUM && iRandom > 25.0 ) ||
|
||||
( g_miningData[ m ] [ E_ORE ] == ORE_AMETHYST && iRandom > 75.0 ) )
|
||||
)
|
||||
{
|
||||
SetPlayerMineOre( playerid, m );
|
||||
@ -188,7 +192,7 @@ hook OnProgressCompleted( playerid, progressid, params )
|
||||
SendServerMessage( playerid, "Great you've mined an ore, now store it in a "COL_GREY"Dune"COL_WHITE"." );
|
||||
}
|
||||
|
||||
//GivePlayerExperience( playerid, E_MINING );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY, g_oreMiningXp[ g_miningData[ m ] [ E_ORE ] ] );
|
||||
SetPVarInt( playerid, "carrying_ore", m );
|
||||
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CARRY );
|
||||
SetPlayerAttachedObject( playerid, 4, 2936, 5, 0.000000, 0.197999, 0.133999, 113.099983, -153.799987, 57.300003, 0.631000, 0.597000, 0.659999, g_miningData[ m ] [ E_ARGB ], g_miningData[ m ] [ E_ARGB ] );
|
||||
@ -209,6 +213,7 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid )
|
||||
|
||||
new earned_money = floatround( float( g_orePrices[ g_miningData[ ore ] [ E_ORE ] ] ) * 0.5 );
|
||||
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY, 0.2 );
|
||||
GivePlayerCash( playerid, earned_money );
|
||||
StockMarket_UpdateEarnings( E_STOCK_MINING_COMPANY, earned_money, 0.5 );
|
||||
SendServerMessage( playerid, "You have crushed a "COL_GREY"%s"COL_WHITE" Ore and earned "COL_GOLD"%s"COL_WHITE".", getOreName( g_miningData[ ore ] [ E_ORE ] ), cash_format( earned_money ) );
|
||||
@ -383,7 +388,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
GivePlayerCash( playerid, cashEarned );
|
||||
StockMarket_UpdateEarnings( E_STOCK_MINING_COMPANY, cashEarned, 0.5 );
|
||||
GivePlayerScore( playerid, floatround( oresExported / 2 ) ); // 16 score is a bit too much for ore... so half that = 8
|
||||
//GivePlayerExperience( playerid, E_MINING, float( oresExported ) * 0.2 );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY, float( oresExported ) * 0.2 );
|
||||
SendServerMessage( playerid, "You have exported %d rock ore(s) to an industry, earning you "COL_GOLD"%s"COL_WHITE".", oresExported, cash_format( cashEarned ) );
|
||||
}
|
||||
return Y_HOOKS_BREAK_RETURN_1;
|
||||
|
@ -185,6 +185,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
GivePlayerScore( playerid, 1 + floatround( p_PilotDistance[ playerid ] / 1000.0 ) );
|
||||
StockMarket_UpdateEarnings( E_STOCK_AVIATION, cash_earned, stock_dividend_allocation );
|
||||
GivePlayerCash( playerid, cash_earned );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY );
|
||||
|
||||
ShowPlayerHelpDialog( playerid, 5000, "You have earned ~y~%s ~w~for exporting %s!", cash_format( cash_earned ), g_CargoName[ p_PilotCargo[ playerid ] ] );
|
||||
StopPlayerPilotWork( playerid );
|
||||
|
@ -134,6 +134,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
|
||||
GivePlayerScore( playerid, 1 + floatround( p_TrainDistance[ playerid ] / 1000.0 ) );
|
||||
GivePlayerCash( playerid, iCashEarned );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY );
|
||||
|
||||
ach_HandleTrainMissions( playerid );
|
||||
|
||||
|
@ -181,6 +181,7 @@ hook OnPlayerEnterDynRaceCP( playerid, checkpointid )
|
||||
GivePlayerScore( playerid, 1 + floatround( p_TruckingDistance[ playerid ] / 1000.0 ) );
|
||||
StockMarket_UpdateEarnings( E_STOCK_TRUCKING_COMPANY, iCashEarned, .factor = 1.0 );
|
||||
GivePlayerCash( playerid, iCashEarned );
|
||||
GivePlayerExperience( playerid, E_ROLEPLAY );
|
||||
|
||||
p_TruckingDistance [ playerid ] = 0.0;
|
||||
p_hasTruckingJob { playerid } = false;
|
||||
|
@ -417,6 +417,10 @@ CMD:p( playerid, params[ ] )
|
||||
else
|
||||
{
|
||||
SendClientMessageToPaintball( id, -1, ""COL_GREY"<Paintball Chat> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg );
|
||||
|
||||
foreach ( new i : Player ) if ( ( p_AdminLevel[ i ] >= 5 || IsPlayerUnderCover( i ) ) && p_TogglePBChat{ i } == true ) {
|
||||
SendClientMessageFormatted( i, -1, ""COL_GREY"<Paintball Chat Lobby %d > %s(%d):"COL_WHITE" %s", id, ReturnPlayerName( playerid ), playerid, msg );
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ enum E_LEVELS {
|
||||
E_POLICE,
|
||||
E_ROBBERY,
|
||||
E_DEATHMATCH,
|
||||
E_ROLEPLAY
|
||||
|
||||
/*E_FIREMAN,
|
||||
E_PARAMEDIC,
|
||||
@ -51,8 +52,10 @@ static const
|
||||
{
|
||||
// Level Name Bar Color Level 100 Req. XP Dilation Sell Value
|
||||
{ "Police", 0x3E7EFFFF, 7500.0, 20.0, 10.0 }, // 7.5k arrests
|
||||
{ "Robbery", 0xF83245FF, 30000.0, 15.0, 10.0 }, // 30K robberies
|
||||
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0, 5.0 } // 75K kills
|
||||
{ "Robbery", 0xF83245FF, 30000.0, 15.0, 10.0 }, // 30k robberies
|
||||
{ "Deathmatch", 0xFF9233FF, 75000.0, 10.0, 5.0 }, // 75k kills
|
||||
{ "Roleplay", 0x33FF50FF, 75000.0, 10.0, 5.0 } // 75k minijob
|
||||
|
||||
/*
|
||||
{ "Fireman", 10000.0, 9.0 }, // 10k fires
|
||||
{ "Hitman", 1500.0, 4.5 }, // 1.5k contracts
|
||||
|
@ -416,7 +416,6 @@ thread StockMarket_InsertReport( stockid, Float: default_start_pool, Float: defa
|
||||
stockid, stockid
|
||||
);
|
||||
mysql_tquery( dbHandle, szLargeString, "StockMarket_PanicSell", "d", stockid );
|
||||
print(szLargeString);
|
||||
}
|
||||
|
||||
// full bankruptcy if a stock is $1 (UNTESTED!)
|
||||
|
@ -84,7 +84,9 @@ static stock
|
||||
},
|
||||
|
||||
p_CoinMarketPage [ MAX_PLAYERS char ],
|
||||
p_CoinMarketSelectedItem [ MAX_PLAYERS char ]
|
||||
p_CoinMarketSelectedItem [ MAX_PLAYERS char ],
|
||||
|
||||
p_SelectedPackage [ MAX_PLAYERS char ]
|
||||
;
|
||||
|
||||
/* ** Global Variables ** */
|
||||
@ -116,6 +118,7 @@ hook OnPlayerUpdateEx( playerid )
|
||||
|
||||
hook OnPlayerDisconnect( playerid, reason )
|
||||
{
|
||||
p_SelectedPackage{ playerid } = -1;
|
||||
p_ExtraAssetSlots{ playerid } = 0;
|
||||
p_IrresistibleCoins[ playerid ] = 0.0;
|
||||
return 1;
|
||||
@ -154,7 +157,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
|
||||
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, .decimals = 2 ) ), "Yes", "No" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_YOU_SURE_VIP, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Irresistible Coin -"COL_WHITE" Confirmation", sprintf( ""COL_WHITE"Are you sure that you want to spend %s IC?", number_format( iCoinRequirement, .decimals = 2 ) ), "Yes", "No" );
|
||||
}
|
||||
}
|
||||
else if ( dialogid == DIALOG_IC_MARKET_2 || dialogid == DIALOG_IC_MARKET_3 )
|
||||
@ -175,7 +178,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
|
||||
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, .decimals = 2 ) ), "Yes", "No" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_YOU_SURE_VIP, DIALOG_STYLE_MSGBOX, ""COL_GOLD"Irresistible Coin -"COL_WHITE" Confirmation", sprintf( ""COL_WHITE"Are you sure that you want to spend %s IC?", number_format( iCoinRequirement, .decimals = 2 ) ), "Yes", "No" );
|
||||
}
|
||||
else if ( dialogid == DIALOG_YOU_SURE_VIP )
|
||||
{
|
||||
@ -356,52 +359,204 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
}
|
||||
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_NEXT_PAGE_VIP && response )
|
||||
else if ( dialogid == DIALOG_VIP_MAIN && response )
|
||||
{
|
||||
static
|
||||
vip_description[ 1350 ];
|
||||
vip_description[ 1420 ];
|
||||
|
||||
if ( vip_description[ 0 ] == '\0' )
|
||||
switch ( listitem )
|
||||
{
|
||||
vip_description = " \t"COL_PLATINUM"Platinum VIP\t"COL_DIAMOND"Diamond VIP\n";
|
||||
strcat( vip_description, ""COL_GREEN"Price (USD)\t"COL_GREEN"$50.00 USD\t"COL_GREEN"$100.00 USD\n" );
|
||||
strcat( vip_description, "Money Provided\t$12,500,000\t$25,000,000\n" );
|
||||
strcat( vip_description, "House Provided\tY\tY\n" );
|
||||
strcat( vip_description, "Vehicle Provided\tY\tY\n" );
|
||||
strcat( vip_description, "Garage Provided\tY\tY\n" );
|
||||
strcat( vip_description, "Gate Provided\tN\tY\n" );
|
||||
strcat( vip_description, "Weed Business Provided\tN\tY\n" );
|
||||
strcat( vip_description, "House Customization\tMedium\tLarge\n" );
|
||||
strcat( vip_description, "Total house slots\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total garage slots\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total business slots\t10\tunlimited\n" );
|
||||
strcat( vip_description, "Total vehicle slots\t10\t20\n" );
|
||||
strcat( vip_description, "Weapons on spawn\t2\t2\n" );
|
||||
strcat( vip_description, "Armour on spawn\t100%\t100%\n" );
|
||||
strcat( vip_description, "Coin generation increase\t10%\t25%\n" );
|
||||
strcat( vip_description, "Ability to transfer coins P2P\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to sell coins on the coin market (/ic sell)\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to use two jobs (/vipjob)\tY\tY\n" );
|
||||
strcat( vip_description, "Premium home listing fees waived\tY\tY\n" );
|
||||
strcat( vip_description, "Tax reduction\t0%\t50%\n" );
|
||||
strcat( vip_description, "Inactive asset protection\t14 days\t31 days\n" );
|
||||
strcat( vip_description, "Total Vehicle component editing slots\t8\t10\n" );
|
||||
strcat( vip_description, "Furniture slots available\t45\t50\n" );
|
||||
strcat( vip_description, "V.I.P Lounge Weapon Redeeming Cooldown\t1 min\tno limit\n" );
|
||||
strcat( vip_description, "V.I.P Tag On Forum\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P chat\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P lounge\tY\tY\n" );
|
||||
strcat( vip_description, "Can spawn with a specific skin\tY\tY\n" );
|
||||
strcat( vip_description, "Access to V.I.P toys\tY\tY\n" );
|
||||
strcat( vip_description, "Access to custom gang colors (/gangcolor)\tY\tY\n" );
|
||||
strcat( vip_description, "Access to extra house weapon storage slots\tY\tY\n" );
|
||||
strcat( vip_description, "Can play custom radio URLs (/radio)\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to adjust your label's color (/labelcolor)\tY\tY\n" );
|
||||
strcat( vip_description, "Can show a message to people you kill (/deathmsg)\tY\tY\n" );
|
||||
strcat( vip_description, "Can adjust the sound of your hitmarker (/hitmarker)\tY\tY\n" );
|
||||
case 0: format( vip_description, sizeof( vip_description ), "\t"COL_GREY"Feature\t"COL_GREY"Reward\n"\
|
||||
"Money Provided\t"COL_GREEN"$25,000,000\n"\
|
||||
"House Provided\t"COL_GREEN"Yes\n"\
|
||||
"Vehicle Provided\t"COL_GREEN"Yes\n"\
|
||||
"Garage Provided\t"COL_GREEN"Yes\n"\
|
||||
"Gate Provided\t"COL_GREEN"Yes\n"\
|
||||
"Weed Business Provided\t"COL_GREEN"Yes\n"\
|
||||
"House Customization\t"COL_GREEN"Large\n"\
|
||||
"Total house slots\t"COL_GREEN"No limit\n"\
|
||||
"Total garage slots\t"COL_GREEN"No limit\n"\
|
||||
"Total business slots\t"COL_GREEN"No limit\n"\
|
||||
"Total vehicle slots\t"COL_GREEN"20\n"\
|
||||
"Weapons on spawn\t"COL_GREEN"3\n"\
|
||||
"Armour on spawn\t"COL_GREEN"Yes\n"\
|
||||
"Coin generation increase\t"COL_GREEN"25%%\n"\
|
||||
"Ability to transfer coins P2P\t"COL_GREEN"Yes\n"\
|
||||
"Ability to sell coins on the coin market (/ic sell)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to use two jobs (/vipjob)\t"COL_GREEN"Yes\n"\
|
||||
"Premium home listing fees waived\t"COL_GREEN"Yes\n"\
|
||||
"Tax reduction\t"COL_GREEN"50%%\n"\
|
||||
"Inactive asset protection\t"COL_GREEN"30 days\n"\
|
||||
"Total Vehicle component editing slots\t"COL_GREEN"10\n"\
|
||||
"Furniture slots available\t"COL_GREEN"50\n"\
|
||||
"V.I.P Lounge Weapon Redeeming Cooldown\t"COL_GREEN"No limit\n"\
|
||||
"V.I.P Tag On Forum\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P chat\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P lounge\t"COL_GREEN"Yes\n"\
|
||||
"Can spawn with a specific skin\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P toys\t"COL_GREEN"Yes\n"\
|
||||
"Access to custom gang colors (/gangcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Access to extra house weapon storage slots\t"COL_GREEN"Yes\n"\
|
||||
"Can play custom radio URLs (/radio)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to adjust your label's color (/labelcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Can show a message to people you kill (/deathmsg)\t"COL_GREEN"Yes\n"\
|
||||
"Can adjust the sound of your hitmarker (/hitmarker)\t"COL_GREEN"Yes" );
|
||||
|
||||
case 1: format( vip_description, sizeof( vip_description ), "\t"COL_GREY"Feature\t"COL_GREY"Reward\n"\
|
||||
"Money Provided\t"COL_GREEN"$12,500,000\n"\
|
||||
"House Provided\t"COL_GREEN"Yes\n"\
|
||||
"Vehicle Provided\t"COL_GREEN"Yes\n"\
|
||||
"Garage Provided\t"COL_RED"No\n"\
|
||||
"Gate Provided\t"COL_RED"No\n"\
|
||||
"Weed Business Provided\t"COL_RED"No\n"\
|
||||
"House Customization\t"COL_GREEN"Medium\n"\
|
||||
"Total house slots\t"COL_GREEN"10\n"\
|
||||
"Total garage slots\t"COL_GREEN"10\n"\
|
||||
"Total business slots\t"COL_GREEN"10\n"\
|
||||
"Total vehicle slots\t"COL_GREEN"10\n"\
|
||||
"Weapons on spawn\t"COL_GREEN"3\n"\
|
||||
"Armour on spawn\t"COL_GREEN"Yes\n"\
|
||||
"Coin generation increase\t"COL_GREEN"10%%\n"\
|
||||
"Ability to transfer coins P2P\t"COL_GREEN"Yes\n"\
|
||||
"Ability to sell coins on the coin market (/ic sell)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to use two jobs (/vipjob)\t"COL_RED"No\n"\
|
||||
"Premium home listing fees waived\t"COL_GREEN"Yes\n"\
|
||||
"Tax reduction\t"COL_RED"0%%\n"\
|
||||
"Inactive asset protection\t"COL_GREEN"14 days\n"\
|
||||
"Total Vehicle component editing slots\t"COL_GREEN"8\n"\
|
||||
"Furniture slots available\t"COL_GREEN"45\n"\
|
||||
"V.I.P Lounge Weapon Redeeming Cooldown\t"COL_GREEN"1 minutes\n"\
|
||||
"V.I.P Tag On Forum\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P chat\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P lounge\t"COL_GREEN"Yes\n"\
|
||||
"Can spawn with a specific skin\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P toys\t"COL_GREEN"Yes\n"\
|
||||
"Access to custom gang colors (/gangcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Access to extra house weapon storage slots\t"COL_GREEN"Yes\n"\
|
||||
"Can play custom radio URLs (/radio)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to adjust your label's color (/labelcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Can show a message to people you kill (/deathmsg)\t"COL_GREEN"Yes\n"\
|
||||
"Can adjust the sound of your hitmarker (/hitmarker)\t"COL_GREEN"Yes" );
|
||||
|
||||
case 2: format( vip_description, sizeof( vip_description ), "\t"COL_GREY"Feature\t"COL_GREY"Reward\n"\
|
||||
"Money Provided\t"COL_GREEN"$5,000,000\n"\
|
||||
"House Provided\t"COL_GREEN"Yes\n"\
|
||||
"Vehicle Provided\t"COL_GREEN"Yes\n"\
|
||||
"Garage Provided\t"COL_RED"No\n"\
|
||||
"Gate Provided\t"COL_RED"No\n"\
|
||||
"Weed Business Provided\t"COL_RED"No\n"\
|
||||
"House Customization\t"COL_GREEN"Small\n"\
|
||||
"Total house slots\t"COL_GREEN"8\n"\
|
||||
"Total garage slots\t"COL_GREEN"8\n"\
|
||||
"Total business slots\t"COL_GREEN"8\n"\
|
||||
"Total vehicle slots\t"COL_GREEN"6\n"\
|
||||
"Weapons on spawn\t"COL_GREEN"2\n"\
|
||||
"Armour on spawn\t"COL_GREEN"Yes\n"\
|
||||
"Coin generation increase\t"COL_RED"0%%\n"\
|
||||
"Ability to transfer coins P2P\t"COL_GREEN"Yes\n"\
|
||||
"Ability to sell coins on the coin market (/ic sell)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to use two jobs (/vipjob)\t"COL_RED"No\n"\
|
||||
"Premium home listing fees waived\t"COL_RED"No\n"\
|
||||
"Tax reduction\t"COL_RED"0%%\n"\
|
||||
"Inactive asset protection\t"COL_GREEN"14 days\n"\
|
||||
"Total Vehicle component editing slots\t"COL_GREEN"6\n"\
|
||||
"Furniture slots available\t"COL_GREEN"40\n"\
|
||||
"V.I.P Lounge Weapon Redeeming Cooldown\t"COL_GREEN"5 minutes\n"\
|
||||
"V.I.P Tag On Forum\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P chat\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P lounge\t"COL_GREEN"Yes\n"\
|
||||
"Can spawn with a specific skin\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P toys\t"COL_GREEN"Yes\n"\
|
||||
"Access to custom gang colors (/gangcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Access to extra house weapon storage slots\t"COL_GREEN"Yes\n"\
|
||||
"Can play custom radio URLs (/radio)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to adjust your label's color (/labelcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Can show a message to people you kill (/deathmsg)\t"COL_GREEN"Yes\n"\
|
||||
"Can adjust the sound of your hitmarker (/hitmarker)\t"COL_GREEN"Yes" );
|
||||
|
||||
case 3: format( vip_description, sizeof( vip_description ), "\t"COL_GREY"Feature\t"COL_GREY"Reward\n"\
|
||||
"Money Provided\t"COL_GREEN"$2,500,000\n"\
|
||||
"House Provided\t"COL_RED"No\n"\
|
||||
"Vehicle Provided\t"COL_RED"No\n"\
|
||||
"Garage Provided\t"COL_RED"No\n"\
|
||||
"Gate Provided\t"COL_RED"No\n"\
|
||||
"Weed Business Provided\t"COL_RED"No\n"\
|
||||
"House Customization\t"COL_RED"No\n"\
|
||||
"Total house slots\t"COL_GREEN"6\n"\
|
||||
"Total garage slots\t"COL_GREEN"6\n"\
|
||||
"Total business slots\t"COL_GREEN"6\n"\
|
||||
"Total vehicle slots\t"COL_GREEN"4\n"\
|
||||
"Weapons on spawn\t"COL_GREEN"1\n"\
|
||||
"Armour on spawn\t"COL_RED"No\n"\
|
||||
"Coin generation increase\t"COL_RED"0%%\n"\
|
||||
"Ability to transfer coins P2P\t"COL_GREEN"Yes\n"\
|
||||
"Ability to sell coins on the coin market (/ic sell)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to use two jobs (/vipjob)\t"COL_RED"No\n"\
|
||||
"Premium home listing fees waived\t"COL_RED"No\n"\
|
||||
"Tax reduction\t"COL_RED"0%%\n"\
|
||||
"Inactive asset protection\t"COL_GREEN"14 days\n"\
|
||||
"Total Vehicle component editing slots\t"COL_GREEN"4\n"\
|
||||
"Furniture slots available\t"COL_GREEN"35\n"\
|
||||
"V.I.P Lounge Weapon Redeeming Cooldown\t"COL_GREEN"5 minutes\n"\
|
||||
"V.I.P Tag On Forum\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P chat\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P lounge\t"COL_GREEN"Yes\n"\
|
||||
"Can spawn with a specific skin\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P toys\t"COL_GREEN"Yes\n"\
|
||||
"Access to custom gang colors (/gangcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Access to extra house weapon storage slots\t"COL_GREEN"Yes\n"\
|
||||
"Can play custom radio URLs (/radio)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to adjust your label's color (/labelcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Can show a message to people you kill (/deathmsg)\t"COL_GREEN"Yes\n"\
|
||||
"Can adjust the sound of your hitmarker (/hitmarker)\t"COL_GREEN"Yes" );
|
||||
|
||||
case 4: format( vip_description, sizeof( vip_description ), "\t"COL_GREY"Feature\t"COL_GREY"Reward\n"\
|
||||
"Money Provided\t"COL_GREEN"$500,000\n"\
|
||||
"House Provided\t"COL_RED"No\n"\
|
||||
"Vehicle Provided\t"COL_RED"No\n"\
|
||||
"Garage Provided\t"COL_RED"No\n"\
|
||||
"Gate Provided\t"COL_RED"No\n"\
|
||||
"Weed Business Provided\t"COL_RED"No\n"\
|
||||
"House Customization\t"COL_RED"No\n"\
|
||||
"Total house slots\t"COL_GREEN"5\n"\
|
||||
"Total garage slots\t"COL_GREEN"5\n"\
|
||||
"Total business slots\t"COL_GREEN"5\n"\
|
||||
"Total vehicle slots\t"COL_GREEN"3\n"\
|
||||
"Weapons on spawn\t"COL_GREEN"1\n"\
|
||||
"Armour on spawn\t"COL_RED"No\n"\
|
||||
"Coin generation increase\t"COL_RED"0%%\n"\
|
||||
"Ability to transfer coins P2P\t"COL_RED"No\n"\
|
||||
"Ability to sell coins on the coin market (/ic sell)\t"COL_RED"No\n"\
|
||||
"Ability to use two jobs (/vipjob)\t"COL_RED"No\n"\
|
||||
"Premium home listing fees waived\t"COL_RED"No\n"\
|
||||
"Tax reduction\t"COL_RED"0%%\n"\
|
||||
"Inactive asset protection\t"COL_GREEN"14 days\n"\
|
||||
"Total Vehicle component editing slots\t"COL_GREEN"3\n"\
|
||||
"Furniture slots available\t"COL_GREEN"30\n"\
|
||||
"V.I.P Lounge Weapon Redeeming Cooldown\t"COL_GREEN"5 minutes\n"\
|
||||
"V.I.P Tag On Forum\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P chat\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P lounge\t"COL_GREEN"Yes\n"\
|
||||
"Can spawn with a specific skin\t"COL_GREEN"Yes\n"\
|
||||
"Access to V.I.P toys\t"COL_GREEN"Yes\n"\
|
||||
"Access to custom gang colors (/gangcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Access to extra house weapon storage slots\t"COL_GREEN"Yes\n"\
|
||||
"Can play custom radio URLs (/radio)\t"COL_GREEN"Yes\n"\
|
||||
"Ability to adjust your label's color (/labelcolor)\t"COL_GREEN"Yes\n"\
|
||||
"Can show a message to people you kill (/deathmsg)\t"COL_GREEN"Yes\n"\
|
||||
"Can adjust the sound of your hitmarker (/hitmarker)\t"COL_GREEN"Yes" );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_BUY_VIP, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Donate for V.I.P", vip_description, "Buy VIP", "Close" );
|
||||
|
||||
ShowPlayerDialog( playerid, DIALOG_BUY_VIP_MAIN, DIALOG_STYLE_TABLIST_HEADERS, sprintf( ""COL_GOLD"%s", g_irresistibleVipItems[ listitem ][ E_NAME ] ), vip_description, "Buy", "Back" );
|
||||
return 1;
|
||||
}
|
||||
else if ( dialogid == DIALOG_BUY_VIP_MAIN )
|
||||
{
|
||||
// if the player clicked on the right button, return /vip
|
||||
if ( ! response ) return cmd_vip( playerid, " " );
|
||||
else if ( response ) return ShowPlayerCoinMarketDialog( playerid );
|
||||
}
|
||||
|
||||
else if ( dialogid == DIALOG_BUY_VIP && response )
|
||||
{
|
||||
return ShowPlayerCoinMarketDialog( playerid );
|
||||
@ -521,49 +676,8 @@ CMD:irresistiblecoins( playerid, params[ ] )
|
||||
CMD:donate( playerid, params[ ] ) return cmd_vip( playerid, params );
|
||||
CMD:vip( playerid, params[ ] )
|
||||
{
|
||||
static
|
||||
vip_description[ 1420 ];
|
||||
|
||||
if ( vip_description[ 0 ] == '\0' )
|
||||
{
|
||||
vip_description = " \t"COL_WHITE"Regular VIP\t"COL_BRONZE"Bronze VIP\t"COL_GOLD"Gold VIP\n";
|
||||
strcat( vip_description, ""COL_GREEN"Price (USD)\t"COL_GREEN"$5.00 USD\t"COL_GREEN"$15.00 USD\t"COL_GREEN"$25.00 USD\n" );
|
||||
strcat( vip_description, "Money Provided\t$500,000\t$2,500,000\t$5,000,000\n" );
|
||||
strcat( vip_description, "House Provided\tN\tY\tY\n" );
|
||||
strcat( vip_description, "Vehicle Provided\tN\tN\tY\n" );
|
||||
strcat( vip_description, "Garage Provided\tN\tN\tN\n" );
|
||||
strcat( vip_description, "Gate Provided\tN\tN\tN\n" );
|
||||
strcat( vip_description, "Weed Business Provided\tN\tN\tN\n" );
|
||||
strcat( vip_description, "House Customization\tN\tN\tSmall\n" );
|
||||
strcat( vip_description, "Total house slots\t5\t6\t8\n" );
|
||||
strcat( vip_description, "Total garage slots\t5\t6\t8\n" );
|
||||
strcat( vip_description, "Total business slots\t5\t6\t8\n" );
|
||||
strcat( vip_description, "Total vehicle slots\t3\t4\t6\n" );
|
||||
strcat( vip_description, "Weapons on spawn\t1\t1\t2\n" );
|
||||
strcat( vip_description, "Armour on spawn\t0%\t0%\t100%\n" );
|
||||
strcat( vip_description, "Coin generation increase\t0%\t0%\t0%\n" );
|
||||
strcat( vip_description, "Ability to transfer coins P2P\tN\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to sell coins on the coin market (/ic sell)\tN\tY\tY\n" );
|
||||
strcat( vip_description, "Ability to use two jobs (/vipjob)\tN\tN\tN\n" );
|
||||
strcat( vip_description, "Premium home listing fees waived\tN\tN\tN\n" );
|
||||
strcat( vip_description, "Tax reduction\t0%\t0%\t0%\n" );
|
||||
strcat( vip_description, "Inactive asset protection\t14 days\t14 days\t14 days\n" );
|
||||
strcat( vip_description, "Total Vehicle component editing slots\t3\t4\t6\n" );
|
||||
strcat( vip_description, "Furniture slots available\t30\t35\t40\n" );
|
||||
strcat( vip_description, "V.I.P Lounge Weapon Redeeming Cooldown\t5 min\t5 min\t5 min\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\n" );
|
||||
}
|
||||
ShowPlayerDialog( playerid, DIALOG_NEXT_PAGE_VIP, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Donate for V.I.P", vip_description, "See More", "Close" );
|
||||
p_SelectedPackage{ playerid } = -1;
|
||||
ShowPlayerDialog( playerid, DIALOG_VIP_MAIN, DIALOG_STYLE_TABLIST, ""COL_GOLD"VIP Packages", "{4EE2EC}Diamond VIP\t"COL_GREEN"$100.00 USD\n{E0E0E0}Platinum VIP\t"COL_GREEN"$50.00 USD\n"COL_GOLD"Gold VIP\t"COL_GREEN"$25.00 USD\n{CD7F32}Bronze VIP\t"COL_GREEN"$15.00 USD\n"COL_GREY"Regular VIP\t"COL_GREEN"$5.00 USD", "Select", "Close" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -572,16 +686,15 @@ CMD:vipcmds( playerid, params[ ] )
|
||||
if ( p_VIPLevel[ playerid ] < 1 ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" );
|
||||
|
||||
erase( szLargeString );
|
||||
strcat( szLargeString, ""COL_GREY"/vipspawnwep\tConfigure your spawning weapons\n"\
|
||||
""COL_GREY"/vipskin\tConfigure your spawning skin\n"\
|
||||
""COL_GREY"/vipgun\tRedeem weapons or an armour vest from the gun locker\n"\
|
||||
""COL_GREY"/vsay\tGlobal V.I.P Chat\n" );
|
||||
strcat( szLargeString, ""COL_GREY"/vipjob\tSet your secondary VIP job\n"\
|
||||
""COL_GREY"/vippackage\tCustomize your VIP package name\n"\
|
||||
""COL_GREY"/mynotes\tAccess your VIP notes and material\n"\
|
||||
""COL_GREY"/mycustomizations\tAccess your house customization taxes" );
|
||||
strcat( szLargeString, ""COL_GREY"/vipspawnwep"COL_WHITE" - Configure your spawning weapons\n"\
|
||||
""COL_GREY"/vipskin"COL_WHITE" - Configure your spawning skin\n"\
|
||||
""COL_GREY"/viplist"COL_WHITE" - A list of all online V.I.P. players.\n"\
|
||||
""COL_GREY"/vipgun"COL_WHITE" - Redeem weapons or an armour vest from the gun locker\n"\
|
||||
""COL_GREY"/vsay"COL_WHITE" - Global V.I.P Chat\n"\
|
||||
""COL_GREY"/vipjob"COL_WHITE" - Choose your V.I.P. job that allows you to have two jobs at once.\n"\
|
||||
""COL_GREY"/mynotes"COL_WHITE" - Access your VIP notes and material" );
|
||||
|
||||
ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST, "{FFFFFF}V.I.P Commands", szLargeString, "Okay", "" );
|
||||
ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, ""COL_GOLD"V.I.P Commands", szLargeString, "Okay", "" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -613,7 +726,7 @@ stock ShowPlayerCoinMarketDialog( playerid, page = ICM_PAGE_DEFAULT )
|
||||
strcat( szMarket, ""COL_GREEN"Buy shark cards...\t"COL_GREEN">>>\n" );
|
||||
strcat( szMarket, ""COL_PURPLE"Buy premium homes...\t"COL_PURPLE">>>\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", "" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -"COL_WHITE" Market", szMarket, "Select", "" );
|
||||
}
|
||||
else if ( page == ICM_PAGE_CASHCARD )
|
||||
{
|
||||
@ -624,7 +737,7 @@ stock ShowPlayerCoinMarketDialog( playerid, page = ICM_PAGE_DEFAULT )
|
||||
new iCoinRequirement = floatround( g_irresistibleCashCards[ i ] [ E_PRICE ] * discount );
|
||||
format( szMarket, sizeof( szMarket ), "%s%s\t"COL_GREEN"%s\t"COL_GOLD"%s\n", szMarket, g_irresistibleCashCards[ i ] [ E_NAME ], number_format( g_irresistibleCashCards[ i ] [ E_ID ] ), number_format( iCoinRequirement, .decimals = 0 ) );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_3, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -{FFFFFF} Cash Cards", szMarket, "Select", "Back" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_3, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -"COL_WHITE" Cash Cards", szMarket, "Select", "Back" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -633,7 +746,7 @@ stock ShowPlayerCoinMarketDialog( playerid, page = ICM_PAGE_DEFAULT )
|
||||
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, .decimals = 0 ) );
|
||||
}
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_2, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -{FFFFFF} Asset Market", szMarket, "Select", "Back" );
|
||||
return ShowPlayerDialog( playerid, DIALOG_IC_MARKET_2, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Irresistible Coin -"COL_WHITE" Asset Market", szMarket, "Select", "Back" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,12 @@ 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;
|
||||
|
||||
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 ) {
|
||||
@ -216,6 +221,9 @@ thread OnGrabLatestDonor( hidden )
|
||||
} 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", szName, last_donation ) );
|
||||
}
|
||||
|
||||
// Play song!
|
||||
if ( ! hidden ) {
|
||||
@ -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
|
||||
|
@ -627,9 +627,7 @@ stock CheckForBlackjack( tableid )
|
||||
// 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 );
|
||||
foreach(new i : Player)
|
||||
{
|
||||
if ( !IsPlayerSettingToggled( i, 12 ) )
|
||||
foreach ( new i : Player ) if ( ! IsPlayerSettingToggled( i, SETTING_HIDE_GAMB_MSG ) ) {
|
||||
SendClientMessageFormatted( i, -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from blackjack!", ReturnPlayerName( playerid ), playerid, cash_format( payout ) );
|
||||
}
|
||||
}
|
||||
|
@ -686,9 +686,7 @@ public OnRouletteWheelStop( rouletteid, winner )
|
||||
|
||||
// inform users
|
||||
if ( profit >= 10000 ) {
|
||||
foreach(new i : Player)
|
||||
{
|
||||
if ( !IsPlayerSettingToggled( i, 12 ) )
|
||||
foreach ( new i : Player ) if ( ! IsPlayerSettingToggled( i, SETTING_HIDE_GAMB_MSG ) ) {
|
||||
SendClientMessageFormatted( i, -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from roulette!", ReturnPlayerName( playerid ), playerid, cash_format( profit ) );
|
||||
}
|
||||
}
|
||||
|
@ -287,10 +287,8 @@ public OnPlayerUseSlotMachine( playerid, slotid, first_combo, second_combo, thir
|
||||
|
||||
// alert user
|
||||
if ( iNetWin > g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] ) {
|
||||
SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from the %s casino slots!", ReturnPlayerName( playerid ), playerid, cash_format( iNetWin ), g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] == 10000 ? ( "Four Dragons" ) : ( g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] >= 25000 ? ( "Visage" ) : ( "Caligulas" ) ) );
|
||||
foreach(new i : Player)
|
||||
{
|
||||
if ( !IsPlayerSettingToggled( i, 12 ) )
|
||||
// SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from the %s casino slots!", ReturnPlayerName( playerid ), playerid, cash_format( iNetWin ), g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] == 10000 ? ( "Four Dragons" ) : ( g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] >= 25000 ? ( "Visage" ) : ( "Caligulas" ) ) );
|
||||
foreach ( new i : Player ) if ( ! IsPlayerSettingToggled( i, SETTING_HIDE_GAMB_MSG ) ) {
|
||||
SendClientMessageFormatted( i, -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from the %s casino slots!", ReturnPlayerName( playerid ), playerid, cash_format( iNetWin ), g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] == 10000 ? ( "Four Dragons" ) : ( g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] >= 25000 ? ( "Visage" ) : ( "Caligulas" ) ) );
|
||||
}
|
||||
} else {
|
||||
|
@ -38,6 +38,7 @@ new
|
||||
bool: p_Kidnapped [ MAX_PLAYERS char ],
|
||||
bool: p_ToggledViewPM [ MAX_PLAYERS char ],
|
||||
bool: p_ToggleCopChat [ MAX_PLAYERS char ],
|
||||
bool: p_TogglePBChat [ MAX_PLAYERS char ],
|
||||
bool: p_pausedToLoad [ MAX_PLAYERS char ],
|
||||
bool: p_CantUseReport [ MAX_PLAYERS char ],
|
||||
p_pausedToLoadTimer [ MAX_PLAYERS ],
|
||||
|
@ -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
|
||||
|
@ -419,6 +419,16 @@ static stock InitializeServerVehicles( )
|
||||
tmpVariable = AddStaticVehicle( 451, -1879.5490, -630.3375, 1002.1699, 318.5035, 1, 1 ); // white
|
||||
SetVehicleVirtualWorld( tmpVariable, 31 ), LinkVehicleToInterior( tmpVariable, 9 ), SetVehicleParamsEx( tmpVariable, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF );
|
||||
|
||||
#if defined __cloudy_fishing_system
|
||||
// SF Fishing Boats
|
||||
AddStaticVehicle( 453, -1474.0452, 671.4551, -0.4139, 270.0, 56, 56 ); //
|
||||
AddStaticVehicle( 453, -1474.0452, 678.4317, -0.1675, 270.0, 56, 56 ); //
|
||||
AddStaticVehicle( 453, -1474.0452, 684.5461, -0.4814, 270.0, 56, 56 ); //
|
||||
AddStaticVehicle( 453, -1474.0452, 690.5830, -0.1199, 270.0, 56, 56 ); //
|
||||
AddStaticVehicle( 453, -1474.0452, 698.4171, -0.4731, 270.0, 56, 56 ); //
|
||||
AddStaticVehicle( 453, -1474.0452, 704.5991, -0.4769, 270.0, 56, 56 ); //
|
||||
#endif
|
||||
|
||||
// //
|
||||
// LAS VENTURAS //
|
||||
// Credits: Niels //
|
||||
|
@ -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);
|
||||
|
@ -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` (
|
||||
|
@ -0,0 +1,8 @@
|
||||
-- CREATE A MIGRATION ENTRY
|
||||
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`;
|
||||
TRUNCATE TABLE `HOUSE_LISTINGS`;
|
@ -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
|
||||
@ -728,6 +728,18 @@ public OnPlayerSpawn( playerid )
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined __cloudy_event_system
|
||||
else if ( IsPlayerInEvent( playerid ) )
|
||||
{
|
||||
if( ! EventSettingAllow( 0 ) && g_eventData[ EV_STARTED ] )
|
||||
{
|
||||
SetPlayerInEvent( playerid ); // respawns player in event.
|
||||
return 1;
|
||||
}
|
||||
else RemovePlayerFromEvent( playerid, true ); // changes the InEvent variable to false.
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( p_Class[ playerid ] == CLASS_CIVILIAN )
|
||||
{
|
||||
if ( !p_JobSet{ playerid } )
|
||||
@ -833,8 +845,14 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float:
|
||||
return 1; // fcnpc
|
||||
|
||||
// Cop shoots innocent, they /q - so jail
|
||||
#if defined __cloudy_event_system
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_WantedLevel[ hitid ] > 2 && ! IsPlayerInEvent( playerid ) && ! IsPlayerInEvent( hitid ) )
|
||||
#else
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_WantedLevel[ hitid ] > 2 )
|
||||
#endif
|
||||
{
|
||||
p_QuitToAvoidTimestamp[ hitid ] = g_iTime + 3;
|
||||
}
|
||||
|
||||
if ( p_Class[ playerid ] == CLASS_POLICE && p_Class[ hitid ] != CLASS_POLICE && !p_WantedLevel[ hitid ] && GetPlayerState( hitid ) != PLAYER_STATE_WASTED && ! IsPlayerInEvent( playerid ) && ! IsPlayerInBattleRoyale( playerid ) )
|
||||
return ShowPlayerHelpDialog( playerid, 2000, "You cannot hurt innocent civilians, you're a ~b~cop~w~~h~!" ), 0;
|
||||
@ -1040,12 +1058,41 @@ 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,14 +1105,15 @@ 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 defined __cloudy_event_system
|
||||
if ( IsPlayerInPlayerGang( issuerid, playerid ) && ! ( IsPlayerInEvent( playerid ) && IsPlayerInEvent( issuerid ) && g_eventData[ EV_FIGHT_TYPE] <= 2 ) )
|
||||
#else
|
||||
if ( IsPlayerInPlayerGang( issuerid, playerid ) )
|
||||
#endif
|
||||
{
|
||||
if ( IsPlayerInPlayerGang( issuerid, playerid ) ) {
|
||||
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage your homies!" ), 0;
|
||||
}
|
||||
|
||||
@ -1092,13 +1140,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 +1343,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 +4814,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
|
||||
{
|
||||
@ -5258,11 +5302,13 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
{
|
||||
if ( p_VIPLevel[ playerid ] < VIP_REGULAR ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" );
|
||||
szCMDS[ 0 ] = '\0';
|
||||
strcat( szCMDS, ""COL_GREY"/viplist{FFFFFF} - A list of all online V.I.P. players.\n"\
|
||||
""COL_GREY"/vipspawnwep{FFFFFF} - Configure your V.I.P. weapons that you are given on spawning.\n"\
|
||||
""COL_GREY"/vipgun{FFFFFF} - Use the V.I.P. Lounge Weapon vending machine.\n"\
|
||||
""COL_GREY"/vipskin{FFFFFF} - Configure your V.I.P. skin.\n"\
|
||||
""COL_GREY"/vipjob{FFFFFF} - Choose your V.I.P. job that allows you to have two jobs at once.\n" );
|
||||
strcat( szCMDS, ""COL_GREY"/vipspawnwep{FFFFFF} - Configure your spawning weapons\n"\
|
||||
""COL_GREY"/vipskin{FFFFFF} - Configure your spawning skin\n"\
|
||||
""COL_GREY"/viplist{FFFFFF} - A list of all online V.I.P. players.\n"\
|
||||
""COL_GREY"/vipgun{FFFFFF} - Redeem weapons or an armour vest from the gun locker\n"\
|
||||
""COL_GREY"/vsay{FFFFFF} - Global V.I.P Chat\n"\
|
||||
""COL_GREY"/vipjob{FFFFFF} - Choose your V.I.P. job that allows you to have two jobs at once.\n"\
|
||||
""COL_GREY"/mynotes{FFFFFF} - Access your VIP notes and material" );
|
||||
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, ""COL_GOLD"V.I.P. Commands", szCMDS, "Okay", "Back" );
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
v11.65.200
|
||||
v11.60.190
|
||||
v11.57.188
|
||||
v11.56.186
|
||||
|
@ -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.
|
||||
(/) Army is now vulnerable to damage in rhinos.
|
||||
(/) Police are now paid 10% extra.
|
9
scriptfiles/changelogs/cnr/v11.65.200.txt
Normal file
9
scriptfiles/changelogs/cnr/v11.65.200.txt
Normal file
@ -0,0 +1,9 @@
|
||||
(+) Level 5 admins cannot create houses/cars/garages/businesses without a note being used.
|
||||
(+) Adds CAC mode and new locations for the duel system (Stev).
|
||||
(+) Adds /givearmour for level 5s (Nemesis).
|
||||
(+) Adds roleplay level. Get benefits to minijobs by levelling it up. E.g. higher success mining.
|
||||
(/) Inactive accounts will get removed now after 1 year.
|
||||
(/) Oldschool class selection has been restored.
|
||||
(/) "/vip" has been reformatted (Night).
|
||||
(*) Fix global message spam with slot machines.
|
||||
(*) Fix issue with features being shown and unavoidable on register.
|
Loading…
Reference in New Issue
Block a user