// Stops the current job
COMMAND:stopwork(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/stopwork\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player has a job started
if (APlayerData[playerid][JobStarted] == true)
{
// Check the class of the player
switch (APlayerData[playerid][PlayerClass])
{
case ClassTruckDriver: Trucker_EndJob(playerid); // Stop any trucker job
case ClassBusDriver: BusDriver_EndJob(playerid); // Stop any busdriver job
case ClassKukasDriver: KukasDriver_EndJob(playerid); // Stop any busdriver job
case ClassVonatDriver: VonatDriver_EndJob(playerid); // Stop any busdriver job
case ClassPilot: Pilot_EndJob(playerid); // Stop any pilot job
case ClassMafia: Mafia_EndJob(playerid); // Stop any mafia job
case ClassDumper: Dumper_EndJob(playerid); // Stop any mafia job
case ClassCourier: Courier_EndJob(playerid);
case ClassRoadWorker: Roadworker_EndJob(playerid);
default: SendClientMessage(playerid, 0xFF0000FF, \"Your class has no job to end\");
}
// Inform the player that he failed the mission
GameTextForPlayer(playerid, \"~b~~h~Elrontottad ~r~a~b~~h~ fuvart. Ezért levontunk töled ~y~$1000~w~.\", 5000, 4);
// Reduce the player\'s cash by 1000
RewardPlayer(playerid, -1000, 0);
}
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}