new CPStatusz[MAX_PLAYERS];new Float:CheckPointok[4][3] = { // értelemszerûen írd bele a koordinátákat és a tömb méretét is módosítsd majd{0.0, 0.0, 0.0},{5.0, 5.0, 5.0},{10.0, 10.0, 10.0},{15.0, 15.0, 15.0}};public OnPlayerConnect(playerid){ CPStatusz[playerid] = -1; return 1;}// elkezdés: SetPlayerCheckpoint(playerid, CheckPointok[0][0], CheckPointok[1][0], CheckPointok[2][0], 5), CPStatusz[playerid] = 0;public OnPlayerEnterCheckpoint(playerid){ if(CPStatusz[playerid] >= 0) { CPStatusz[playerid]++; if(CPStatusz[playerid] == sizeof(CheckPointok)) { // utolsóba belement CPStatusz[playerid] = -1; // ezt hagyd itt return DisablePlayerCheckpoint(playerid); // ezt is } SetPlayerCheckpoint(playerid, CheckPointok[CPStatusz[playerid]][0], CheckPointok[CPStatusz[playerid]][0], CheckPointok[CPStatusz[playerid]][0], 5); } return 1;}
new Float:CheckPointok[16][3] = { // értelemszerûen írd bele a koordinátákat és a tömb méretét is módosítsd majd{-1327.5237,2682.9534,49.9375},{-1355.6295,2671.4583,50.8820},{-1352.1831,2644.7876,50.9913},{-1411.1616,2603.7522,55.5155},{-1429.8525,2671.9929,55.5648},{-1485.9122,2674.3291,55.5625},{-1498.1089,2615.6243,55.5637},{-1498.1361,2571.1460,55.5625},{-1543.0342,2589.7749,55.5592},{-1544.2520,2656.8799,55.5625},{-1618.1005,2673.8020,54.3281},{-1631.6904,2712.9077,57.3069},{-1524.9347,2727.6213,63.9215},{-1352.3354,2646.0762,50.9463},{-1312.1797,2648.9006,49.7777},{-1252.6370,2703.1763,49.9375}};
SetPlayerCheckpoint(playerid, CheckPointok[0][0], CheckPointok[0][1], CheckPointok[0][2], 5), CPStatusz[playerid] = 0;
SetPlayerCheckpoint(playerid, CheckPointok[CPStatusz[playerid]][0], CheckPointok[CPStatusz[playerid]][1], CheckPointok[CPStatusz[playerid]][2], 5);
new Float:BusCP [41][3] = {{ -1919.1860,-835.6160,32.0681 }, // Bus CP-k{ -1970.1079,-711.3194,32.1245 }, // Bus CP-k{ -2131.6426,-506.2636,38.1384 }, // Bus CP-k{ -2248.3911,-289.6830,47.0628 }, // Bus CP-k{ -2164.4614,-171.2423,35.3360 }, // Bus CP-k{ -2163.4470,10.0699,35.2650 }, // Bus CP-k{ -2142.0840,295.6446,35.3370 }, // Bus CP-k{ -2216.0144,323.4728,35.2657 }, // Bus CP-k{ -2478.5542,186.5050,9.1697 }, // Bus CP-k{ -2721.9363,160.6660,5.0709 }, // Bus CP-k{ -2812.6570,113.7421,7.1251 }, // Bus CP-k{ -2782.0759,-215.3489,7.2022 }, // Bus CP-k{ -2658.8320,-225.8265,4.7166 }, // Bus CP utolsó{ -2767.6865,-325.5258,7.2022 },{ -2662.3064,-491.6398,21.6010 },{ -2484.3855,-373.2859,64.5942 },{ -2488.2549,-438.2265,78.3898 },{ -2552.3066,-496.1372,79.5789 },{ -2418.9373,-623.8978,132.6575 },{ -2247.9841,-756.6231,71.8023 },{ -2217.6335,-609.0412,58.0104 },{ -2152.2339,-506.8549,40.1828 },{ -1861.6167,-587.2319,23.1250 },{ -1795.4683,-257.0482,19.3625 },{ -1800.7241,101.1999,15.1616 },{ -1669.4857,372.6775,7.1987 },{ -1553.7628,689.2185,7.1329 },{ -1572.2174,1017.6079,7.1330 },{ -1700.3059,1321.0278,7.1332 },{ -2069.7703,1283.5516,9.1443 },{ -2272.9585,1091.6942,79.9472 },{ -2273.0547,882.2507,66.5877 },{ -2271.9058,639.6857,49.3667 },{ -2232.4858,453.3685,35.1333 },{ -2256.1875,278.6037,35.3321 },{ -2264.1377,-52.3700,35.3299 },{ -2264.8049,-301.1132,48.7381 },{ -2156.2905,-503.2376,41.0628 },{ -1992.3423,-778.5349,32.1252 },{ -1945.8369,-862.3992,32.2084 },{ -1887.9785,-836.7575,32.1165 }};
if(PlayerIsBusMission[playerid] == 1){ if(IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); if(Buszok(carid)) { if ( BusCPs[ playerid ] > 0 && BusCPs [ playerid ] != 44 ) { new cash=(random(45-25)+8); new xp=(random(27-22)+6); PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); format(string, sizeof(string), \"~w~Kaptál ~g~%d~w~$-t ~w~és ~g~%d XP-t.\", cash, xp); SafeGivePlayerMoney(playerid,cash); PlayerInfo[playerid][Penz] += cash; PlayerInfo[playerid][XP] += xp; varoskassza -= cash, Savevaroskassza(); GameTextForPlayer(playerid, string, 5000, 1); TogglePlayerControllable( playerid,0 ); SetTimerEx(\"fagyasztki\", 5000, 0, \"%i\", playerid ); new x = BusCPs [ playerid ]; DisablePlayerCheckpoint( playerid ); SetPlayerCheckpoint(playerid,BusCP
if(strcmp(cmd, \"/munkakezdés\", true) == 0){ if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pJob] == 18) { new carid = GetPlayerVehicleID(playerid); if(Buszok(carid)) { if(PlayerIsBusMission[playerid] == 0) { PlayerIsBusMission[playerid] = 1; TogglePlayerControllable(playerid, 1); SetPlayerCheckpoint ( playerid, BusCP [ 0 ] [ 0 ], BusCP [ 0 ] [ 1 ], BusCP [ 0 ] [ 2 ], 5.0 ); SendClientMessageToAll ( COLOR_GREEN, \"Vértes Volán: Menetrend szerinti buszjárat indult a buszpályaudvaról.\" ); BusCPs [ playerid ] = 1; SendClientMessage(playerid, COLOR_YELLOW, \"Elkezdted a munkát. Menj a piros checkpointokba és kapsz pénzt és XP-t!\"); SendClientMessage(playerid, COLOR_YELLOW, \"Ha abba szeretnéd hagyni a munkát vidd vissza a kocsit a helyére!\"); } } else { SendClientMessage(playerid, COLOR_GREY,\"Nem ülsz buszban.\"); } } else { RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); SendClientMessage(playerid, COLOR_GREY,\"Nem vagy Buszsofõr.\"); } return 1;}