replace a few criminal jobs with mugger

This commit is contained in:
Lorenc Pekaj 2018-11-24 02:41:15 +11:00
parent 5b3b3e4af3
commit 27cfffbd77
4 changed files with 113 additions and 133 deletions

View File

@ -286,16 +286,10 @@ public OnMethamphetamineCooking( playerid, vehicleid, last_chemical )
if ( IsValidVehicle( vehicleid ) && IsPlayerConnected( playerid ) && IsPlayerInMethlab( playerid ) ) if ( IsValidVehicle( vehicleid ) && IsPlayerConnected( playerid ) && IsPlayerInMethlab( playerid ) )
{ {
new
available_meth[ 3 ] = { -1, -1, -1 },
iMethIngredient = -1
;
DestroyDynamicObject( GetGVarInt( "meth_smoke", vehicleid ) ); DestroyDynamicObject( GetGVarInt( "meth_smoke", vehicleid ) );
DeleteGVar( "meth_smoke", vehicleid ); DeleteGVar( "meth_smoke", vehicleid );
if ( GetGVarInt( "meth_acid", vehicleid ) != 1 && GetGVarInt( "meth_soda", vehicleid ) != 1 && GetGVarInt( "meth_chloride", vehicleid ) != 1 ) if ( ! GetGVarInt( "meth_acid", vehicleid ) && ! GetGVarInt( "meth_soda", vehicleid ) && ! GetGVarInt( "meth_chloride", vehicleid ) )
{ {
ShowPlayerHelpDialog( playerid, 5000, "The process is done. Bag it up and do another round if you wish." ); ShowPlayerHelpDialog( playerid, 5000, "The process is done. Bag it up and do another round if you wish." );
SendServerMessage( playerid, "Process is done. Bag it up, and do another round if you wish. Export it for money." ); SendServerMessage( playerid, "Process is done. Bag it up, and do another round if you wish. Export it for money." );
@ -308,11 +302,15 @@ public OnMethamphetamineCooking( playerid, vehicleid, last_chemical )
} }
else else
{ {
if ( GetGVarInt( "meth_soda", vehicleid ) == 1 ) available_meth[ 0 ] = CHEMICAL_CS; new
if ( GetGVarInt( "meth_acid", vehicleid ) == 1 ) available_meth[ 1 ] = CHEMICAL_MU; available_meth[ 3 ] = { -1, ... };
if ( GetGVarInt( "meth_chloride", vehicleid ) == 1 ) available_meth[ 2 ] = CHEMICAL_HLC;
iMethIngredient = randomArrayItem( available_meth, -1 ); if ( ! GetGVarInt( "meth_soda", vehicleid ) ) available_meth[ CHEMICAL_CS ] = CHEMICAL_CS;
if ( ! GetGVarInt( "meth_acid", vehicleid ) ) available_meth[ CHEMICAL_MU ] = CHEMICAL_MU;
if ( ! GetGVarInt( "meth_chloride", vehicleid ) ) available_meth[ CHEMICAL_HLC ] = CHEMICAL_HLC;
new
iMethIngredient = randomExcept( available_meth, sizeof( available_meth ) );
switch( iMethIngredient ) switch( iMethIngredient )
{ {

View File

@ -11,59 +11,89 @@
/* ** Definitions ** */ /* ** Definitions ** */
#define MAX_JOB_NAME ( 16 ) #define MAX_JOB_NAME ( 16 )
#define JOB_RAPIST ( 0 )
#define JOB_KIDNAPPER ( 1 )
#define JOB_TERRORIST ( 2 )
#define JOB_HITMAN ( 3 )
#define JOB_PROSTITUTE ( 4 )
#define JOB_WEAPON_DEALER ( 5 )
#define JOB_DRUG_DEALER ( 6 )
#define JOB_DIRTY_MECHANIC ( 7 )
#define JOB_BURGLAR ( 8 )
/* ** Variables ** */ /* ** Variables ** */
enum
{
JOB_MUGGER,
JOB_KIDNAPPER,
JOB_TERRORIST,
JOB_HITMAN,
JOB_WEAPON_DEALER,
JOB_DRUG_DEALER,
JOB_DIRTY_MECHANIC,
JOB_BURGLAR
};
static const
g_jobsData[ ] [ MAX_JOB_NAME ] =
{
{ "Mugger" }, { "Kidnapper" }, { "Terrorist" }, { "Hitman" },
{ "Weapon Dealer" }, { "Drug Dealer" }, { "Dirty Mechanic" }, { "Burglar" }
}
;
static stock
g_jobList[ 100 ];
/* ** Hooks ** */ /* ** Hooks ** */
hook OnScriptInit( )
{
for ( new i = 0; i < sizeof( g_jobsData ); i ++ ) {
format( g_jobList, sizeof( g_jobList ), "%s%s\n", g_jobList, g_jobsData[ i ] );
}
return 1;
}
hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
if ( dialogid == DIALOG_ONLINE_JOB && response )
{
szLargeString[ 0 ] = '\0';
foreach ( new pID : Player ) if ( IsPlayerJob( pID, listitem ) && p_Class[ pID ] == CLASS_CIVILIAN ) {
format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\n", szLargeString, ReturnPlayerName( pID ), pID );
}
// found no users
if ( szLargeString[ 0 ] == '\0' ) {
szLargeString = ""COL_RED"N/A";
}
ShowPlayerDialog( playerid, DIALOG_ONLINE_JOB_R, DIALOG_STYLE_LIST, sprintf( "{FFFFFF}Online %ss", GetJobName( listitem ) ), szLargeString, "Okay", "Back" );
}
else if ( dialogid == DIALOG_ONLINE_JOB_R && ! response ) {
ShowPlayerDialog( playerid, DIALOG_ONLINE_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Player Jobs", g_jobList, "Select", "Cancel" );
}
return 1;
}
/* ** Commands ** */
CMD:playerjobs( playerid, params[ ] )
{
ShowPlayerDialog( playerid, DIALOG_ONLINE_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Player Jobs", g_jobList, "Select", "Cancel" );
return 1;
}
/* ** Functions ** */ /* ** Functions ** */
stock IsPlayerJob( playerid, jobid ) { stock IsPlayerJob( playerid, jobid ) {
return ( p_Job{ playerid } == jobid ) || ( p_VIPLevel[ playerid ] >= VIP_DIAMOND && p_VIPJob{ playerid } == jobid ); return ( p_Job{ playerid } == jobid ) || ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPJob{ playerid } == jobid );
} }
stock GetJobIDFromName( szJob[ ] ) stock GetJobIDFromName( const job_name[ ] )
{ {
static const for ( new iJob = 0; iJob < sizeof( g_jobsData ); iJob ++ ) {
g_jobsData[ ] [ MAX_JOB_NAME char ] = if ( strfind( g_jobsData[ iJob ], job_name, true ) != -1 ) {
{ return iJob;
{ !"Rapist" }, { !"Kidnapper" }, { !"Terrorist" }, { !"Hitman" }, { !"Prostitute" },
{ !"Weapon Dealer" }, { !"Drug Dealer" }, { !"Dirty Mechanic" }, { !"Burglar" }
} }
;
for( new iJob = 0; iJob < sizeof( g_jobsData ); iJob++ )
if ( strunpack( szNormalString, g_jobsData[ iJob ], MAX_JOB_NAME ) )
if ( strfind( szNormalString, szJob, true ) != -1 )
return iJob;
return 0xFE;
}
stock GetJobName( iJob )
{
new
szJob[ MAX_JOB_NAME ] = "unknown";
switch( iJob )
{
case JOB_RAPIST: szJob = "Rapist";
case JOB_KIDNAPPER: szJob = "Kidnapper";
case JOB_TERRORIST: szJob = "Terrorist";
case JOB_HITMAN: szJob = "Hitman";
case JOB_PROSTITUTE: szJob = "Prostitute";
case JOB_WEAPON_DEALER: szJob = "Weapon Dealer";
case JOB_DRUG_DEALER: szJob = "Drug Dealer";
case JOB_DIRTY_MECHANIC: szJob = "Dirty Mechanic";
case JOB_BURGLAR: szJob = "Burglar";
} }
return szJob; return -1;
}
stock GetJobName( iJob ) {
return 0 <= iJob < sizeof( g_jobsData ) ? g_jobsData[ iJob ] : ( "Unknown" );
}
stock ShowPlayerJobList( playerid )
{
return ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", g_jobList, "Select", "" );
} }

View File

@ -335,7 +335,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
strcat( vip_description, "Coin generation increase\t10%\t25%\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 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 sell coins on the coin market (/ic sell)\tY\tY\n" );
strcat( vip_description, "Ability to use two jobs (/vipjob)\tN\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, "Premium home listing fees waived\tY\tY\n" );
strcat( vip_description, "Tax reduction\t0%\t50%\n" ); strcat( vip_description, "Tax reduction\t0%\t50%\n" );
strcat( vip_description, "Inactive asset protection\t14 days\t31 days\n" ); strcat( vip_description, "Inactive asset protection\t14 days\t31 days\n" );

View File

@ -1625,7 +1625,7 @@ public OnPlayerSpawn( playerid )
if ( !p_JobSet{ playerid } ) if ( !p_JobSet{ playerid } )
{ {
TogglePlayerControllable( playerid, 0 ); TogglePlayerControllable( playerid, 0 );
ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "" ); ShowPlayerJobList( playerid );
} }
else else
{ {
@ -1633,10 +1633,11 @@ public OnPlayerSpawn( playerid )
{ {
switch( p_Job{ playerid } ) switch( p_Job{ playerid } )
{ {
case JOB_RAPIST: case JOB_MUGGER:
{ {
GivePlayerWeapon( playerid, 10, 1 );
GivePlayerWeapon( playerid, 22, 150 ); GivePlayerWeapon( playerid, 22, 150 );
GivePlayerWeapon( playerid, 30, 400 ); GivePlayerWeapon( playerid, 25, 30 );
} }
case JOB_KIDNAPPER: case JOB_KIDNAPPER:
{ {
@ -1654,12 +1655,6 @@ public OnPlayerSpawn( playerid )
GivePlayerWeapon( playerid, 23, 130 ); GivePlayerWeapon( playerid, 23, 130 );
GivePlayerWeapon( playerid, 34, 30 ); GivePlayerWeapon( playerid, 34, 30 );
} }
case JOB_PROSTITUTE:
{
GivePlayerWeapon( playerid, 10, 1 );
GivePlayerWeapon( playerid, 25, 50 );
GivePlayerWeapon( playerid, 30, 300 );
}
case JOB_WEAPON_DEALER: case JOB_WEAPON_DEALER:
{ {
GivePlayerWeapon( playerid, 5 , 1 ); GivePlayerWeapon( playerid, 5 , 1 );
@ -2889,20 +2884,6 @@ public OnProgressCompleted( playerid, progressid, params )
return 1; return 1;
} }
stock randomArrayItem( const array[ ], exclude = 0xFFFF, arraysize = sizeof( array ) )
{
new
iRandom;
random_restart:
iRandom = array[ random( arraysize ) ];
if ( iRandom == exclude ) {
goto random_restart;
}
return iRandom;
}
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success ) public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{ {
if ( !success ) { if ( !success ) {
@ -3103,7 +3084,7 @@ CMD:request( playerid, params[ ] )
if ( ( iJob = GetJobIDFromName( params ) ) == 0xFE ) if ( ( iJob = GetJobIDFromName( params ) ) == 0xFE )
return SendError( playerid, "You have entered an invalid job." ); return SendError( playerid, "You have entered an invalid job." );
if ( iJob == JOB_RAPIST || iJob == JOB_KIDNAPPER || iJob == JOB_BURGLAR ) if ( iJob == JOB_MUGGER || iJob == JOB_KIDNAPPER || iJob == JOB_BURGLAR )
return SendServerMessage( playerid, "%s's do not do any services in exchange for money.", GetJobName( iJob ) ); return SendServerMessage( playerid, "%s's do not do any services in exchange for money.", GetJobName( iJob ) );
if ( IsPlayerJob( playerid, iJob ) ) if ( IsPlayerJob( playerid, iJob ) )
@ -3317,7 +3298,7 @@ CMD:robitems( playerid, params[ ] )
new victimid = GetClosestPlayer( playerid ); new victimid = GetClosestPlayer( playerid );
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." ); if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." );
else if ( !IsPlayerJob( playerid, JOB_PROSTITUTE ) ) return SendError( playerid, "You must be a prostitute to use this command." ); else if ( !IsPlayerJob( playerid, JOB_MUGGER ) ) return SendError( playerid, "You must be a mugger to use this command." );
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." ); else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
else if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "It's impossible to rob someone inside a car." ); else if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "It's impossible to rob someone inside a car." );
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) ) else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
@ -3342,21 +3323,20 @@ CMD:robitems( playerid, params[ ] )
GivePlayerExperience( playerid, E_ROBBERY ); GivePlayerExperience( playerid, E_ROBBERY );
new new
available_items[ 3 ] = { -1, -1, -1 }, available_items[ 3 ] = { -1, ... };
iRandomItem = -1
;
if ( p_BobbyPins[ victimid ] > 0 && p_BobbyPins[ playerid ] < GetShopItemLimit( SHOP_ITEM_BOBBY_PIN ) ) available_items[ 0 ] = 0; if ( ! p_BobbyPins[ victimid ] || p_BobbyPins[ playerid ] >= GetShopItemLimit( SHOP_ITEM_BOBBY_PIN ) ) available_items[ 0 ] = 0;
if ( p_Scissors[ victimid ] > 0 && p_Scissors[ playerid ] < GetShopItemLimit( SHOP_ITEM_SCISSOR ) ) available_items[ 1 ] = 1; if ( ! p_Scissors[ victimid ] || p_Scissors[ playerid ] >= GetShopItemLimit( SHOP_ITEM_SCISSOR ) ) available_items[ 1 ] = 1;
if ( p_Ropes[ victimid ] > 0 && p_Ropes[ playerid ] < GetShopItemLimit( SHOP_ITEM_ROPES ) ) available_items[ 2 ] = 2; if ( ! p_Ropes[ victimid ] || p_Ropes[ playerid ] >= GetShopItemLimit( SHOP_ITEM_ROPES ) ) available_items[ 2 ] = 2;
if ( available_items[ 0 ] == -1 || available_items[ 1 ] == -1 || available_items[ 2 ] == -1 ) { if ( available_items[ 0 ] != -1 && available_items[ 1 ] != -1 && available_items[ 2 ] != -1 ) {
SendClientMessageFormatted( victimid, -1, ""COL_GREEN"[ROB FAIL]{FFFFFF} %s(%d) has failed to rob items off you.", ReturnPlayerName( playerid ), playerid ); SendClientMessageFormatted( victimid, -1, ""COL_GREEN"[ROB FAIL]{FFFFFF} %s(%d) has failed to rob items off you.", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_RED"[ROB FAIL]{FFFFFF} You find nothing in %s(%d)'s pocket and he noticed you after thoroughly checking.", ReturnPlayerName( victimid ), victimid ); SendClientMessageFormatted( playerid, -1, ""COL_RED"[ROB FAIL]{FFFFFF} You find nothing in %s(%d)'s pocket and he noticed you after thoroughly checking.", ReturnPlayerName( victimid ), victimid );
return 1; return 1;
} }
iRandomItem = randomArrayItem( available_items, -1 ); new
iRandomItem = randomExcept( available_items, sizeof( available_items ) );
switch( iRandomItem ) switch( iRandomItem )
{ {
@ -3565,11 +3545,6 @@ CMD:burglar( playerid, params[ ] )
return 1; return 1;
} }
CMD:playerjobs( playerid, params[ ] )
{
ShowPlayerDialog( playerid, DIALOG_ONLINE_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Player Jobs", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "Cancel" );
return 1;
}
CMD:gettaxrate( playerid, params[ ] ) return cmd_tax( playerid, params ); CMD:gettaxrate( playerid, params[ ] ) return cmd_tax( playerid, params );
CMD:getmytax( playerid, params[ ] ) return cmd_tax( playerid, params ); CMD:getmytax( playerid, params[ ] ) return cmd_tax( playerid, params );
@ -4910,7 +4885,7 @@ CMD:acceptbj( playerid, params[ ] )
{ {
if ( !IsPlayerConnected( p_BlowjobOfferer[ playerid ] ) ) return p_BlowjobOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your blowjob offerer isn't available." ); if ( !IsPlayerConnected( p_BlowjobOfferer[ playerid ] ) ) return p_BlowjobOfferer[ playerid ] = INVALID_PLAYER_ID, SendError( playerid, "Your blowjob offerer isn't available." );
else if ( g_iTime > p_BlowjobDealTick[ playerid ] ) return SendError( playerid, "Your blowjob offer has expired." ); else if ( g_iTime > p_BlowjobDealTick[ playerid ] ) return SendError( playerid, "Your blowjob offer has expired." );
else if ( !IsPlayerJob( p_BlowjobOfferer[ playerid ], JOB_PROSTITUTE ) ) return SendError( playerid, "Your blowjob offerer no longer offers blowjobs." ); else if ( !IsPlayerJob( p_BlowjobOfferer[ playerid ], JOB_MUGGER ) ) return SendError( playerid, "Your blowjob offerer no longer offers blowjobs." );
else if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot get a blowjob inside a car." ); else if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot get a blowjob inside a car." );
else if ( IsPlayerInAnyVehicle( p_BlowjobOfferer[ playerid ] ) ) return SendError( playerid, "This player is inside a car." ); else if ( IsPlayerInAnyVehicle( p_BlowjobOfferer[ playerid ] ) ) return SendError( playerid, "This player is inside a car." );
else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot accept blowjobs in jail." ); else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot accept blowjobs in jail." );
@ -4947,7 +4922,10 @@ CMD:acceptbj( playerid, params[ ] )
GivePlayerCash( p_BlowjobOfferer[ playerid ], iEarned ); GivePlayerCash( p_BlowjobOfferer[ playerid ], iEarned );
p_BlowjobOfferer[ playerid ] = INVALID_PLAYER_ID; p_BlowjobOfferer[ playerid ] = INVALID_PLAYER_ID;
} }
else SendError( playerid, "This prostitute is not nearby." ); else
{
SendError( playerid, "This person is not nearby." );
}
return 1; return 1;
} }
@ -4959,7 +4937,7 @@ CMD:bj( playerid, params[ ] )
; ;
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." ); if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." );
else if ( !IsPlayerJob( playerid, JOB_PROSTITUTE ) ) return SendError( playerid, "You must be a prostitute to use this command." ); else if ( !IsPlayerJob( playerid, JOB_MUGGER ) ) return SendError( playerid, "You must be a mugger to use this command." );
else if ( ( GetTickCount( ) - p_AntiBlowJobSpam[ playerid ] ) < 30000 ) return SendError( playerid, "You must wait 30 seconds before using this command again." ); else if ( ( GetTickCount( ) - p_AntiBlowJobSpam[ playerid ] ) < 30000 ) return SendError( playerid, "You must wait 30 seconds before using this command again." );
else if ( sscanf( params, "ud", pID, price ) ) return SendUsage( playerid, "/(bj)blowjob [PLAYER_ID] [PRICE]" ); else if ( sscanf( params, "ud", pID, price ) ) return SendUsage( playerid, "/(bj)blowjob [PLAYER_ID] [PRICE]" );
else if ( !IsPlayerConnected( pID ) ) return SendError( playerid, "This player isn't connected." ); else if ( !IsPlayerConnected( pID ) ) return SendError( playerid, "This player isn't connected." );
@ -6017,10 +5995,10 @@ CMD:rape( playerid, params[ ] )
if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" ); if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" );
new iRandom = random( 101 ); new iRandom = random( 101 );
if ( IsPlayerJob( playerid, JOB_RAPIST ) ) { iRandom += 10; } // Adds more success to rapists. if ( IsPlayerJob( playerid, JOB_MUGGER ) ) { iRandom += 10; } // Adds more success to muggers
if ( iRandom < 75 || IsPlayerTied( victimid ) ) if ( iRandom < 75 || IsPlayerTied( victimid ) )
{ {
if ( p_InfectedHIV{ playerid } || ( IsPlayerJob( playerid, JOB_RAPIST ) && p_AidsVaccine{ victimid } == false && !IsPlayerJob( victimid, JOB_PROSTITUTE ) ) ) if ( p_InfectedHIV{ playerid } || ( IsPlayerJob( playerid, JOB_MUGGER ) && p_AidsVaccine{ victimid } == false && !IsPlayerJob( victimid, JOB_MUGGER ) ) )
{ {
SendClientMessageFormatted( victimid, -1, ""COL_RED"[RAPED]{FFFFFF} You have been raped and infected with "COL_RED"HIV{FFFFFF} by %s(%d)!", ReturnPlayerName( playerid ), playerid ); SendClientMessageFormatted( victimid, -1, ""COL_RED"[RAPED]{FFFFFF} You have been raped and infected with "COL_RED"HIV{FFFFFF} by %s(%d)!", ReturnPlayerName( playerid ), playerid );
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RAPED]{FFFFFF} You have raped %s(%d) and infected them with "COL_RED"HIV{FFFFFF}!", ReturnPlayerName( victimid ), victimid ); SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RAPED]{FFFFFF} You have raped %s(%d) and infected them with "COL_RED"HIV{FFFFFF}!", ReturnPlayerName( victimid ), victimid );
@ -8164,10 +8142,11 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
ResetPlayerWeapons( playerid ); ResetPlayerWeapons( playerid );
switch( listitem ) switch( listitem )
{ {
case JOB_RAPIST: case JOB_MUGGER:
{ {
GivePlayerWeapon( playerid, 10, 1 );
GivePlayerWeapon( playerid, 22, 150 ); GivePlayerWeapon( playerid, 22, 150 );
GivePlayerWeapon( playerid, 30, 400 ); GivePlayerWeapon( playerid, 25, 30 );
} }
case JOB_KIDNAPPER: case JOB_KIDNAPPER:
{ {
@ -8185,12 +8164,6 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
GivePlayerWeapon( playerid, 23, 130 ); GivePlayerWeapon( playerid, 23, 130 );
GivePlayerWeapon( playerid, 34, 30 ); GivePlayerWeapon( playerid, 34, 30 );
} }
case JOB_PROSTITUTE:
{
GivePlayerWeapon( playerid, 10, 1 );
GivePlayerWeapon( playerid, 25, 30 );
GivePlayerWeapon( playerid, 30, 300 );
}
case JOB_WEAPON_DEALER: case JOB_WEAPON_DEALER:
{ {
GivePlayerWeapon( playerid, 5 , 1 ); GivePlayerWeapon( playerid, 5 , 1 );
@ -8232,7 +8205,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
else else
{ {
TogglePlayerControllable( playerid, 0 ); TogglePlayerControllable( playerid, 0 );
ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "" ); ShowPlayerJobList( playerid );
} }
} }
@ -8594,8 +8567,8 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
if ( GetPlayerCash( playerid ) < 5000 ) if ( GetPlayerCash( playerid ) < 5000 )
return SendError( playerid, "You need "COL_GOLD"$5,000"COL_WHITE" to change your job." ); return SendError( playerid, "You need "COL_GOLD"$5,000"COL_WHITE" to change your job." );
ShowPlayerJobList( playerid );
TogglePlayerControllable( playerid, 0 ); TogglePlayerControllable( playerid, 0 );
ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "" );
GivePlayerCash( playerid, -( 5000 ) ); GivePlayerCash( playerid, -( 5000 ) );
SendServerMessage( playerid, "You have been directed to the job selection, refer to your new job." ); SendServerMessage( playerid, "You have been directed to the job selection, refer to your new job." );
} }
@ -8931,11 +8904,10 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/takeover{FFFFFF} - Take over a gangzone with your gang.\n" ); ""COL_GREY"/takeover{FFFFFF} - Take over a gangzone with your gang.\n" );
strcat( szCMDS, ""COL_GREY"/gang{FFFFFF} - Displays gang commands.\n\n"\ strcat( szCMDS, ""COL_GREY"/gang{FFFFFF} - Displays gang commands.\n\n"\
""COL_GOLD"Job Commands\n\n"\ ""COL_GOLD"Job Commands\n\n"\
""COL_ORANGE"Rapist{FFFFFF} - /rape\n"\ ""COL_ORANGE"Mugger{FFFFFF} - /rape, /blowjob, /robitems\n"\
""COL_ORANGE"Kidnapper{FFFFFF} - /(un)tie, /kidnap, /ransom(pay)\n"\ ""COL_ORANGE"Kidnapper{FFFFFF} - /(un)tie, /kidnap, /ransom(pay)\n"\
""COL_ORANGE"Terrorist{FFFFFF} - /c4\n" ); ""COL_ORANGE"Terrorist{FFFFFF} - /c4\n" );
strcat( szCMDS, ""COL_ORANGE"Hitman{FFFFFF} - /(hide)tracker, /hitlist\n"\ strcat( szCMDS, ""COL_ORANGE"Hitman{FFFFFF} - /(hide)tracker, /hitlist\n"\
""COL_ORANGE"Prostitute{FFFFFF} - /blowjob, /robitems\n"\
""COL_ORANGE"Weapon Dealer{FFFFFF} - /sellgun\n"\ ""COL_ORANGE"Weapon Dealer{FFFFFF} - /sellgun\n"\
""COL_ORANGE"Drug Dealer{FFFFFF} - /weed\n" ); ""COL_ORANGE"Drug Dealer{FFFFFF} - /weed\n" );
strcat( szCMDS, ""COL_ORANGE"Dirty Mechanic{FFFFFF} - /mech\n"\ strcat( szCMDS, ""COL_ORANGE"Dirty Mechanic{FFFFFF} - /mech\n"\
@ -9154,7 +9126,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
if ( dialogid == DIALOG_ACC_EMAIL ) { if ( dialogid == DIALOG_ACC_EMAIL ) {
if ( ! response ) { if ( ! response ) {
ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "" ); ShowPlayerJobList( playerid );
SendServerMessage( playerid, "If you ever wish to assign an email to your account in the future, use "COL_GREY"/email"COL_WHITE"." ); SendServerMessage( playerid, "If you ever wish to assign an email to your account in the future, use "COL_GREY"/email"COL_WHITE"." );
return 1; return 1;
} }
@ -9179,7 +9151,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
format( szBigString, sizeof( szBigString ), "INSERT INTO `EMAIL_VERIFY`(`USER_ID`, `EMAIL`) VALUES (%d, '%s') ON DUPLICATE KEY UPDATE `EMAIL`='%s',`DATE`=CURRENT_TIMESTAMP", p_AccountID[ playerid ], mysql_escape( email ), mysql_escape( email ) ); format( szBigString, sizeof( szBigString ), "INSERT INTO `EMAIL_VERIFY`(`USER_ID`, `EMAIL`) VALUES (%d, '%s') ON DUPLICATE KEY UPDATE `EMAIL`='%s',`DATE`=CURRENT_TIMESTAMP", p_AccountID[ playerid ], mysql_escape( email ), mysql_escape( email ) );
mysql_function_query( dbHandle, szBigString, true, "OnQueueEmailVerification", "ds", playerid, email ); mysql_function_query( dbHandle, szBigString, true, "OnQueueEmailVerification", "ds", playerid, email );
ShowPlayerDialog( playerid, DIALOG_JOB, DIALOG_STYLE_LIST, "{FFFFFF}Job Selection", "Rapist\nKidnapper\nTerrorist\nHitman\nProstitute\nWeapon Dealer\nDrug Dealer\nDirty Mechanic\nBurglar", "Select", "" ); ShowPlayerJobList( playerid );
return 1; return 1;
} }
if ( dialogid == DIALOG_WEAPON_DEAL ) if ( dialogid == DIALOG_WEAPON_DEAL )
@ -9321,26 +9293,6 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
} }
else ShowAmmunationMenu( playerid ); else ShowAmmunationMenu( playerid );
} }
if ( ( dialogid == DIALOG_ONLINE_JOB ) && response )
{
new
count = 0;
erase( szLargeString );
foreach(new pID : Player)
{
if ( IsPlayerJob( pID, listitem ) && p_Class[ pID ] == CLASS_CIVILIAN )
{
format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\n", szLargeString, ReturnPlayerName( pID ), pID );
count++;
}
}
if ( !count ) szLargeString = ""COL_RED"N/A";
format( szNormalString, 32, "{FFFFFF}Online %ss", GetJobName( listitem ) );
ShowPlayerDialog( playerid, DIALOG_ONLINE_JOB_R, DIALOG_STYLE_LIST, szNormalString, szLargeString, "Okay", "Back" );
}
if ( ( dialogid == DIALOG_ONLINE_JOB_R ) && !response ) { cmd_playerjobs( playerid, "" ); }
if ( ( dialogid == DIALOG_HELP ) && response ) if ( ( dialogid == DIALOG_HELP ) && response )
{ {
SetPVarInt( playerid, "help_category", listitem ); SetPVarInt( playerid, "help_category", listitem );