//> Includes <// #include <a_samp> //> Pragmas <// #pragma unused dmvcp //> Defines <// #define GREEN 0x21DD00FF #define RED 0xE60000FF #define YELLOW 0xFFFF00FF #define ORANGE 0xF97804FF #define GRAY 0xCECECEFF #define LIGHTBLUE 0x00C2ECFF #define CHECKPOINT_DMV 0 #define DrivingTestCash 5000 // Edit this if needed. 5000 = the cash that you'll pay to take the driving test #define TooSlow 110 // 110 = if the time is 110 or more, you are driving too slow. You may edit this if needed. #define TooFast 105 // 105 = if the time is less than 105, you are driving too fast. You may edit this if needed. //> Variables <// static Checkpoint[MAX_PLAYERS]; new Menu:dmvoption[MAX_PLAYERS]; new Float:DrivingSchoolCP[31][3] = { {-2047.318237, -78.493286, 35.043674}, // Starting of the first test's checkpoints {-2020.431396, -72.462600, 35.046836}, {-2004.230468, -63.067325, 35.043403}, {-2004.557861, 92.230476, 27.414079}, {-2001.461181, 306.811828, 34.771896}, {-2016.024169, 322.754547, 34.890529}, {-2134.363769, 321.980102, 35.024250}, {-2238.925292, 322.899688, 35.046855}, {-2249.107177, 327.225555, 35.046890}, {-2298.212402, 411.341003, 34.885196}, {-2321.346435, 410.600982, 34.890609}, {-2423.162597, 55.284839, 34.890628}, {-2485.413818, 42.110366, 26.862459}, {-2590.423339, 41.848583, 4.056760}, {-2606.167480, 32.018920, 4.118466}, {-2606.167480, -57.042472, 4.054659}, {-2597.467041, -72.002243, 4.125582}, {-2514.526123, -72.963630, 24.342817}, {-2386.916503, -71.996078, 35.038841}, {-2273.539550, -72.938049, 35.039089}, {-2261.753173, -83.578163, 35.046840}, {-2260.035400, -177.289489, 35.046775}, {-2245.059814, -192.252777, 35.046882}, {-2164.877441, -82.917831, 35.046836}, {-2154.212402, -72.622978, 35.046878}, {-2052.066894, -72.116477, 35.042152}, {-2047.616333, -88.755950, 35.038990}, {-2025.749145, -97.650115, 35.039009}, {-2044.890747, -139.023742, 35.188522}, // Starting of the second test's checkpoints {-2056.534667, -222.281845, 35.198474}, {-2062.643554, -118.802627, 35.325977} }; new DMVCP[MAX_PLAYERS]; new dmvcp; new dmvcar,dmvcar2; new DrivingLicense[MAX_PLAYERS]; new DMVTest[MAX_PLAYERS]; new DMVCount[MAX_PLAYERS]; new DrivingTestTime[MAX_PLAYERS]; new DMVT,DMVT2; new barrier; //> Forwards <// forward DrivingTestCount(playerid); forward DrivingTestCount2(playerid); forward DMVTest2Barrels(playerid); //> Callbacks <// public OnPlayerRequestSpawn(playerid) { return 1; }
public OnPlayerConnect(playerid) { dmvoption[playerid] = CreateMenu(" Driving School",0,200,100,300,500); SetMenuColumnHeader(dmvoption[playerid],0,"Would you like to take the test?"); AddMenuItem(dmvoption[playerid],0,"Yes, I want to take the test"); AddMenuItem(dmvoption[playerid],0,"No, I am not ready yet."); dmvcp = CHECKPOINT_DMV; dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); Checkpoint[playerid] = CHECKPOINT_DMV; DMVCP[playerid] = -1; DrivingLicense[playerid] = 0; DMVTest[playerid] = 0; return 1; }
public OnPlayerDisconnect(playerid, reason) { new dmvadmiral = dmvcar || dmvcar2; if (GetPlayerVehicleID(playerid) == dmvcar || GetPlayerVehicleID(playerid) == dmvcar2) SetVehicleToRespawn(dmvadmiral); return 1; }
public OnPlayerSpawn(playerid) { return 1; }
public OnPlayerDeath(playerid, killerid, reason) { if (DMVTest[playerid] == 1) { SendClientMessage(playerid,RED,"You 'died' during a driving test. Therefore, it has been cancelled."); DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; DMVTest[playerid] = 0; KillTimer(DMVT); dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); } return 1; }
public OnVehicleSpawn(vehicleid) { return 1; }
public OnVehicleDeath(vehicleid, killerid) { return 1; }
public OnPlayerText(playerid, text[]) { return 1; }
public OnPlayerPrivmsg(playerid, recieverid, text[]) { return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/dmv", true) == 0) { SetPlayerPos(playerid,-2027.835693, -98.881484, 35.164062); SetPlayerFacingAngle(playerid,180); SetCameraBehindPlayer(playerid); return 1; } if(strcmp(cmdtext, "/stopdmvtest", true) == 0) { if (DMVTest[playerid] == 0) { SendClientMessage(playerid,RED,"You're not having a driving test."); return 1; } SendClientMessage(playerid,GREEN,"You abandoned the test."); DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; DMVTest[playerid] = 0; dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); return 1; } if(strcmp(cmdtext, "/licenses", true) == 0) { SendClientMessage(playerid,LIGHTBLUE,"[-------------Licenses-------------]"); if (DrivingLicense[playerid] == 0) SendClientMessage(playerid,GRAY,"Driving: Not Passed."); else SendClientMessage(playerid,GRAY,"Driving: Passed."); return 1; } return 0; }
public OnPlayerInfoChange(playerid) { return 1; }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new taxi1,taxi2,taxi3,taxi4,taxi5,taxi6,taxi7,taxi8,taxi9,taxi10; new taxicar = vehicleid >= taxi1 && vehicleid <= taxi10; new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); if (vehicleid == dmvcar && DMVTest[playerid] == 0) { SetPlayerPos(playerid,X,Y,Z+3); SendClientMessage(playerid,RED,"You didn't subscribe to take the driving test, therefore you are not allowed to drive this car."); } if (vehicleid == dmvcar2 && DMVTest[playerid] == 0) { SetPlayerPos(playerid,X,Y,Z+3); SendClientMessage(playerid,RED,"You didn't subscribe to take the driving test, therefore you are not allowed to drive this car."); } return 1; Ошибка тут179 [color=red]}[/color] }
public OnPlayerExitVehicle(playerid, vehicleid) { if (vehicleid == dmvcar) { SetVehicleToRespawn(dmvcar); SetVehicleParamsForPlayer(dmvcar,playerid,0,0); } if (vehicleid == dmvcar2) { SetVehicleToRespawn(dmvcar2); SetVehicleParamsForPlayer(dmvcar2,playerid,0,0); } return 1; }
public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid); if (oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && DMVTest[playerid] == 1 && vehicleid == dmvcar) SetVehicleParamsForPlayer(dmvcar,playerid,0,0); if (oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && DMVTest[playerid] == 1 && vehicleid == dmvcar2) SetVehicleParamsForPlayer(dmvcar2,playerid,0,0); if (oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && DrivingLicense[playerid] == 0 && DMVTest[playerid] == 0) { SendClientMessage(playerid,RED,"Warning: you might get caught for driving without a real driving license!"); new star = GetPlayerWantedLevel(playerid); SetPlayerWantedLevel(playerid,star+1); } return 1; }
public OnPlayerEnterCheckpoint(playerid) { switch(DMVCP[playerid]) { case -1: { ShowMenuForPlayer(dmvoption[playerid],playerid); TogglePlayerControllable(playerid,0); } case 0: { if(!IsPlayerInVehicle(playerid,dmvcar)) { SendClientMessage(playerid,RED,"You're not in the Admiral car!"); } else { DisablePlayerCheckpoint(playerid); DMVCP[playerid] = 1; SetPlayerCheckpoint(playerid,DrivingSchoolCP[1][0],DrivingSchoolCP[1][1],DrivingSchoolCP[1][2],5.0); DMVCount[playerid] = 1; DMVT = SetTimerEx("DrivingTestCount",1000,0,"d",playerid); DMVT2 = SetTimerEx("DrivingTestCount2",1000,0,"d",playerid); } } case 1..26: { if(!IsPlayerInVehicle(playerid,dmvcar)) { SendClientMessage(playerid,RED,"You're not in the Admiral car!"); } else { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,DrivingSchoolCP[DMVCP[playerid]+1][0],DrivingSchoolCP[DMVCP[playerid]+1][1],DrivingSchoolCP[DMVCP[playerid]+1][2],5.0); DMVCP[playerid]++; } } case 27: { new Float:VehHealth; new string[128]; GetVehicleHealth(GetPlayerVehicleID(playerid),VehHealth); if (VehHealth <= 899) { SendClientMessage(playerid,RED,"You failed the test: you weren't driving safely!"); DrivingLicense[playerid] = 0; DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; format(string, sizeof(string), "Time: %d",DrivingTestTime[playerid]); SendClientMessage(playerid,YELLOW,string); DMVTest[playerid] = 0; KillTimer(DMVT); dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); } else if (DrivingTestTime[playerid] > TooSlow) { SendClientMessage(playerid,RED,"You failed the test: you were driving too slow!"); DrivingLicense[playerid] = 0; DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; format(string, sizeof(string), "Time: %d",DrivingTestTime[playerid]); SendClientMessage(playerid,YELLOW,string); DMVTest[playerid] = 0; KillTimer(DMVT); dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); } else if (DrivingTestTime[playerid] < TooFast) { SendClientMessage(playerid,RED,"You failed the test: you were driving too fast!"); DrivingLicense[playerid] = 0; DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; format(string, sizeof(string), "Time: %d",DrivingTestTime[playerid]); SendClientMessage(playerid,YELLOW,string); DMVTest[playerid] = 0; KillTimer(DMVT); dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); } else if (DrivingTestTime[playerid] > TooFast && DrivingTestTime[playerid] < TooSlow) { SendClientMessage(playerid,GREEN,"You passed the first test!"); DMVCP[playerid] = 28; DMVTest2Barrels(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,DrivingSchoolCP[28][0],DrivingSchoolCP[28][1],DrivingSchoolCP[28][2],5.0); SetPlayerPos(playerid,-2046.157592, -109.187286, 35.234008); }
} case 28,29: { if(!IsPlayerInVehicle(playerid,dmvcar2)) { SendClientMessage(playerid,RED,"You're not in the Admiral car!"); } else { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,DrivingSchoolCP[DMVCP[playerid]+1][0],DrivingSchoolCP[DMVCP[playerid]+1][1],DrivingSchoolCP[DMVCP[playerid]+1][2],5.0); DMVCP[playerid]++; SetPlayerObjectRot(playerid,barrier, 0, 270.6185, 3.4377); } } case 30: { if(!IsPlayerInVehicle(playerid,dmvcar2)) { SendClientMessage(playerid,RED,"You're not in the Admiral car!"); } else { new string[256]; DisablePlayerCheckpoint(playerid); DMVCP[playerid] = -1; SendClientMessage(playerid,GREEN,"You passed the driving test! Here's your license. Drive safely!"); DrivingLicense[playerid] = 1; SendClientMessage(playerid,LIGHTBLUE,"You earned a driving license. ( /licenses )"); dmvcp = CHECKPOINT_DMV; dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0); Checkpoint[playerid] = CHECKPOINT_DMV; format(string, sizeof(string), "Total Time: %d",DrivingTestTime[playerid]); SendClientMessage(playerid,YELLOW,string); DMVTest[playerid] = 0; KillTimer(DMVT); } } } return 1; }
public OnPlayerLeaveCheckpoint(playerid) { return 1; }
public OnPlayerEnterRaceCheckpoint(playerid) { return 1; }
public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; }
public OnRconCommand(cmd[]) { return 1; }
public OnObjectMoved(objectid) { return 1; }
public OnPlayerObjectMoved(playerid, objectid) { return 1; }
public OnPlayerPickUpPickup(playerid, pickupid) { return 1; }
public OnPlayerSelectedMenuRow(playerid, row) { new Menu:Current = GetPlayerMenu(playerid); if (Current == dmvoption[playerid]) { switch (row) { case 0: { if (GetPlayerMoney(playerid) < DrivingTestCash) { SendClientMessage(playerid,RED,"You don't have enough cash"); ShowMenuForPlayer(dmvoption[playerid],playerid); return 1; } if (DrivingLicense[playerid] == 1) { SendClientMessage(playerid,RED,"You already have a license!"); return 1; } GivePlayerMoney(playerid,-DrivingTestCash); SetPlayerPos(playerid,-2027.8353, -98.8884, 35.1642); SetPlayerFacingAngle(playerid,355); SetCameraBehindPlayer(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,DrivingSchoolCP[0][0],DrivingSchoolCP[0][1],DrivingSchoolCP[0][2],5.0); SendClientMessage(playerid,GREEN,"Get ready!"); DMVCP[playerid]=0; SetPlayerInterior(playerid,0); DMVTest[playerid] = 1; SetVehicleParamsForPlayer(dmvcar,playerid,1,0); } case 1: {DisablePlayerCheckpoint(playerid);SendClientMessage(playerid,RED,"Alright, come back again!");dmvcp = SetPlayerCheckpoint(playerid,-2033.396606, -117.458976, 1035.171875,2.0);DMVCP[playerid]=-1;DMVTest[playerid] = 0;} } TogglePlayerControllable(playerid,1); HideMenuForPlayer(dmvoption[playerid],playerid); } return 1; }
Добавлено (24.03.2008, 19:41) --------------------------------------------- И вот какая ошибка:
Code
C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 204: symbol is assigned a value that is never used: "taxicar" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi9" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi8" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi7" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi6" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi5" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi4" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi3" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(179) : warning 203: symbol is never used: "taxi2" C:\Documents and Settings\Паха\Мои документы\licenze.pwn(180) : error 054: unmatched closing brace Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
1 Error
Сообщение отредактировал Dog - Понедельник, 24.03.2008, 19:45
Добавлено (25.03.2008, 07:13) --------------------------------------------- эх лимит текста пришлось еще //коменты всякие там удалить, но всё компилирует
эх лимит текста пришлось еще //коменты всякие там удалить, но всё компилирует
Что-то я е думаю что там лимит текста.У себя пробывал убрал "Ошибка тут 179 }" От компилило норм токо с 9 или непомню Warning
Лучший сайт Украины Sex Fun Warez Если я вам понадобился или помог ставте+ В связи с тем, что я больше не заинтересован в GTA и с выходом SA-MP версии 3, взлом аккаунтов и DDOS серверов стал невозможен, прошу больше меня по этому поводу в ICQ не беспокоить.
Sashok59, Извени что незаметил спасибо тебе вот тебе +!!!!!!!!!!!!!Можно закрывать эту тему!!!!!!
Добавлено (27.03.2008, 11:57) --------------------------------------------- Не закрываёте пока тему!!! Вот какой вопрос он всё кампилиться но какая машина нужна для сдачи эгзаменов непонятно помогите!!!!!!!!!