Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Izraboteno od: Tino Skripter
- Dostavuvac na Avto Delovi
- Ako najdete nekoj bug prijavete go ! :)
- */
- //========================[INLUCE]==============================================
- #include <a_samp>
- #include <streamer>
- #pragma tabsize 0
- //------------------------------------------------------------------------------
- stock CreateHigherObject(modelid, Float:x3, Float:y3, Float:z3, Float:rx3, Float:ry3, Float:rz3)
- {
- CreateDynamicObjectEx(modelid, x3, y3, z3+500.0000, rx3, ry3, rz3, 300.00, 300.00);
- }
- stock CreateObjectE1000(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ)
- {
- CreateDynamicObjectEx(modelid, Float:X, Float:Y, Float:Z+1000, Float:rX, Float:rY, Float:rZ, 300.00, 300.00);
- }
- //------------------------[BOI]-------------------------------------------------
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_LIGHTGREEN 0xAFFFA1FF
- //---------------------[DIALOZI]------------------------------------------------
- #define DIALOG_STATUS1 (1)
- #define DIALOG_EVEME1 (2)
- //------------------------------------------------------------------------------
- //STAVENA E EDNA POZICIJA ZA TEST VIE STAVETE KOLKU SAKATE :)
- new Float:Nosenje[][] = {
- {1381.9080,-1864.0359,13.5469},
- {1381.9080,-1864.0359,13.5469},
- {1381.9080,-1864.0359,13.5469},
- {1381.9080,-1864.0359,13.5469},
- {1381.9080,-1864.0359,13.5469}
- };
- //------------------------------------------------------------------------------
- //----------------------[NEWOV]-------------------------------------------------
- new
- Vremeto[MAX_PLAYERS],
- Sirabotam[MAX_PLAYERS],
- Davamdel[MAX_PLAYERS],
- Imamdelovi[MAX_PLAYERS],
- ImaDel[MAX_PLAYERS],
- Vehicle[MAX_PLAYERS],
- Checkpoint[MAX_PLAYERS],
- PlayerText: InfoTD,
- Vozilata[6],
- Covekot,
- Pickupot;
- //MAPATA
- new tmpobjid;
- //============================================================================//
- public OnGameModeInit() {
- Covekot = CreateActor(60, 1371.9376,-1891.6653,13.5005,276.5909);
- SetActorInvulnerable(Covekot, true);
- ApplyActorAnimation(Covekot, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
- Pickupot = CreatePickup(1210, 23, 1371.5491,-1889.9888,13.5045);
- //------------------------------------------------------------------------------
- Vozilata[0] = CreateVehicle(482, 1367.3038,-1884.2075,13.2376,359.1702, 0, 0, -1);
- Vozilata[1] = CreateVehicle(482, 1370.1227,-1884.0364,13.2282,359.6671, 0, 0, -1);
- Vozilata[2] = CreateVehicle(482, 1383.6407,-1878.9045,13.2522,272.3901, 0, 0, -1);
- Vozilata[3] = CreateVehicle(482, 1361.6426,-1875.7676,13.2477,254.0692, 0, 0, -1);
- // Vozilata[4] = CreateVehicle(482, 2240.5559, -2175.1892, 13.6538, 135.0000, 3, 1, -1);
- // Vozilata[5] = CreateVehicle(482, 2245.7339, -2180.4153, 13.6538, 135.0000, 3, 1, -1);
- //------------------------------------------------------------------------------
- //avtodelovimapa
- tmpobjid = CreateDynamicObjectEx(19454, 1384.633422, -1892.204711, 12.491830, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.633422, -1892.214721, 14.741823, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.233886, -1892.204711, 12.491830, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.256103, -1892.214721, 14.741823, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.643432, -1893.895507, 16.411821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.233642, -1893.895507, 16.411821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.233642, -1897.335571, 16.411821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.233642, -1900.777099, 16.411821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.623413, -1900.777099, 16.411821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.623413, -1897.355834, 16.401821, 0.000000, 90.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3820, "boxhses_sfsx", "stonewall_la", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.633422, -1902.555908, 14.741823, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.273681, -1902.555908, 14.741823, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1394.273681, -1902.555908, 11.271829, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1384.643676, -1902.555908, 11.271829, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1397.965209, -1897.705444, 14.741823, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1397.965209, -1897.705444, 11.261828, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1397.965209, -1888.095825, 11.261828, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(19454, 1397.965209, -1888.095825, 14.691824, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3314, "ce_burbhouse", "sw_wallbrick_06", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(18765, 1392.901367, -1898.436523, 10.013033, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3980, "cityhall_lan", "man_cellarfloor128", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(18765, 1392.901367, -1893.975585, 10.033034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3980, "cityhall_lan", "man_cellarfloor128", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(18765, 1384.813476, -1893.975585, 10.043034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3980, "cityhall_lan", "man_cellarfloor128", 0x00000000);
- tmpobjid = CreateDynamicObjectEx(18765, 1384.819824, -1898.436523, 10.023034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- SetDynamicObjectMaterial(tmpobjid, 0, 3980, "cityhall_lan", "man_cellarfloor128", 0x00000000);
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- tmpobjid = CreateDynamicObjectEx(19817, 1390.739624, -1897.406372, 11.723031, 0.000000, 0.000000, 270.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19922, 1395.502807, -1893.162719, 12.543034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19922, 1390.382812, -1893.162719, 12.543034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19922, 1385.313110, -1893.162719, 12.543034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1558, 1388.249755, -1893.294067, 13.103035, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1002, 1382.219970, -1892.332519, 14.753036, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1002, 1382.219970, -1892.332519, 13.643034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1002, 1382.219970, -1892.332519, 15.643037, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1025, 1386.739868, -1892.283935, 15.213042, 0.000000, 0.000000, 630.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1074, 1390.448120, -1902.329345, 12.983040, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1081, 1389.068481, -1902.329956, 12.993043, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1085, 1388.067993, -1902.299682, 12.963041, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1081, 1392.288452, -1902.329956, 12.993043, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1050, 1383.188964, -1902.334350, 13.573834, -21.100002, 0.000000, 178.299987, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1050, 1383.124389, -1902.482421, 14.266504, -21.100002, 0.000000, 178.299987, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1131, 1396.234985, -1901.480102, 11.807559, -9.799998, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1131, 1396.234985, -1899.169799, 11.807559, -9.799998, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1154, 1396.664672, -1892.615234, 13.793032, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1159, 1391.393066, -1892.924438, 13.793039, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1193, 1386.333496, -1902.320434, 14.333034, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1193, 1390.173583, -1902.320434, 14.853034, 0.000000, 0.000000, 180.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19917, 1383.312377, -1892.872070, 12.563035, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19917, 1382.242675, -1892.872070, 12.563035, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19900, 1397.539794, -1894.705200, 12.543034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19900, 1397.539794, -1895.335327, 12.543034, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19815, 1397.855346, -1897.501342, 14.603039, 0.000000, 0.000000, 270.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19425, 1379.713500, -1893.933959, 12.495662, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19425, 1379.713500, -1897.234252, 12.495662, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19425, 1379.713500, -1897.234252, 12.495662, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19425, 1379.713500, -1900.514770, 12.495662, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(19425, 1379.713500, -1903.765136, 12.495662, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- tmpobjid = CreateDynamicObjectEx(1684, 1369.098388, -1893.330932, 14.005489, 0.000000, 0.000000, 90.000000, 300.00, 300.00);
- SetTimer("proveriGo", 1000, true);
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerConnect(playerid) {
- Sirabotam[playerid] = -1;
- Davamdel[playerid] = 0;
- Checkpoint[playerid] = -1;
- Imamdelovi[playerid] = 0;
- InfoTD = CreatePlayerTextDraw(playerid, 173.821395, 374.500091, "");
- PlayerTextDrawLetterSize(playerid, InfoTD, 0.256500, 1.279167);
- PlayerTextDrawAlignment(playerid, InfoTD, 1);
- PlayerTextDrawColor(playerid, InfoTD, -1);
- PlayerTextDrawSetShadow(playerid, InfoTD, 0);
- PlayerTextDrawSetOutline(playerid, InfoTD, 1);
- PlayerTextDrawBackgroundColor(playerid, InfoTD, 51);
- PlayerTextDrawFont(playerid, InfoTD, 1);
- PlayerTextDrawSetProportional(playerid, InfoTD, 1);
- RemoveBuildingForPlayer(playerid, 3744, 2241.2969, -2183.9766, 15.1016, 0.25);
- RemoveBuildingForPlayer(playerid, 3744, 2226.3203, -2168.9922, 15.1016, 0.25);
- RemoveBuildingForPlayer(playerid, 1226, 2224.7813, -2185.7422, 16.3516, 0.25);
- RemoveBuildingForPlayer(playerid, 3574, 2226.3203, -2168.9922, 15.1016, 0.25);
- RemoveBuildingForPlayer(playerid, 3574, 2241.2969, -2183.9766, 15.1016, 0.25);
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerDeath(playerid, killerid, reason) {
- Stopiramrabota(playerid);
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[]) {
- if(strcmp("/zavrsisorabota", cmdtext, true, 10) == 0)
- {
- if(Sirabotam[playerid] == -1) return 1;
- DisablePlayerCheckpoint(playerid);
- Sirabotam[playerid] = -1;
- Davamdel[playerid] = 0;
- Checkpoint[playerid] = -1;
- Imamdelovi[playerid] = 0;
- if(Vehicle[playerid] != -1) SetVehicleToRespawn(Vehicle[playerid]);
- Vehicle[playerid] = -1;
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}Prestanavte so rabota...");
- if(Vremeto[playerid] >= 1) { Vremeto[playerid] = -1; PlayerTextDrawHide(playerid, InfoTD); }
- return 1;
- }
- return 0;
- }
- //------------------------------------------------------------------------------
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
- if(vehicleid == Vozilata[0] || vehicleid == Vozilata[1] || vehicleid == Vozilata[2] || vehicleid == Vozilata[3] || vehicleid == Vozilata[4] || vehicleid == Vozilata[5]) {
- if(Sirabotam[playerid] == -1) {
- new Float: Position[3];
- GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
- SetPlayerPos(playerid, Position[0], Position[1], Position[2]+1);
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}Ne ste prenesuvac na Avto Delovi!");
- }
- else {
- if(Vremeto[playerid] >= 1) { Vremeto[playerid] = -1; PlayerTextDrawHide(playerid, InfoTD); }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
- new string[256];
- if(newkeys == KEY_NO) {
- if(Sirabotam[playerid] == -1) return 1;
- if(IsPlayerInAnyVehicle(playerid)) return 1;
- if(Vehicle[playerid] == -1 && Sirabotam[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "{FFFFFF} Morate da ste vo voziloto za da gi odnesete avto delovite.");
- if(CheckPlayerDistanceToVehicle(5.0, playerid, Vehicle[playerid])) {
- RemovePlayerAttachedObject(playerid, 5);
- if(Imamdelovi[playerid] == 0) return 1;
- if(ImaDel[playerid] == -1) {
- ImaDel[playerid] = 1;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- new rand = random(4), delovibe;
- if(rand == 0) delovibe = 1098;
- else if(rand == 1) delovibe = 1128;
- else if(rand == 2) delovibe = 1150;
- else if(rand == 3) delovibe = 1147;
- else if(rand == 4) delovibe = 1078;
- SetPlayerAttachedObject( playerid, 5, delovibe, 1, 0.179536, 0.436568, -0.047055, 0.000000, 84.821968, 77.998138, 0.405070, 1.000000, 0.225547 );
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}* Od voziloto zemavte Avto Del!");
- }
- else if(ImaDel[playerid] == 1) {
- ImaDel[playerid] = -1;
- RemovePlayerAttachedObject(playerid, 5);
- SetPlayerSpecialAction(playerid, 0);
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}* Stavivte avto del vo voziloto!");
- if(Imamdelovi[playerid] < 9 && Checkpoint[playerid] == -1) {
- format(string, sizeof(string), "{CC0000}Dali ke zemate uste avto delovi vie vekje imate %d avto dela{FFFFFF}.", Imamdelovi[playerid]);
- ShowPlayerDialog(playerid, DIALOG_STATUS1, DIALOG_STYLE_MSGBOX, " ", string, "{CC0000}Da", "{CC0000}Ne");
- }
- if(Davamdel[playerid] == 10) {
- format(string, sizeof(string), "{CC0000}Cestitame, {FFFFFF}%s{CC0000}!\nGotovi ste!", GetName(playerid));
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, " ", string, "{CC0000}Potvrdi", "");
- new rand = random(sizeof(Nosenje));
- SetPlayerCheckpoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2], 2.0);
- format(string, sizeof(string), " %d Dalecina: %0.2fm", Davamdel[playerid], GetPlayerDistanceFromPoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2]));
- SendClientMessage(playerid, 0xFFFF00FF, string);
- Checkpoint[playerid] = 1;
- }
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 5.0,1388.4351,-1901.9576,13.5230) || IsPlayerInRangeOfPoint(playerid, 5.0,1391.6552,-1902.1147,13.5213)
- || IsPlayerInRangeOfPoint(playerid, 5.0,1389.9698,-1894.3809,13.5330) || IsPlayerInRangeOfPoint(playerid, 5.0,1395.5997,-1901.3136,13.5137)) {
- if(Davamdel[playerid] == 5) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000} Vo voziloto mozete da stavite maksimum (4) avto dela.");
- if(ImaDel[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000} Vekje drzite vo vasite race avto del!");
- Davamdel[playerid] ++;
- Imamdelovi[playerid] ++;
- new rand = random(4), delovibe;
- if(rand == 0) delovibe = 1098;
- else if(rand == 1) delovibe = 1128;
- else if(rand == 2) delovibe = 1150;
- else if(rand == 3) delovibe = 1147;
- else if(rand == 4) delovibe = 1078;
- SetPlayerAttachedObject( playerid, 5, delovibe, 1, 0.179536, 0.436568, -0.047055, 0.000000, 84.821968, 77.998138, 0.405070, 1.000000, 0.225547 );
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ImaDel[playerid] = 1;
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerExitVehicle(playerid, vehicleid) {
- if(Sirabotam[playerid] == 1 && Imamdelovi[playerid] >= 1 && vehicleid == Vozilata[0] || vehicleid == Vozilata[1] || vehicleid == Vozilata[2] || vehicleid == Vozilata[3] || vehicleid == Vozilata[4] || vehicleid == Vozilata[5] && Davamdel[playerid] != 0) {
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}Imate edna minuta da gi odnesete !");
- Vremeto[playerid] = 60;
- PlayerTextDrawShow(playerid, InfoTD);
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerStateChange(playerid, newstate, oldstate) {
- if(newstate == PLAYER_STATE_DRIVER) {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(vehicleid == Vozilata[0] || vehicleid == Vozilata[1] || vehicleid == Vozilata[2] || vehicleid == Vozilata[3] || vehicleid == Vozilata[4] || vehicleid == Vozilata[5] && Davamdel[playerid] == 0) {
- if(Imamdelovi[playerid] != 0) return 1;
- Vehicle[playerid] = vehicleid;
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}Odete na checkpoint za da zemete avto del!");
- SetPlayerCheckpoint(playerid, 1382.2131,-1897.2834,13.5430, 8.0);
- Checkpoint[playerid] = 3;
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerEnterCheckpoint(playerid) {
- new string[256];
- if(Checkpoint[playerid] == 1) {
- if(ImaDel[playerid] == -1) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000}Vie nemate avto del vo vasite ..!");
- DisablePlayerCheckpoint(playerid);
- SetPlayerSpecialAction(playerid, 0);
- Davamdel[playerid] --;
- ImaDel[playerid] = -1;
- RemovePlayerAttachedObject(playerid, 5);
- new rand = random(sizeof(Nosenje));
- SetPlayerCheckpoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2], 2.0);
- if(Davamdel[playerid] != 0) {
- Checkpoint[playerid] = 1;
- format(string, sizeof(string), "{CC0000}Imate uste %d avto delovi da istovarite! Dalecina: %0.2fm", Davamdel[playerid], GetPlayerDistanceFromPoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2]));
- SendClientMessage(playerid, 0xFFFF00FF, string);
- }
- if(Davamdel[playerid] == 0) {
- Davamdel[playerid] = -1;
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, 1371.9376,-1891.6653,13.5005, 9.0);
- Checkpoint[playerid] = 2;
- format(string, sizeof(string), "{FFFFFF}Odete po isplata!", GetName(playerid));
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, " ", string, "{CC0000}Potvrdi", "");
- }
- return 1;
- }
- if(Checkpoint[playerid] == 2) {
- if(IsPlayerInVehicle(playerid, Vehicle[playerid])) SetVehicleToRespawn(Vehicle[playerid]);
- DisablePlayerCheckpoint(playerid);
- new money = 1000 + random(500) * Imamdelovi[playerid];
- format(string, sizeof(string), "{CC0000}Vie dostavivte %d avto delovi.", Imamdelovi[playerid]);
- SendClientMessage(playerid, 0x25B336FF, string);
- format(string, sizeof(string), "{CC0000}Zarabotivte $%d.", money);
- SendClientMessage(playerid, 0x25B336FF, string);
- GivePlayerMoney(playerid, money);
- Imamdelovi[playerid] = 0;
- Checkpoint[playerid] = -1;
- Sirabotam[playerid] = -1;
- return 1;
- }
- if(Checkpoint[playerid] == 3) {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000}TinoScript | {FFFFFF} Odete do avto delovite i za zemanje pritisnete N !");
- Checkpoint[playerid] = -1;
- return 1;
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- new string[256];
- switch(dialogid) {
- case DIALOG_STATUS1: {
- if(response) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "{FFFFFF} Zavrsete so zemanje na avto delovi!");
- format(string, sizeof(string), "{FFFFFF}Odnesete gi delovite vo mehanicar baza!", GetName(playerid));
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, " ", string, "{CC0000}Potvrdi", "");
- new rand = random(sizeof(Nosenje));
- SetPlayerCheckpoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2], 2.0);
- format(string, sizeof(string), "Imate uste %d avto delovi da istovarite! Dalecina: %0.2fm", Davamdel[playerid], GetPlayerDistanceFromPoint(playerid, Nosenje[rand][0] ,Nosenje[rand][1], Nosenje[rand][2]));
- SendClientMessage(playerid, 0xFFFF00FF, string);
- Checkpoint[playerid] = 1;
- }
- case DIALOG_EVEME1: {
- if(!response) return 1;
- if(Sirabotam[playerid] == 1) return 1;
- Sirabotam[playerid] = 1;
- Imamdelovi[playerid] = 0;
- Davamdel[playerid] = 0;
- SetPlayerSkin(playerid, 60);
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000}TinoScript | {FFFFFF} Vi cestitame {FFFFFF}se zaposlivte kako dostavuvac na avto delovi.");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "{CC0000}TinoScript | {FFFFFF} Vlezete vo edno od kombinjata za da zapocnete so rabota.");
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == Pickupot) {
- if(Sirabotam[playerid] == 1) return 1;
- new string[1024];
- strcat(string, "{FFFFFF}Dali sakate da se zaposlite kako prenesuvac na Avto Delovi");
- ShowPlayerDialog(playerid, DIALOG_EVEME1, DIALOG_STYLE_MSGBOX, " ", string, "{CC0000}Potvrdi", "{CC0000}Izlez");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- forward proveriGo();
- public proveriGo() {
- new string[256];
- for(new i = 0; i < MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- if(Vremeto[i] >= 1) {
- Vremeto[i] --;
- format(string, sizeof(string), "Imate %d sekundi da se vratite vo voziloto.", Vremeto);
- PlayerTextDrawSetString(i, InfoTD, string);
- PlayerTextDrawShow(i, InfoTD);
- if(Vremeto[i] == 0) {
- Vremeto[i] = -1;
- Stopiramrabota(i);
- PlayerTextDrawHide(i, InfoTD);
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- stock Stopiramrabota(playerid) {
- if(Sirabotam[playerid] == 1) {
- DisablePlayerCheckpoint(playerid);
- Sirabotam[playerid] = -1;
- Davamdel[playerid] = 0;
- Checkpoint[playerid] = -1;
- Imamdelovi[playerid] = 0;
- SetVehicleToRespawn(Vehicle[playerid]);
- Vehicle[playerid] = -1;
- SendClientMessage(playerid, COLOR_WHITE, "{CC0000} TinoScript | {FFFFFF}Gi izgubivte Avto Delovite.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- stock GetName(playerid) {
- new
- pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- //------------------------------------------------------------------------------
- stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid) {
- if(IsPlayerConnected(playerid)) {
- new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,PX,PY,PZ);
- GetVehiclePos(vehicleid, X,Y,Z);
- new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
- if(Distance <= radi*radi) return 1;
- }
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Add Comment
Please, Sign In to add comment