Код:
//========================================================//
//=[ Job System by [RDM]Ionutz Please do not edit credits]=//
//========================================================//
//Includes
#include <a_samp>
//Defines
//Colors
#define COLOR_JOIN 0xFFC0CBAA //Pink Roz:))
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ULTRARED 0xE60000FF
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define ADMIN_RED 0xFB0000FF
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define PLAYER_COLOR 0xFFFFFFFF
#define ANNOUNCEMENT 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define NICESKY 0x99FFFFAA
#define WHITE 0xFFFFFFFF
#define COLOR_PURPLE 0x9900FFAA
#define COLOR_ALIEN 0x90FF87FF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA
#define COLOR_MIDNIGHTBLUE 0x191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA
#define COLOR_YELLOWGREEN 0x9ACD32AA
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA
#define yellow 0xFFFF00AA
#define red 0xFF0000AA
#define green 0x33FF33AA
#define COLOR_CWHITE 0xE0FFFFAA
#define COLOR_TUT 0xF6C861AA
#define COLOR_ROYAL 0x00C1F6AA
#define COLOR_SEXY 0x562ECDFF
#define INACTIVE_PLAYER_ID 255
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define NICESKY 0x99FFFFAA
#define GRAY 0xCECECEFF
#define ThePink 0xffa0ffff //
#define TheYellow 0xffa000ff //aka green :))
#define TheBlue 0x2ba0ffff
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_DARKGOLD 0x808000AA
//New
new flyjobrunning = 0;
new truckjobrunning = 0;
new policejobrunning = 0;
AntiDeAMX()
{
new a[][] =
{
"Unarmed (Fist)",
"Brass K"
};
#pragma unused a
}
public OnFilterScriptInit()
{
AntiDeAMX();
//0.3c Objects
CreateObject(18750,-5355.25,9451.62,-4546.00,0.00,0.00,0.00);
CreateObject(18752,-10.70,1905.66,19.00,0.00,0.00,0.00);
CreateObject(18750,206.08,1930.14,55.00,91.00,-352.00,-11.00);
//Vinewood
CreateObject(18750, 1412.75, -810.56, 92.86, 90.00, 0.00, 0.00);
CreateObject(2887, 1428.32, -839.42, 51.77, 41.00, 0.00, 317.79);
CreateObject(18656, 1428.45, -839.24, 51.82, 47.00, 0.00, 317.44);
CreateObject(2888, 1428.25, -839.47, 51.72, 41.00, 0.00, 320.00);
CreateObject(18656, 1408.94, -841.75, 51.82, 47.00, 0.00, 47.00);
CreateObject(2887, 1408.99, -841.90, 52.07, 41.00, 0.00, 38.48);
CreateObject(2888, 1408.67, -841.64, 52.43, 41.00, 0.00, 41.69);
//Vehicles
AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //Shamal
AddStaticVehicle(411,2074.7217,-2121.5066,13.3707,270.4157,116,1); //
AddStaticVehicle(411,2065.8503,-2121.5710,13.3679,270.3890,116,1); //
AddStaticVehicle(411,2085.5073,-2121.6392,13.3711,267.6290,116,1); //
//
AddStaticVehicleEx(455,-43.9742,-1155.8762,1.4823,65.0184,-1,-1, 10);
AddStaticVehicleEx(455,-39.6336,-1148.4509,1.5148,62.2225,-1,-1, 10);
AddStaticVehicleEx(455,-37.7033,-1144.2280,1.5173,65.7564,-1,-1, 10);
AddStaticVehicleEx(455,-35.7032,-1140.0637,1.5149,66.4882,-1,-1, 10);
AddStaticVehicleEx(455,-41.9300,-1152.2032,1.5132,62.4657,-1,-1, 10);
AddStaticVehicleEx(420,2148.93212891,1408.98608398,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2145.65673828,1409.02917480,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2142.39770508,1409.00488281,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2139.11596680,1408.97863770,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2135.99462891,1409.09082031,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2123.23413086,1409.12023926,10.66251659,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2120.05761719,1408.85949707,10.66251659,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2117.08544922,1409.02502441,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2113.62695312,1409.09594727,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2110.39794922,1408.97180176,10.67031193,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(420,2129.49902344,1420.17590332,10.66251659,0.00000000,-1,-1,15); //Taxi
AddStaticVehicleEx(597,-1611.73681641,673.07519531,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1606.18786621,673.08081055,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1600.14184570,672.95513916,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1594.09460449,672.76324463,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1587.93945312,673.17572021,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1581.94079590,673.12640381,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(597,-1576.38769531,673.00866699,7.06012249,180.00000000,-1,-1,15); //Police Car (SFPD)
AddStaticVehicleEx(599,-1581.75122070,652.41302490,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1587.63500977,652.65301514,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1593.40234375,651.91796875,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1599.54626465,652.15393066,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1605.09851074,651.70568848,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1610.79370117,651.53314209,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(599,-1616.49377441,651.57092285,7.57262659,0.00000000,-1,-1,15); //Police Ranger
AddStaticVehicleEx(497,-1629.95520020,655.47644043,7.45250034,0.00000000,-1,-1,15); //Police Maverick
AddStaticVehicleEx(497,-1633.92419434,670.29919434,7.45250034,0.00000000,-1,-1,15); //Police Maverick
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/policem", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)
{
policejobrunning = 1;
SetPlayerCheckpoint(playerid, -1638.6205,1205.9679,8.1736, 10);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Job]:Someone stoled an Turismo go there to search for clues!");
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now a Police Men.[Job]:/jobs", name );
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a police car to start the job");
}
if (strcmp("/policem", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599)
{
policejobrunning = 1;
SetPlayerCheckpoint(playerid, -1638.6205,1205.9679,8.1736, 10);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Job]:Someone stoled an Turismo go there to search for clues!");
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now a Police Men.[Job]:/jobs", name );
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a police car to start the job");
}
if (strcmp("/policeinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to go with the police car to the destination.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /policejob and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the marker and you're done.");
return 1;
}
if (strcmp("/truckm", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
{
truckjobrunning = 1;
SetPlayerCheckpoint(playerid, 2058.3142,-2092.4023,9.9832, 10);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now a Truck Driver.[Job]:/jobs", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a truck to start the job");
}
if (strcmp("/truckinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the truckload to the airport.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /truckjob and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the marker and you're done.");
return 1;
}
if (strcmp("/flym", cmdtext, true, 10) == 0)
{
flyjobrunning = 1;
SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
GameTextForPlayer(playerid, "~g~You started the Fly Job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now delivering goods with a plane.[Job]:/jobs", name );
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the planeload to the airport in San Fierro.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /startflight and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just fly to the marker and you're done.");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
GivePlayerMoney(playerid, 15000);
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
SetVehicleToRespawn(1);
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
{
GivePlayerMoney(playerid, 10000);
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
SetVehicleToRespawn(513);
DisablePlayerCheckpoint(playerid);
truckjobrunning = 0;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)//police
{
GivePlayerMoney(playerid, 20000);
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
GameTextForPlayer(playerid, "~r~Well you catch the ~b~thief ~r~in action!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
SetVehicleToRespawn(513);
DisablePlayerCheckpoint(playerid);
policejobrunning = 0;
SetPlayerPos(playerid,-1598.8545,666.7024,7.1875);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599)//police
{
GivePlayerMoney(playerid, 20000);
SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
GameTextForPlayer(playerid, "~r~Well Done you catch the ~b~thief ~r~in action!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
SetVehicleToRespawn(513);
DisablePlayerCheckpoint(playerid);
policejobrunning = 0;
SetPlayerPos(playerid,-1598.8545,666.7024,7.1875);
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid)== 597)
{
GameTextForPlayer(playerid, "Start: ~l~/~b~policem", 3800, 6);
}
if(GetVehicleModel(vehicleid)== 599)
{
GameTextForPlayer(playerid, "Start: ~l~/~b~policem", 3800, 6);
}
if(GetVehicleModel(vehicleid)== 519)
{
GameTextForPlayer(playerid, "Start: ~l~/~p~flym", 3800, 6);
}
if(GetVehicleModel(vehicleid)== 455)
{
GameTextForPlayer(playerid, "Start: ~l~/~r~truckm", 3800, 6);
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((policejobrunning) == 1)
{
policejobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left the Police Car, you failed the job.");
}else if((flyjobrunning) == 0){
//Nothing
}
if((flyjobrunning) == 1)
{
flyjobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
}else if((flyjobrunning) == 0){
//Nothing
}
if((truckjobrunning) == 1)
{
truckjobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left your truck behind, get in again if you want to continue your job.");
}else if((truckjobrunning) == 0){
//Nothing
}
}
/////===============================================[Ionutz]==========================================================================================/////
/////=============================================[The End!?]========================================================================================/////
/////===============================================[Ionutz]==========================================================================================/////
/////======================================[Site:www.darkstrike.info]================================================================================/////