This commit is contained in:
Lorenc Pekaj 2019-04-14 16:51:28 +10:00
commit bdb6df7fa7
34 changed files with 456 additions and 187 deletions

View File

@ -315,6 +315,10 @@ thread OnAttemptPlayerLogin( playerid, password[ ] )
// Log in player // Log in player
SendServerMessage( playerid, "You have " COL_GREEN "successfully" COL_WHITE " logged in!" ); SendServerMessage( playerid, "You have " COL_GREEN "successfully" COL_WHITE " logged in!" );
// Chat Ban Player
format( szBigString, sizeof( szBigString ), "SELECT * FROM `CHAT_BANS` WHERE `ID` = '%d' LIMIT 0,1", p_AccountID[ playerid ] );
mysql_function_query( dbHandle, szBigString, true, "ChatBanUponLogin", "d", playerid );
} }
else else
{ {

View File

@ -72,11 +72,13 @@ static stock
{ 2, "/mute", "Muting a player" }, { 2, "/mute", "Muting a player" },
{ 2, "/unmute", "Unmuting a player" }, { 2, "/unmute", "Unmuting a player" },
{ 2, "/kick", "Kicking a player from the server" }, { 2, "/kick", "Kicking a player from the server" },
{ 2, "/smlog", "Cash transaction log from a player" },
{ 2, "/iclog", "IC transaction log from a player" },
/* ** Level 3 Commands ** */ /* ** Level 3 Commands ** */
{ 3, "/chatban", "Bans a player from using all forms of chat" },
{ 3, "/unchatban", "Unbans a player from using all forms of chat" },
{ 3, "/banlog", "Finding ban information about a player" }, { 3, "/banlog", "Finding ban information about a player" },
{ 3, "/smlog", "Cash transaction log from a player" },
{ 3, "/iclog", "IC transaction log from a player" },
{ 3, "/resetwep", "Resetting weapons from a player" }, { 3, "/resetwep", "Resetting weapons from a player" },
{ 3, "/getip", "Getting IP of a player" }, { 3, "/getip", "Getting IP of a player" },
{ 3, "/geolocate", "Geographical location of a player" }, { 3, "/geolocate", "Geographical location of a player" },
@ -105,6 +107,7 @@ static stock
{ 3, "/countdown", "Countdown" }, { 3, "/countdown", "Countdown" },
{ 3, "/pingimmune", "Making a player immune from ping kicker" }, { 3, "/pingimmune", "Making a player immune from ping kicker" },
{ 3, "/ban", "Banning a player" }, { 3, "/ban", "Banning a player" },
{ 3, "/forceac", "Force a player to use CAC while playing the server" },
{ 3, "/bring", "Bring a player to you" }, { 3, "/bring", "Bring a player to you" },
/* ** Level 4 Commands ** */ /* ** Level 4 Commands ** */
@ -260,34 +263,6 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
return 1; return 1;
} }
/*CMD:acmds( playerid, params[ ] )
{
if ( p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
SendClientMessage( playerid, COLOR_GREY, "|______________________________________| Admin Commands |_____________________________________|" );
SendClientMessage( playerid, COLOR_WHITE, " " );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 1: /goto, /spec(off), /(un)jail, /asay, /slap, /a, /getstats, /stpfr, /setskin, /frules, /fpc, /ticketlog" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 1: /pinfo, /warn, /aspawn, /ans, /stpfa, /alog, /(un)freeze, /aod, /respawnalluv, /reports, /questions" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 1: /respond, /mutelist, /aka, /arepair, /viewdeathmsg" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 2: /kick, /vdestroy, /(un)mute, /explode, /vrespawn, /arenas, /suspend, /viewnotes, /slay" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 3: /ban, /bring, /clearchat, /(ann)ounce, /giveweapon, /vadminpark, /vcreate, /healall, /getip, /smlog, /iclog" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 3: /vadminstats, /pingimmune, /vbring, /countdown, /forcecoptutorial, /vgoto, /copwarn, /armywarn, /resetwep" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 3: /venter, /geolocate" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 4: /circleall, /giveweaponall, /resetwepall, /motd, /uncopban, /unarmyban, /setworld, /destroyallav, /gotopos" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 4: /addnote, /removenote" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createhouse, /destroyhouse, /respawnallv, /achangename, /toggleviewpm, /unban(ip)" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /createcar, /destroycar, /stripcarmods, /createbribe, /destroybribe, /doublexp, /(h/v)adminsell" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /autovehrespawn, /megaban, /acunban, /creategate, /editgate, /connectsong, /discordurl" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 5: /creategarage, /destroygarage, /check, /reconnectchuff" );
if ( p_AdminLevel[ playerid ] > 5 ) {
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 6: /setirc, /seteventhost, /setlevel, /setleveloffline, /svrstats, /playaction, /playanimation" );
SendClientMessage( playerid, COLOR_WHITE, " LEVEL 6: /updaterules, /truncate, /broadcast, /setgangleader, /viewgangtalk, /createentrance, /destroyentrance" );
}
SendClientMessage( playerid, COLOR_GREY, "|_____________________________________________________________________________________________|" );
return 1;
}*/
/* ** Modules ** */ /* ** Modules ** */
#include "irresistible\cnr\commands\admin\admin_one.pwn" #include "irresistible\cnr\commands\admin\admin_one.pwn"
#include "irresistible\cnr\commands\admin\admin_two.pwn" #include "irresistible\cnr\commands\admin\admin_two.pwn"

View File

@ -714,3 +714,31 @@ CMD:mutelist( playerid, params[ ] )
else else
return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Muted List", szNormalString, "Close", "" ), 1; return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Muted List", szNormalString, "Close", "" ), 1;
} }
CMD:chatbanlist( playerid, params[ ] )
{
new
count = 0;
if ( p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
szNormalString[ 0 ] = '\0';
foreach( new i : Player )
{
if ( p_ChatBanned{ i } )
{
format( szNormalString, sizeof( szNormalString ), "%s"COL_WHITE"%s(%d)\t"COL_GREY"By %s for '%s'\n",
szNormalString,
ReturnPlayerName( i ), i,
p_ChatBannedBy[ playerid ],
p_ChatBanReason[ playerid ]
);
count ++;
}
}
if ( count == 0 )
return SendError( playerid, "There are no chat banned players online." );
else
return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST, ""COL_WHITE"Chat Ban List", szNormalString, "Close", "" ), 1;
}

View File

@ -6,40 +6,6 @@
*/ */
/* ** Commands ** */ /* ** Commands ** */
CMD:smlog( playerid, params[ ] )
{
new
pID
;
if ( p_AdminLevel[ playerid ] < 2 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/smlog [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else
{
format( szBigString, 160, "SELECT u.`NAME`,t.`CASH`,t.`DATE` FROM `TRANSACTIONS` t INNER JOIN `USERS` u ON t.`TO_ID`=u.`ID` WHERE FROM_ID=%d ORDER BY DATE DESC LIMIT 10", p_AccountID[ pID ] );
mysql_function_query( dbHandle, szBigString, true, "readmoneylog", "dd", playerid, pID );
}
return 1;
}
CMD:iclog( playerid, params[ ] )
{
new
pID
;
if ( p_AdminLevel[ playerid ] < 2 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/iclog [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else
{
format( szBigString, 160, "SELECT u.`NAME`,t.`IC`,t.`DATE` FROM `TRANSACTIONS_IC` t INNER JOIN `USERS` u ON t.`TO_ID`=u.`ID` WHERE FROM_ID=%d ORDER BY DATE DESC LIMIT 10", p_AccountID[ pID ] );
mysql_function_query( dbHandle, szBigString, true, "readiclog", "dd", playerid, pID );
}
return 1;
}
CMD:resetwep( playerid, params[ ] ) CMD:resetwep( playerid, params[ ] )
{ {
new new
@ -622,9 +588,9 @@ CMD:forceac( playerid, params[ ] )
pID; pID;
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) SendUsage( playerid, "/forceac [PLAYER_ID]" ); else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/forceac [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." ); else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( pID == playerid ) return SendError( playerid, "You cant use this command on yourself." ); else if ( pID == playerid ) return SendError( playerid, "You can't use this command on yourself." );
else if ( p_AdminLevel[ pID ] > p_AdminLevel[ playerid ] ) return SendError( playerid, "You cannot use this command on admins higher than your level." ); else if ( p_AdminLevel[ pID ] > p_AdminLevel[ playerid ] ) return SendError( playerid, "You cannot use this command on admins higher than your level." );
//else if ( GetPlayerScore( pID ) < 100 ) return SendError( playerid, "This player's score is under 100, please spectate instead." ); //else if ( GetPlayerScore( pID ) < 100 ) return SendError( playerid, "This player's score is under 100, please spectate instead." );
else else
@ -644,3 +610,76 @@ CMD:forceac( playerid, params[ ] )
} }
return 1; return 1;
} }
CMD:chatban( playerid, params[ ] )
{
new pID, reason[ 25 ];
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "us[50]", pID, reason ) ) return SendUsage( playerid, "/chatban [PLAYER_ID] [REASON]" );
else if ( strlen( reason ) < 3 || strlen( reason ) > 25 ) return SendError( playerid, "Please keep your chat ban reason between 3 - 25 characters." );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( pID == playerid ) return SendError( playerid, "You can't use this command on yourself." );
else if ( p_AdminLevel[ pID ] > p_AdminLevel[ playerid ] ) return SendError( playerid, "You cannot use this command on admins higher than your level." );
else if ( IsPlayerChatBanned( pID ) ) return SendError( playerid, "This player is already chat banned." );
else
{
p_ChatBanned{ pID } = true;
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 );
AddAdminLogLineFormatted( "%s(%d) has chat banned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat ban" );
}
return 1;
}
CMD:unchatban( playerid, params[ ] )
{
new pID;
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/chatban [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( pID == playerid ) return SendError( playerid, "You can't use this command on yourself." );
else if ( !IsPlayerChatBanned( pID ) ) return SendError( playerid, "This player is not chat banned." );
else
{
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 ) );
AddAdminLogLineFormatted( "%s(%d) has chat unbanned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" );
}
return 1;
}
thread ChatBanUponLogin( playerid )
{
new
rows, fields
;
cache_get_data( rows, fields );
if ( rows )
{
new banned_by[ MAX_PLAYER_NAME ], reason[ 25 ];
cache_get_field_content( 0, "BANNED_BY", banned_by );
cache_get_field_content( 0, "REASON", reason );
p_ChatBanned{ playerid } = true;
p_ChatBannedBy[ playerid ] = banned_by;
p_ChatBanReason[ playerid ] = reason;
print("done with chatbanuponlogin");
}
return 1;
}

View File

@ -6,6 +6,40 @@
*/ */
/* ** Commands ** */ /* ** Commands ** */
CMD:smlog( playerid, params[ ] )
{
new
pID
;
if ( p_AdminLevel[ playerid ] < 2 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/smlog [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else
{
format( szBigString, 160, "SELECT u.`NAME`,t.`CASH`,t.`DATE` FROM `TRANSACTIONS` t INNER JOIN `USERS` u ON t.`TO_ID`=u.`ID` WHERE FROM_ID=%d ORDER BY DATE DESC LIMIT 10", p_AccountID[ pID ] );
mysql_function_query( dbHandle, szBigString, true, "readmoneylog", "dd", playerid, pID );
}
return 1;
}
CMD:iclog( playerid, params[ ] )
{
new
pID
;
if ( p_AdminLevel[ playerid ] < 2 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/iclog [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else
{
format( szBigString, 160, "SELECT u.`NAME`,t.`IC`,t.`DATE` FROM `TRANSACTIONS_IC` t INNER JOIN `USERS` u ON t.`TO_ID`=u.`ID` WHERE FROM_ID=%d ORDER BY DATE DESC LIMIT 10", p_AccountID[ pID ] );
mysql_function_query( dbHandle, szBigString, true, "readiclog", "dd", playerid, pID );
}
return 1;
}
CMD:slay( playerid, params[ ] ) CMD:slay( playerid, params[ ] )
{ {
new new

View File

@ -58,7 +58,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
return cmd_help( playerid, "" ); return cmd_help( playerid, "" );
if ( listitem >= 64 ) if ( listitem >= 64 )
return SendError( playerid, "Unable to process request, contact Lorenc in regards to this." ); return SendError( playerid, "Unable to process request, contact Damen in regards to this." );
new new
digits[ 64 ]; digits[ 64 ];

View File

@ -453,3 +453,9 @@ DQCMD:rcon( DCC_Channel: channel, DCC_User: user, params[ ] )
} }
return 1; return 1;
} }
/* ** In-Game Discord Commands * **/
CMD:discord( playerid, params[ ] )
{
return SendServerMessage( playerid, "You can access our Discord server at {7289da}sfcnr.com/discord" );
}

View File

@ -11,3 +11,19 @@
#include "irresistible\cnr\features\cop\arrest.pwn" #include "irresistible\cnr\features\cop\arrest.pwn"
#include "irresistible\cnr\features\cop\bail.pwn" #include "irresistible\cnr\features\cop\bail.pwn"
#include "irresistible\cnr\features\cop\ticket.pwn" #include "irresistible\cnr\features\cop\ticket.pwn"
#include "irresistible\cnr\features\cop\emp.pwn"
/* ** Hooks ** */
/*hook OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid, bodypart )
{
if ( p_Class[ playerid ] == CLASS_POLICE && !IsPlayerNPC( playerid ) )
{
new Float: x, Float: y, Float: z;
GetPlayerPos( playerid, x, y, z );
if ( x >= -1650.0 && x <= -1571.0 && y >= 647.0 && y <= 711.0 )
return ShowPlayerHelpDialog( issuerid, 2000, "You cannot damage LEO officers while they are within the Police Department HQ." ), 0;
}
return 1;
}*/

View File

@ -51,7 +51,7 @@ hook OnPlayerDeath( playerid, killerid, reason )
hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{ {
if ( PRESSED( KEY_LOOK_BEHIND ) ) // MMB to taze/cuff/ar /*if ( PRESSED( KEY_LOOK_BEHIND ) ) // MMB to taze/cuff/ar
{ {
if ( p_Class[ playerid ] == CLASS_POLICE && ! IsPlayerSpawnProtected( playerid ) ) if ( p_Class[ playerid ] == CLASS_POLICE && ! IsPlayerSpawnProtected( playerid ) )
{ {
@ -68,7 +68,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
} }
} }
} }
} }*/
return 1; return 1;
} }
@ -547,3 +547,19 @@ hook OnPlayerAccessEntrance( playerid, entranceid, worldid, interiorid )
} }
return 1; return 1;
} }
hook OnPlayerUpdateEx( playerid )
{
if ( p_Class[ playerid ] == CLASS_POLICE && GetPlayerScore( playerid ) < 50 )
{
new
Float: radius = 25.0,
closestCivilian = GetClosestPlayerEx( playerid, CLASS_CIVILIAN, radius );
if ( closestCivilian != INVALID_PLAYER_ID && GetPlayerWantedLevel( closestCivilian ) != 0 )
{
return ShowPlayerHelpDialog( playerid, 4000, "Use ~y~/taze [ID]~w~, ~b~/cuff [ID]~w~, and ~r~/ar [ID] ~w~commands to arrest." );
}
}
return 1;
}

View File

@ -0,0 +1,98 @@
/*
* Irresistible Gaming (c) 2018
* Developed by Lorenc
* Module: \cnr\features\cop\emp.pwn
* Purpose: handle vehicle emp
*/
/* ** Includes ** */
#include < YSI\y_hooks >
/* ** Commands ** */
CMD:emp( playerid, params[ ] )
{
new
pID
;
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to Police only." );
else if ( p_inCIA{ playerid } == false || p_inArmy{ playerid } == true ) return SendError( playerid, "This is restricted to CIA only." );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/emp [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( pID == playerid ) return SendError( playerid, "You cannot do this to yourself." );
else if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
else if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
else if ( IsPlayerAdminOnDuty( pID ) ) return SendError( playerid, "This person is an admin on duty!" );
else if ( IsPlayerAdminOnDuty( playerid ) ) return SendError( playerid, "You cannot use this command while AOD." );
else if ( p_Class[ pID ] == CLASS_POLICE ) return SendError( playerid, "This person is a apart of the Police Force." );
else if ( !p_WantedLevel[ pID ] ) return SendError( playerid, "This person is innocent!" );
else if ( !IsPlayerInAnyVehicle( pID ) ) return SendError( playerid, "This player isn't inside any vehicle." );
else if ( GetPlayerState( pID ) != PLAYER_STATE_DRIVER ) return SendError( playerid, "This player is not a driver of any vehicle." );
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 30.0 )
{
/* ** ANTI EMP SPAM ** */
if ( p_AntiEmpSpam[ pID ] > g_iTime )
return SendError( playerid, "You cannot EMP this person for %s.", secondstotime( p_AntiEmpSpam[ pID ] - g_iTime ) );
/* ** END OF ANTI SPAM ** */
new
iVehicle = GetPlayerVehicleID( pID );
if ( g_buyableVehicle{ iVehicle } )
return SendError( playerid, "Failed to place a Electromagnetic Pulse on this player's vehicle." );
p_AntiEmpSpam[ pID ] = g_iTime + 60;
if ( p_AntiEMP[ pID ] > 0 )
{
p_AntiEMP[ pID ] --;
new
iRandom = random( 101 );
if ( iRandom < 90 )
{
SendClientMessage( playerid, -1, ""COL_RED"[EMP]{FFFFFF} An Electromagnetic Pulse attempt has been repelled by an aluminum foil!" );
SendClientMessage( pID, -1, ""COL_GREEN"[EMP]{FFFFFF} Electromagnetic Pulse had been repelled by aluminum foil set on vehicle." );
p_QuitToAvoidTimestamp[ pID ] = g_iTime + 15;
return 1;
}
}
SendClientMessageFormatted( pID, -1, ""COL_RED"[EMP]{FFFFFF} %s(%d) has sent an electromagnetic pulse on your vehicle causing it to crash for 30 seconds.", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[EMP]{FFFFFF} You have activated a electromagnetic pulse on %s(%d)'s vehicle!", ReturnPlayerName( pID ), pID );
p_QuitToAvoidTimestamp[ pID ] = g_iTime + 15;
SetTimerEx( "emp_deactivate", 30000, false, "d", GetPlayerVehicleID( pID ) );
GetVehicleParamsEx( iVehicle, engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( iVehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective );
}
else SendError( playerid, "This player is not nearby." );
return 1;
}
CMD:demp( playerid, params[ ] ) return cmd_disableemp(playerid, params);
CMD:disableemp( playerid, params[ ] )
{
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to Police only." );
else if ( p_inCIA{ playerid } == false || p_inArmy{ playerid } == true ) return SendError( playerid, "This is restricted to CIA only." );
else if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
else if ( !IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You are not in any vehicle." );
new
iVehicle = GetPlayerVehicleID( playerid );
GetVehicleParamsEx( iVehicle, engine, lights, alarm, doors, bonnet, boot, objective );
if ( engine != VEHICLE_PARAMS_OFF ) return SendError( playerid, "This has not been affected by any EMP attacks.");
SetVehicleParamsEx( iVehicle, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective );
return SendServerMessage( playerid, "You have successfully re-initialized the vehicle." );
}
function emp_deactivate( vehicleid )
{
if ( !IsValidVehicle( vehicleid ) ) return 0;
GetVehicleParamsEx( vehicleid, engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective );
return 1;
}

View File

@ -639,7 +639,7 @@ thread OnPlayerGangLoaded( playerid )
else else
{ {
p_GangID[ playerid ] = -1; p_GangID[ playerid ] = -1;
SendServerMessage( playerid, "Had an issue loading your gang. Contact Lorenc (0x92F)." ); SendServerMessage( playerid, "Had an issue loading your gang. Contact Damen (0x92F)." );
printf("[GANG] [ERROR] Had an issue loading a gang row id %d", gang_sql_id ); printf("[GANG] [ERROR] Had an issue loading a gang row id %d", gang_sql_id );
} }
} }

View File

@ -630,10 +630,10 @@ thread OnHouseLoad( )
} }
printf( "[HOUSES]: %d houses have been loaded. (Tick: %dms)", rows, GetTickCount( ) - loadingTick ); printf( "[HOUSES]: %d houses have been loaded. (Tick: %dms)", rows, GetTickCount( ) - loadingTick );
// Make Lorenc the owner of unowned VIP houses // Make Damen the owner of unowned VIP houses
foreach ( new houseid : houses ) if ( g_houseData[ houseid ] [ E_COST ] < 10000 ) { foreach ( new houseid : houses ) if ( g_houseData[ houseid ] [ E_COST ] < 10000 ) {
if ( strmatch( g_houseData[ houseid ] [ E_OWNER ], "No-one" ) ) { if ( strmatch( g_houseData[ houseid ] [ E_OWNER ], "No-one" ) ) {
SetHouseOwner( houseid, 1, "Lorenc" ); SetHouseOwner( houseid, 1, "Damen" );
} }
} }
return 1; return 1;

View File

@ -217,9 +217,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
/* ** Commands ** */ /* ** Commands ** */
CMD:perks( playerid, params[ ] ) CMD:perks( playerid, params[ ] )
{ {
if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) ) { if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) )
return SendError( playerid, "You cannot use this command since you're in an event." ); return SendError( playerid, "You cannot use this command since you're in an event." );
}
if ( IsPlayerInArmyVehicle( playerid ) )
return SendError( playerid, "You cannot use this command while in an army vehicle." );
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" ); return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );
} }

View File

@ -353,7 +353,7 @@ thread OnAccountGuardDelete( playerid )
; ;
if ( id != p_accountSecurityData[ playerid ] [ E_ID ] ) if ( id != p_accountSecurityData[ playerid ] [ E_ID ] )
return SendError( playerid, "Something is wrong with your email. Talk to Lorenc." ), 1; return SendError( playerid, "Something is wrong with your email. Talk to Damen." ), 1;
if ( g_iTime - last_changed < 300 ) { if ( g_iTime - last_changed < 300 ) {
return SendError( playerid, "You can use this feature in %s.", secondstotime( 300 - ( g_iTime - last_changed ) ) ); return SendError( playerid, "You can use this feature in %s.", secondstotime( 300 - ( g_iTime - last_changed ) ) );

View File

@ -9,7 +9,7 @@
#include < YSI\y_hooks > #include < YSI\y_hooks >
/* ** Definitions ** */ /* ** Definitions ** */
#define MAX_SETTINGS ( 12 ) #define MAX_SETTINGS ( 13 )
#define SETTING_BAILOFFERS ( 0 ) #define SETTING_BAILOFFERS ( 0 )
#define SETTING_EVENT_TP ( 1 ) #define SETTING_EVENT_TP ( 1 )
@ -23,13 +23,14 @@
#define SETTING_COINS_BAR ( 9 ) #define SETTING_COINS_BAR ( 9 )
#define SETTING_TOP_DONOR ( 10 ) #define SETTING_TOP_DONOR ( 10 )
#define SETTING_WEAPON_PICKUP ( 11 ) #define SETTING_WEAPON_PICKUP ( 11 )
#define SETTING_HIDE_GAMB_MSG ( 12 )
/* ** Variables ** */ /* ** Variables ** */
static stock static stock
g_PlayerSettings [ MAX_SETTINGS ] [ 24 ] = { g_PlayerSettings [ MAX_SETTINGS ] [ 24 ] = {
{ "Prevent Bail Offers" }, { "Prevent Event Teleports" }, { "Prevent Gang Invites" }, { "Prevent Chat Prefixes" }, { "Prevent Ransom Offers" }, { "Prevent Bail Offers" }, { "Prevent Event Teleports" }, { "Prevent Gang Invites" }, { "Prevent Chat Prefixes" }, { "Prevent Ransom Offers" },
{ "Display User ID In Chat" }, { "Display Connection Log" }, { "Display Hitmarker" }, { "Set V.I.P Skin" }, { "Hide Total Coin Bar" }, { "Hide Last Donor Text" }, { "Display User ID In Chat" }, { "Display Connection Log" }, { "Display Hitmarker" }, { "Set V.I.P Skin" }, { "Hide Total Coin Bar" }, { "Hide Last Donor Text" },
{ "Manual Pickup Weapon" } { "Manual Pickup Weapon" }, { "Hide Gambling Win Msgs" }
}, },
bool: p_PlayerSettings [ MAX_PLAYERS ] [ MAX_SETTINGS char ] bool: p_PlayerSettings [ MAX_PLAYERS ] [ MAX_SETTINGS char ]
; ;

View File

@ -66,7 +66,7 @@ static stock
{ "{8ADE47}Stephanie:"COL_WHITE" Play Poker with your friends at any casino! Beat your way to riches!" }, { "{8ADE47}Stephanie:"COL_WHITE" Play Poker with your friends at any casino! Beat your way to riches!" },
{ "{8ADE47}Stephanie:"COL_WHITE" Get casino rewards points by gambling at any casino! Use "COL_GREY"/casino rewards"COL_WHITE" to spend them!" }, { "{8ADE47}Stephanie:"COL_WHITE" Get casino rewards points by gambling at any casino! Use "COL_GREY"/casino rewards"COL_WHITE" to spend them!" },
{ "{8ADE47}Stephanie:"COL_WHITE" Race your friends in a street race or outrun race by using "COL_GREY"/race"COL_WHITE"!" }, { "{8ADE47}Stephanie:"COL_WHITE" Race your friends in a street race or outrun race by using "COL_GREY"/race"COL_WHITE"!" },
{ "{8ADE47}Stephanie:"COL_WHITE" Want 3 days of free V.I.P? Add an "COL_GREY"/email"COL_WHITE" to your account!" }, //{ "{8ADE47}Stephanie:"COL_WHITE" Want 3 days of free V.I.P? Add an "COL_GREY"/email"COL_WHITE" to your account!" },
{ "{8ADE47}Stephanie:"COL_WHITE" Contribute to our feature "COL_GREY"/crowdfunds"COL_WHITE"! Early supporters get benefits!" }, { "{8ADE47}Stephanie:"COL_WHITE" Contribute to our feature "COL_GREY"/crowdfunds"COL_WHITE"! Early supporters get benefits!" },
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy premium player homes using "COL_GREY"/estate"COL_WHITE"!" }, { "{8ADE47}Stephanie:"COL_WHITE" You can buy premium player homes using "COL_GREY"/estate"COL_WHITE"!" },
{ "{8ADE47}Stephanie:"COL_WHITE" You can buy Irresistible Coins from players using "COL_GREY"/ic buy"COL_WHITE"!" }, { "{8ADE47}Stephanie:"COL_WHITE" You can buy Irresistible Coins from players using "COL_GREY"/ic buy"COL_WHITE"!" },
@ -101,7 +101,7 @@ hook OnServerUpdate( )
} }
// throttle // throttle
g_randomMessageTick = GetServerTime( ) + 30; g_randomMessageTick = GetServerTime( ) + 60;
} }
return Y_HOOKS_CONTINUE_RETURN_1; return Y_HOOKS_CONTINUE_RETURN_1;
} }

View File

@ -557,7 +557,7 @@ function OnPlayerHoldupStore( playerid, clerkid, step )
} }
if ( !( 0 <= amount < 10000 ) ) if ( !( 0 <= amount < 10000 ) )
return SendError( playerid, "A money exploit occurred. Contact Lorenc ASAP." ); return SendError( playerid, "A money exploit occurred. Contact Damen ASAP." );
GivePlayerCash( playerid, amount ); GivePlayerCash( playerid, amount );
GivePlayerExperience( playerid, E_ROBBERY, 0.2 ); // give 10% of what it normally does, since it does this for like 4-5 times GivePlayerExperience( playerid, E_ROBBERY, 0.2 ); // give 10% of what it normally does, since it does this for like 4-5 times

View File

@ -210,11 +210,11 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
// Redirect player // Redirect player
if ( selected_vip == VIP_DIAMOND ) if ( selected_vip == VIP_DIAMOND )
{ {
ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else if ( selected_vip == VIP_PLATINUM ) else if ( selected_vip == VIP_PLATINUM )
{ {
ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else else
{ {
@ -416,12 +416,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
if ( sscanf( inputtext, "u", pID ) ) if ( sscanf( inputtext, "u", pID ) )
{ {
SendError( playerid, "Please enter a player's ID or name." ); SendError( playerid, "Please enter a player's ID or name." );
ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else if ( !IsPlayerConnected( pID ) ) else if ( !IsPlayerConnected( pID ) )
{ {
SendError( playerid, "This player is not connected." ); SendError( playerid, "This player is not connected." );
ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else else
{ {
@ -447,12 +447,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
if ( sscanf( inputtext, "u", pID ) ) if ( sscanf( inputtext, "u", pID ) )
{ {
SendError( playerid, "Please enter a player's ID or name." ); SendError( playerid, "Please enter a player's ID or name." );
ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else if ( !IsPlayerConnected( pID ) ) else if ( !IsPlayerConnected( pID ) )
{ {
SendError( playerid, "This player is not connected." ); SendError( playerid, "This player is not connected." );
ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Lorenc on the forum when you make a decision!", "Gift it!", "I'll Think!" ); ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" );
} }
else else
{ {
@ -493,7 +493,7 @@ CMD:irresistiblecoins( playerid, params[ ] )
if ( sscanf( params[ 5 ],"uf", senttoid, coins ) ) return SendUsage( playerid, "/irresistiblecoins send [PLAYER_ID] [COINS]" ); if ( sscanf( params[ 5 ],"uf", senttoid, coins ) ) return SendUsage( playerid, "/irresistiblecoins send [PLAYER_ID] [COINS]" );
else if ( !IsPlayerConnected( senttoid ) || IsPlayerNPC( senttoid ) ) return SendError( playerid, "Invalid Player ID." ); else if ( !IsPlayerConnected( senttoid ) || IsPlayerNPC( senttoid ) ) return SendError( playerid, "Invalid Player ID." );
else if ( p_VIPLevel[ playerid ] < VIP_BRONZE ) return SendError( playerid, "You are not a Bronze V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" ); else if ( p_VIPLevel[ playerid ] < VIP_REGULAR ) return SendError( playerid, "You are not a Regular V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" );
else if ( coins < 0.1 || coins > 10000.0 ) return SendError( playerid, "You can only send between 0.1 and 10,000.0 coins at a single time." ); else if ( coins < 0.1 || coins > 10000.0 ) return SendError( playerid, "You can only send between 0.1 and 10,000.0 coins at a single time." );
else if ( coins > 99999999 || coins < 0 ) return SendError( playerid, "You can only send between 0.1 and 5,000.0 coins at a single time." ); // Making cash go over billions... else if ( coins > 99999999 || coins < 0 ) return SendError( playerid, "You can only send between 0.1 and 5,000.0 coins at a single time." ); // Making cash go over billions...
else if ( GetPlayerIrresistibleCoins( playerid ) < coins ) return SendError( playerid, "You do not have this number of coins to send." ); else if ( GetPlayerIrresistibleCoins( playerid ) < coins ) return SendError( playerid, "You do not have this number of coins to send." );
@ -801,7 +801,7 @@ static stock ShowPlayerVipRedeemedDialog( playerid )
""COL_GREY" * What are the commands?"COL_WHITE" Use /vipcmds to view a detailed list of VIP commands.\n"\ ""COL_GREY" * What are the commands?"COL_WHITE" Use /vipcmds to view a detailed list of VIP commands.\n"\
""COL_GREY" * What did I receive?"COL_WHITE" Check through your V.I.P package contents via our site (forum -> announcements board).\n" ); ""COL_GREY" * What did I receive?"COL_WHITE" Check through your V.I.P package contents via our site (forum -> announcements board).\n" );
strcat( szLargeString, ""COL_GREY" * How to redeem my houses/vehicles?"COL_WHITE" You will be announced to the admins and noted down for assistance, so please wait!\n"\ strcat( szLargeString, ""COL_GREY" * How to redeem my houses/vehicles?"COL_WHITE" You will be announced to the admins and noted down for assistance, so please wait!\n"\
""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Lorenc via the forums!\n\nThanks for choosing to spend your Irresistible Coins, enjoy what you've got! :P" ); ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Damen via the forums!\n\nThanks for choosing to spend your Irresistible Coins, enjoy what you've got! :P" );
ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" ); ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" );
} }

View File

@ -146,7 +146,7 @@ thread deleteplayernote( playerid, noteid )
if ( rows ) { if ( rows ) {
SaveToAdminLog( playerid, noteid, "removed note" ); SaveToAdminLog( playerid, noteid, "removed note" );
mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", p_AccountID[ playerid ], noteid ) ); mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", p_AccountID[ playerid ], noteid ) );
SendServerMessage( playerid, "You have removed note id %d. If there are any problems, contact Lorenc/Council.", noteid ); SendServerMessage( playerid, "You have removed note id %d. If there are any problems, contact Damen/Council.", noteid );
AddAdminLogLineFormatted( "%s(%d) has deleted note id %d", ReturnPlayerName( playerid ), playerid, noteid ); AddAdminLogLineFormatted( "%s(%d) has deleted note id %d", ReturnPlayerName( playerid ), playerid, noteid );
return 1; return 1;
} }

View File

@ -44,7 +44,7 @@ hook OnScriptInit( )
SetDynamicObjectMaterialText( ( g_TopDonorWall = CreateDynamicObject( 3074, -1574.3559, 885.1296, 14.0153, 0.0000, 0.0000, -0.0156 ) ), 0, "Nobody donated :(", 130, "Arial", 48, 0, -65536, 0, 1 ); SetDynamicObjectMaterialText( ( g_TopDonorWall = CreateDynamicObject( 3074, -1574.3559, 885.1296, 14.0153, 0.0000, 0.0000, -0.0156 ) ), 0, "Nobody donated :(", 130, "Arial", 48, 0, -65536, 0, 1 );
// Latest Donor TD // Latest Donor TD
g_TopDonorTD = TextDrawCreate(320.000000, 2.000000, "Top Donor Lorenc - $0.00, ~w~~h~~h~Latest Donor Lorenc - $0.00"); g_TopDonorTD = TextDrawCreate(320.000000, 2.000000, "Top Donor Damen - $0.00, ~w~~h~~h~Latest Donor Damen - $0.00");
TextDrawAlignment(g_TopDonorTD, 2); TextDrawAlignment(g_TopDonorTD, 2);
TextDrawBackgroundColor(g_TopDonorTD, 0); TextDrawBackgroundColor(g_TopDonorTD, 0);
TextDrawFont(g_TopDonorTD, 1); TextDrawFont(g_TopDonorTD, 1);
@ -87,7 +87,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
strcat( szLargeString, ""COL_WHITE"Thank you a lot for donating! :D In return for your dignity, you have received Irresistible Coins.\n\n"\ strcat( szLargeString, ""COL_WHITE"Thank you a lot for donating! :D In return for your dignity, you have received Irresistible Coins.\n\n"\
""COL_GREY" * What do I do with Irresistible Coins?"COL_WHITE" You can claim the V.I.P of your choice via "COL_GREY"/irresistiblecoins market"COL_WHITE".\n" ); ""COL_GREY" * What do I do with Irresistible Coins?"COL_WHITE" You can claim the V.I.P of your choice via "COL_GREY"/irresistiblecoins market"COL_WHITE".\n" );
strcat( szLargeString, ""COL_GREY" * How many do I have?"COL_WHITE" You can see how many Irresistible Coins you have via "COL_GREY"/irresistiblecoins"COL_WHITE".\n" \ strcat( szLargeString, ""COL_GREY" * How many do I have?"COL_WHITE" You can see how many Irresistible Coins you have via "COL_GREY"/irresistiblecoins"COL_WHITE".\n" \
""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Lorenc via the forums!\n\nThank you once again for your contribution to our community! :P" ); ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Damen via the forums!\n\nThank you once again for your contribution to our community! :P" );
return ShowPlayerDialog( playerid, DIALOG_FINISHED_DONATING, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" ); return ShowPlayerDialog( playerid, DIALOG_FINISHED_DONATING, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" );
} }
else if ( dialogid == DIALOG_FINISHED_DONATING ) else if ( dialogid == DIALOG_FINISHED_DONATING )
@ -97,7 +97,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
else if ( dialogid == DIALOG_LATEST_DONOR ) else if ( dialogid == DIALOG_LATEST_DONOR )
{ {
if ( GetPVarType( playerid, "just_donated" ) != PLAYER_VARTYPE_FLOAT ) if ( GetPVarType( playerid, "just_donated" ) != PLAYER_VARTYPE_FLOAT )
return SendError( playerid, "Seems to be an issue where we couldn't find how much you donated. Report to Lorenc." ); return SendError( playerid, "Seems to be an issue where we couldn't find how much you donated. Report to Damen." );
new new
Float: fAmount = GetPVarFloat( playerid, "just_donated" ); Float: fAmount = GetPVarFloat( playerid, "just_donated" );

View File

@ -572,7 +572,7 @@ stock CheckForBlackjack( tableid )
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has been returned %s due to a push.", ReturnPlayerName( playerid ), playerid, cash_format( payout ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has been returned %s due to a push.", ReturnPlayerName( playerid ), playerid, cash_format( payout ) );
GameTextForPlayer( playerid, sprintf( "~n~~n~~y~%s returned!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~y~%s returned!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
@ -585,18 +585,18 @@ stock CheckForBlackjack( tableid )
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a card count of 21!", ReturnPlayerName( playerid ), playerid, cash_format( payout ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a card count of 21!", ReturnPlayerName( playerid ), playerid, cash_format( payout ) );
} }
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
else if ( dealer_score == 21 ) { else if ( dealer_score == 21 ) {
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a dealer %s.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ), IsDealerHandBlackjack( tableid, dealer_score ) ? ( "blackjack" ) : ( "21" ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a dealer %s.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ), IsDealerHandBlackjack( tableid, dealer_score ) ? ( "blackjack" ) : ( "21" ) );
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 ); GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
} }
else if ( player_score > 21 ) { else if ( player_score > 21 ) {
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 ); GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
@ -605,12 +605,12 @@ stock CheckForBlackjack( tableid )
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, cash_format( payout ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, cash_format( payout ) );
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
else if ( player_score < dealer_score && dealer_score >= 17 ) { else if ( player_score < dealer_score && dealer_score >= 17 ) {
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_BUST;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has lost %s due to a bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 ); GameTextForPlayer( playerid, "~n~~n~~r~No win!", 4000, 3 );
@ -619,7 +619,7 @@ stock CheckForBlackjack( tableid )
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) ); SendClientMessageToBlackjack( tableid, COLOR_GREY, "[BLACKJACK]"COL_WHITE" %s(%d) has won %s due to a dealer bust.", ReturnPlayerName( playerid ), playerid, cash_format( g_blackjackData[ tableid ] [ E_PAYOUT ] ) );
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); if ( payout != 0 ) GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
@ -627,8 +627,12 @@ stock CheckForBlackjack( tableid )
// alert world // alert world
if ( g_blackjackPlayerState[ tableid ] [ player_index ] == BLACKJACK_STATE_WIN && payout > g_blackjackData[ tableid ] [ E_PAYOUT ] && payout >= 10000 ) { 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 ); UpdateServerVariable( "blackjack_wins", 0, GetGVarFloat( "blackjack_wins" ) + ( float( payout ) / 1000000.0 ), "", GLOBAL_VARTYPE_FLOAT );
SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from blackjack!", ReturnPlayerName( playerid ), playerid, cash_format( payout ) ); foreach(new i : Player)
} {
if ( !IsPlayerSettingToggled( i, 12 ) )
SendClientMessageFormatted( i, -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from blackjack!", ReturnPlayerName( playerid ), playerid, cash_format( payout ) );
}
}
} }
} }
return dealer_score; return dealer_score;
@ -706,7 +710,7 @@ stock SendClientMessageToBlackjack( tableid, colour, format[ ], va_args<> )
stock InitializeBlackjackTextdraws( id ) stock InitializeBlackjackTextdraws( id )
{ {
g_blackjackTurnTD[ id ] = TextDrawCreate(330.000000, 204.000000, "Lorenc has 5 seconds"); g_blackjackTurnTD[ id ] = TextDrawCreate(330.000000, 204.000000, "Damen has 5 seconds");
TextDrawAlignment(g_blackjackTurnTD[ id ], 2); TextDrawAlignment(g_blackjackTurnTD[ id ], 2);
TextDrawBackgroundColor(g_blackjackTurnTD[ id ], 255); TextDrawBackgroundColor(g_blackjackTurnTD[ id ], 255);
TextDrawFont(g_blackjackTurnTD[ id ], 1); TextDrawFont(g_blackjackTurnTD[ id ], 1);

View File

@ -686,11 +686,15 @@ public OnRouletteWheelStop( rouletteid, winner )
// inform users // inform users
if ( profit >= 10000 ) { if ( profit >= 10000 ) {
SendGlobalMessage( -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from roulette!", ReturnPlayerName( playerid ), playerid, cash_format( profit ) ); foreach(new i : Player)
{
if ( !IsPlayerSettingToggled( i, 12 ) )
SendClientMessageFormatted( i, -1, ""COL_GREY"[CASINO]{FFFFFF} %s(%d) has won "COL_GOLD"%s"COL_WHITE" from roulette!", ReturnPlayerName( playerid ), playerid, cash_format( profit ) );
}
} }
// give user points // give user points
GivePlayerCasinoRewardsPoints( playerid, waged, .house_edge = 2.7 ); if ( profit != 0 ) GivePlayerCasinoRewardsPoints( playerid, waged, .house_edge = 2.7 );
// gametext // gametext
if ( profit > 0 ) { if ( profit > 0 ) {

View File

@ -288,7 +288,12 @@ public OnPlayerUseSlotMachine( playerid, slotid, first_combo, second_combo, thir
// alert user // alert user
if ( iNetWin > g_slotmachineData[ slotid ] [ E_ENTRY_FEE ] ) { 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" ) ) ); 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" ) ) );
} else { foreach(new i : Player)
{
if ( !IsPlayerSettingToggled( i, 12 ) )
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 {
SendServerMessage( playerid, "Congratulations, you've won "COL_GOLD"%s"COL_WHITE"!", cash_format( iNetWin ) ); SendServerMessage( playerid, "Congratulations, you've won "COL_GOLD"%s"COL_WHITE"!", cash_format( iNetWin ) );
} }

View File

@ -52,6 +52,9 @@ new
// p_XP [ MAX_PLAYERS ], // p_XP [ MAX_PLAYERS ],
bool: p_Spectating [ MAX_PLAYERS char ], bool: p_Spectating [ MAX_PLAYERS char ],
bool: p_Muted [ MAX_PLAYERS char ], bool: p_Muted [ MAX_PLAYERS char ],
bool: p_ChatBanned [ MAX_PLAYERS char ],
p_ChatBannedBy [ MAX_PLAYERS ] [ MAX_PLAYER_NAME ],
p_ChatBanReason [ MAX_PLAYERS ] [ 25 ],
bool: p_InfectedHIV [ MAX_PLAYERS char ], bool: p_InfectedHIV [ MAX_PLAYERS char ],
p_AntiTextSpam [ MAX_PLAYERS ], p_AntiTextSpam [ MAX_PLAYERS ],
bool: p_BlockedPM [ MAX_PLAYERS ] [ MAX_PLAYERS ], bool: p_BlockedPM [ MAX_PLAYERS ] [ MAX_PLAYERS ],
@ -218,3 +221,5 @@ stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid };
stock IsPlayerJailed( playerid ) return p_Jailed{ playerid }; stock IsPlayerJailed( playerid ) return p_Jailed{ playerid };
stock IsPlayerAdminOnDuty( playerid ) return p_AdminOnDuty{ playerid }; stock IsPlayerAdminOnDuty( playerid ) return p_AdminOnDuty{ playerid };
stock IsPlayerChatBanned( playerid ) return p_ChatBanned{ playerid };

View File

@ -42,6 +42,8 @@ new
/* ** Hooks ** */ /* ** Hooks ** */
hook OnScriptInit( ) hook OnScriptInit( )
{ {
TextDrawSetString( g_MotdTD, "~w~Want more ~g~money, houses, and xp~w~? Consider donating! ~y~/vip" );
g_currentXPTD = TextDrawCreate(529.000000, 405.000000, "Current XP"); g_currentXPTD = TextDrawCreate(529.000000, 405.000000, "Current XP");
TextDrawBackgroundColor(g_currentXPTD, 255); TextDrawBackgroundColor(g_currentXPTD, 255);
TextDrawFont(g_currentXPTD, 3); TextDrawFont(g_currentXPTD, 3);

View File

@ -0,0 +1,14 @@
-- CREATE A MIGRATION ENTRY
INSERT INTO `DB_MIGRATIONS` (`MIGRATION`) VALUES ('20190405_cnr_chat_ban_creation');
--BEGIN
-- CREATE TABLE
CREATE TABLE IF NOT EXISTS `CHAT_BANS` (
`ID` int(11) NOT NULL,
`NAME` varchar(25) DEFAULT NULL,
`BANNED_BY_ID` int(11) NOT NULL,
`BANNED_BY` varchar(25) DEFAULT NULL,
`REASON` varchar(25) DEFAULT NULL,
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -41,6 +41,7 @@ stock szNormalString[ 144 ];
stock szBigString[ 256 ]; stock szBigString[ 256 ];
stock szLargeString[ 1024 ]; stock szLargeString[ 1024 ];
stock szHugeString[ 2048 ]; stock szHugeString[ 2048 ];
stock szMassiveString[ 4096 ];
stock g_szSprintfBuffer[ 1024 ]; stock g_szSprintfBuffer[ 1024 ];
stock tmpVariable; stock tmpVariable;

View File

@ -16,7 +16,7 @@
#pragma option -d3 #pragma option -d3
#pragma dynamic 7200000 #pragma dynamic 7200000
// #define DEBUG_MODE //#define DEBUG_MODE
#if defined DEBUG_MODE #if defined DEBUG_MODE
#pragma option -d3 #pragma option -d3
@ -198,6 +198,8 @@ public OnServerUpdateTimer( )
// better to store in a variable as we are getting the timestamp from hardware // better to store in a variable as we are getting the timestamp from hardware
g_iTime = gettime( ); g_iTime = gettime( );
UpdatePlayerCounters();
// for hooks // for hooks
CallLocalFunction( "OnServerUpdate", "" ); CallLocalFunction( "OnServerUpdate", "" );
@ -521,6 +523,9 @@ public OnPlayerDisconnect( playerid, reason )
p_Cuffed { playerid } = false; p_Cuffed { playerid } = false;
justConnected { playerid } = true; justConnected { playerid } = true;
p_Muted { playerid } = false; p_Muted { playerid } = false;
p_ChatBanned { playerid } = false;
p_ChatBannedBy [ playerid ] [ 0 ] = '\0';
p_ChatBanReason [ playerid ] [ 0 ] = '\0';
p_MetalMelter [ playerid ] = 0; p_MetalMelter [ playerid ] = 0;
p_LeftCuffed { playerid } = false; p_LeftCuffed { playerid } = false;
p_PmResponder [ playerid ] = INVALID_PLAYER_ID; p_PmResponder [ playerid ] = INVALID_PLAYER_ID;
@ -1508,12 +1513,15 @@ public OnPlayerText( playerid, text[ ] )
return SendError( playerid, "An error occured, please try again." ), 0; return SendError( playerid, "An error occured, please try again." ), 0;
#endif #endif
if ( IsPlayerChatBanned( playerid ) )
return SendError( playerid, "You have been chat banned and are not allowed to chat."), 0;
if ( textContainsIP( text ) ) if ( textContainsIP( text ) )
return SendServerMessage( playerid, "Please do not advertise." ), 0; return SendServerMessage( playerid, "Please do not advertise." ), 0;
new tick_count = GetTickCount( ); new tick_count = GetTickCount( );
if ( p_AntiTextSpam[ playerid ] > tick_count ) if ( p_AntiTextSpam[ playerid ] > tick_count && p_AdminLevel[ playerid ] != 6 )
{ {
p_AntiTextSpam[ playerid ] = tick_count + 750; p_AntiTextSpam[ playerid ] = tick_count + 750;
p_AntiTextSpamCount{ playerid } ++; p_AntiTextSpamCount{ playerid } ++;
@ -1670,15 +1678,6 @@ stock UntiePlayer( playerid )
SendGlobalMessage( -1, ""COL_GREY"[SERVER]{FFFFFF} %s(%d) has been untied by the anti-abuse system.", ReturnPlayerName( playerid ), playerid ); SendGlobalMessage( -1, ""COL_GREY"[SERVER]{FFFFFF} %s(%d) has been untied by the anti-abuse system.", ReturnPlayerName( playerid ), playerid );
} }
function emp_deactivate( vehicleid )
{
if ( !IsValidVehicle( vehicleid ) ) return 0;
GetVehicleParamsEx( vehicleid, engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective );
return 1;
}
public OnPlayerProgressUpdate( playerid, progressid, bool: canceled, params ) public OnPlayerProgressUpdate( playerid, progressid, bool: canceled, params )
{ {
return 1; return 1;
@ -2114,7 +2113,8 @@ CMD:cw( playerid, params[ ] ) return cmd_carwhisper( playerid, params );
CMD:carwhisper( playerid, params[ ] ) CMD:carwhisper( playerid, params[ ] )
{ {
new msg[ 100 ]; new msg[ 100 ];
if ( !IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You must be inside a vehicle to use this command." ); if ( p_ChatBanned{ playerid } ) return SendError( playerid, "You have been chat banned and are not allowed to chat." );
else if ( !IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You must be inside a vehicle to use this command." );
else if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/carwhisper [MESSAGE]" ); else if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/carwhisper [MESSAGE]" );
else if ( textContainsIP( msg ) ) return SendError( playerid, "Advertising is forbidden." ); else if ( textContainsIP( msg ) ) return SendError( playerid, "Advertising is forbidden." );
else else
@ -2133,7 +2133,8 @@ CMD:w( playerid, params[ ] ) return cmd_whisper( playerid, params );
CMD:whisper( playerid, params[ ] ) CMD:whisper( playerid, params[ ] )
{ {
new msg[ 100 ]; new msg[ 100 ];
if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/whisper [MESSAGE]" ); if ( p_ChatBanned{ playerid } ) return SendError( playerid, "You have been chat banned and are not allowed to chat." );
else if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/whisper [MESSAGE]" );
else if ( textContainsIP( msg ) ) return SendError( playerid, "Advertising is forbidden." ); else if ( textContainsIP( msg ) ) return SendError( playerid, "Advertising is forbidden." );
else else
{ {
@ -2151,8 +2152,8 @@ CMD:whisper( playerid, params[ ] )
CMD:admins( playerid, params[ ] ) CMD:admins( playerid, params[ ] )
{ {
if ( GetPlayerScore( playerid ) < 500 && !IsPlayerUnderCover( playerid ) && p_AdminLevel[ playerid ] < 1 ) if ( GetPlayerScore( playerid ) < 50 && !IsPlayerUnderCover( playerid ) && p_AdminLevel[ playerid ] < 1 )
return SendError( playerid, "You need at least 500 score to view the online adminstrators." ); return SendError( playerid, "You need at least 50 score to view the online adminstrators." );
new g_adminList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true; new g_adminList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true;
@ -2518,6 +2519,11 @@ CMD:myaccid( playerid, params[ ] )
return 1; return 1;
} }
CMD:discord( playerid, params[ ] )
{
return SendServerMessage( playerid, "Visit 'sfcnr.com/discord' to join our Discord server!" );
}
CMD:job( playerid, params[ ] ) CMD:job( playerid, params[ ] )
{ {
if ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPJob{ playerid } != p_Job{ playerid } ) if ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPJob{ playerid } != p_Job{ playerid } )
@ -2641,69 +2647,6 @@ thread OnPlayerWeeklyTime( playerid, irc, player[ ] )
return 1; return 1;
} }
CMD:emp( playerid, params[ ] )
{
new
pID
;
if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to Police only." );
else if ( p_inCIA{ playerid } == false || p_inArmy{ playerid } == true ) return SendError( playerid, "This is restricted to CIA only." );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/emp [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." );
else if ( pID == playerid ) return SendError( playerid, "You cannot do this to yourself." );
else if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You are kidnapped, you cannot do this." );
else if ( IsPlayerTied( playerid ) ) return SendError( playerid, "You are tied, you cannot do this." );
else if ( IsPlayerAdminOnDuty( pID ) ) return SendError( playerid, "This person is an admin on duty!" );
else if ( p_Class[ pID ] == CLASS_POLICE ) return SendError( playerid, "This person is a apart of the Police Force." );
else if ( !p_WantedLevel[ pID ] ) return SendError( playerid, "This person is innocent!" );
else if ( !IsPlayerInAnyVehicle( pID ) ) return SendError( playerid, "This player isn't inside any vehicle." );
else if ( GetPlayerState( pID ) != PLAYER_STATE_DRIVER ) return SendError( playerid, "This player is not a driver of any vehicle." );
//else if ( g_buyableVehicle{ GetPlayerVehicleID( pID ) } == true ) return SendError( playerid, "Failed to place a Electromagnetic Pulse on this player's vehicle." );
else if ( GetDistanceBetweenPlayers( playerid, pID ) < 30.0 )
{
/* ** ANTI EMP SPAM ** */
if ( p_AntiEmpSpam[ pID ] > g_iTime )
return SendError( playerid, "You cannot EMP this person for %s.", secondstotime( p_AntiEmpSpam[ pID ] - g_iTime ) );
/* ** END OF ANTI SPAM ** */
new
iVehicle = GetPlayerVehicleID( pID );
if ( g_buyableVehicle{ iVehicle } )
return SendError( playerid, "Failed to place a Electromagnetic Pulse on this player's vehicle." );
p_AntiEmpSpam[ pID ] = g_iTime + 60;
if ( p_AntiEMP[ pID ] > 0 )
{
p_AntiEMP[ pID ] --;
new
iRandom = random( 101 );
//if ( g_buyableVehicle{ iVehicle } )
//iRandom -= 50;
if ( iRandom < 90 )
{
SendClientMessage( playerid, -1, ""COL_RED"[EMP]{FFFFFF} An Electromagnetic Pulse attempt has been repelled by an aluminum foil!" );
SendClientMessage( pID, -1, ""COL_GREEN"[EMP]{FFFFFF} Electromagnetic Pulse had been repelled by aluminum foil set on vehicle." );
p_QuitToAvoidTimestamp[ pID ] = g_iTime + 15;
return 1;
}
}
SendClientMessageFormatted( pID, -1, ""COL_RED"[EMP]{FFFFFF} %s(%d) has sent an electromagnetic pulse on your vehicle causing it to crash for 30 seconds.", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[EMP]{FFFFFF} You have activated a electromagnetic pulse on %s(%d)'s vehicle!", ReturnPlayerName( pID ), pID );
p_QuitToAvoidTimestamp[ pID ] = g_iTime + 15;
SetTimerEx( "emp_deactivate", 30000, false, "d", GetPlayerVehicleID( pID ) );
GetVehicleParamsEx( iVehicle, engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( iVehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective );
}
else SendError( playerid, "This player is not nearby." );
return 1;
}
public OnPlayerLoadTextdraws( playerid ) public OnPlayerLoadTextdraws( playerid )
{ {
PlayerTextDrawShow( playerid, p_LocationTD[ playerid ] ); PlayerTextDrawShow( playerid, p_LocationTD[ playerid ] );
@ -5226,6 +5169,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/dss{FFFFFF} - Destroys a specified spike set id.\n"\ ""COL_GREY"/dss{FFFFFF} - Destroys a specified spike set id.\n"\
""COL_GREY"/dssall{FFFFFF} - Removes all spike sets.\n"\ ""COL_GREY"/dssall{FFFFFF} - Removes all spike sets.\n"\
""COL_GREY"/emp{FFFFFF} - Shuts down the engine of a driver's vehicle.\n"\ ""COL_GREY"/emp{FFFFFF} - Shuts down the engine of a driver's vehicle.\n"\
""COL_GREY"/disableemp - /demp -{FFFFFF} - Reinitializes the engine of a driver's vehicle.\n"\
""COL_GREY"/bruteforce{FFFFFF} - Brute forces a houses' password." ); ""COL_GREY"/bruteforce{FFFFFF} - Brute forces a houses' password." );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Police Commands", szCMDS, "Okay", "Back" ); ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Police Commands", szCMDS, "Okay", "Back" );
} }
@ -5272,7 +5216,13 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
case 8: case 8:
{ {
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" ); 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" );
cmd_vipcmds( playerid, "" ); 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" );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, ""COL_GOLD"V.I.P. Commands", szCMDS, "Okay", "Back" );
} }
} }
return 1; return 1;
@ -5657,7 +5607,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
new bool: has = false; new bool: has = false;
// erase large string for ease // erase large string for ease
erase( szHugeString ); erase( szMassiveString );
erase( szLargeString ); erase( szLargeString );
// show items // show items
@ -5674,13 +5624,13 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
case 1: case 1:
{ {
foreach ( new i : houses ) if ( strmatch( g_houseData[ i ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) { foreach ( new i : houses ) if ( strmatch( g_houseData[ i ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) {
format( szHugeString, sizeof( szHugeString ), "%s%s\n", szHugeString, g_houseData[ i ] [ E_HOUSE_NAME ] ), has = true; format( szMassiveString, sizeof( szMassiveString ), "%s%s\n", szMassiveString, g_houseData[ i ] [ E_HOUSE_NAME ] ), has = true;
} }
if ( ! has ) if ( ! has )
return SendError( playerid, "You do not own any home." ), ShowPlayerSpawnMenu( playerid ); return SendError( playerid, "You do not own any home." ), ShowPlayerSpawnMenu( playerid );
return ShowPlayerDialog( playerid, DIALOG_HOUSES, DIALOG_STYLE_LIST, "{FFFFFF}Set Spawn Location", szHugeString, "Select", "Back" ); return ShowPlayerDialog( playerid, DIALOG_HOUSES, DIALOG_STYLE_LIST, "{FFFFFF}Set Spawn Location", szMassiveString, "Select", "Back" );
} }
// businesses // businesses
@ -7127,3 +7077,31 @@ stock IsPlayerDead( playerid )
return GetPlayerState( playerid ) == PLAYER_STATE_WASTED; return GetPlayerState( playerid ) == PLAYER_STATE_WASTED;
} }
stock IsPlayerInArmyVehicle( playerid )
{
new
vehicleid = GetPlayerVehicleID( playerid ),
vehiclemodelid = GetVehicleModel( vehicleid )
;
if ( vehiclemodelid == 425 || vehiclemodelid == 432 || vehiclemodelid == 520 ) //Rhino, Tank, Hydra
return true;
else
return false;
}
new playersPeakCount = 0;
stock UpdatePlayerCounters()
{
new total_online = Iter_Count( Player );
if ( total_online > playersPeakCount ) playersPeakCount = total_online;
}
CMD:peak( playerid, params[] )
{
if ( p_AdminLevel[ playerid ] != 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
return SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" The current peak player count since startup is: %i", playersPeakCount );
}

View File

@ -1,3 +1,7 @@
v11.55.168
v11.54.157
v11.53.154
v11.52.150 v11.52.150
v11.51.145
v11.50.142 v11.50.142
v11.50.140 v11.50.140

View File

@ -0,0 +1,4 @@
(+)
(/)
(*)
(-)

View File

@ -0,0 +1,5 @@
(+) Adds Battle Royale minigame to the SF Stadium.
(+) Random airdrops drop every minute for Battle Royale players.
(/) Replaces ordinary plane for an andromanda model.
(*) Battle Royale games cannot be started without the leader starting.
(*) Battle Royale players will be autokilled if they AFK out of the playable area.

View File

@ -0,0 +1,4 @@
(-) Passive mode has been removed from the game. (Spawn protection still exists.)
(*) LEO Commands now check to see if a player is dead or not prior to casting.
(*) Personal Vehicle commands, such as /v park, should now work while in the water.
(/) Stephanie now sends a random message every 60 seconds rather than 30.

View File

@ -0,0 +1,4 @@
(+) Adds /(demp)disableemp to reinitialize a recently EMP'd vehicle.
(+) Adds /(un)chatban to ban low quality members from chat instead of banning.
(+) Adds /chatbanlist to view all online chat banned members.
(*) Moved /smlog and /iclog for admins into their correct level section of /acmds.

View File

@ -0,0 +1,15 @@
(+) You can now disable global gambling messages in /cp.
(+) /discord now displays what the discord server URL is.
(+) /cmds -> V.I.P. Commands now displays a list of V.I.P. commands.
(+) Players below 50 score, playing as a LEO, will now have a help dialog on how to arrest.
(/) The old arrest system, which is command-based, has been added back. (MMB Disabled)
(/) Regular V.I.P. players are now allowed to send IC with /ic send.
(/) /admins only requires 50 score now.
(/) The MOTD will now be preset upon server startup.
(*) Removes the ability to farm points within the Casino on a $0 payout.
(*) Fixed issue with /spawn not allowing 100+ houses to appear.
(*) A typo in /acmds has been fixed.
(*) Fixed an issue with /chatban showing the wrong player name.
(-) You are no longer able to use /perks while in an army vehicle.
Note: All bans and CAC forces have been lifted. (Except for Chargeback-related bans)