Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #emit stack 0x7FFFFFFF // wtf (1) (stack over... overf*ck!?)
- #emit inc.s cellmax // wtf (2) (this one should probably make DeAMX allocate all available memory and lag forever)
- static const ___[][] = {"pro-pawn", ".ru"}; // pretty old anti-deamx trick
- #emit retn
- #emit load.s.pri ___ // wtf (3) (opcode outside of function?)
- #emit proc // wtf (4) (if DeAMX hasn't crashed already, it would think it is a new function)
- #emit proc // wtf (5) (a function inside of another function!?)
- #emit fill cellmax // wtf (6) (fill random memory block with 0xFFFFFFFF)
- #emit proc
- #emit stack 1 // wtf (7) (compiler usually allocates 4 bytes or 4*N for arrays of N elements)
- #emit stor.alt ___ // wtf (8) (...)
- #emit strb.i 2 // wtf (9)
- #emit switch 4
- #emit retn // wtf (10) (no "casetbl" opcodes before retn - invalid switch statement?)
- L1:
- #emit jump L1 // avoid compiler crash from "#emit switch"
- #emit zero cellmin // wtf (11) (nonexistent address)
- }
- #include <a_samp>
- ///#include <dc_cmd>
- ///#include <streamer>
- ///#include <sscanf2>
- //#include <color>
- #include <a_http>
- #define FILTERSCRIPT //Supposing that this is a FS.
- static PlayerText:PTD_TrainSpeed[MAX_PLAYERS]={PlayerText:-1, ...};
- static PTD_Train_Timer[MAX_PLAYERS]={-1, ...};
- static PWaitDepo[MAX_PLAYERS]={-1, ...};
- static PWaitDepo_Count[MAX_PLAYERS]={0, ...};
- #define PointToPointEX_T(%0,%1,%2,%3,%4,%5) floatsqroot(floatpower(floatabs(floatsub(%3,%0)),2)+floatpower(floatabs(floatsub(%4,%1)),2)+floatpower(floatabs(floatsub(%5,%2)),2))
- #define DIALOG_DEPO_START 9444
- #define MAX_D_COORDS 500
- static Text3D:TramText[MAX_PLAYERS]={Text3D:-1, ...};
- enum _depo_coordination_data
- {
- Float:D_COORDS_POS[4],
- D_COORDS_NAME[32],
- Float:D_CHECK_POS[3],
- }
- static _depo_coordination[9][_depo_coordination_data]={
- {{-2364.0280,515.1331,29.5515,359.6405},"Управление ФБР", {-2350.5547,508.5157,29.6005}}, // 0
- {{-2014.5296,152.9299,28.1875,267.8124},"ЖД Вокзал", {-2006.5013,138.8349,27.5391}}, // 1
- {{-1995.0206,486.2850,35.6640,270.2356},"Здание МВД", {-2003.9078,472.9756,35.0156}}, // 2
- {{-1855.1552,596.2886,35.6718,179.4586},"Радиоцентр", {-1868.7422,602.8367,35.0156}}, // 3
- {{-1620.8808,722.0050,15.0411,181.2602},"Управление\nполиции", {-1635.9958,729.0737,14.4609}}, // 4
- {{-1995.5501,888.2785,45.9453,266.1503},"Восточная\nплощадь", {-2001.5272,876.7241,45.2969}}, // 5
- {{-1527.4239,968.1269,7.6952,295.4263},"Банк", {-1531.8258,952.6825,7.0468}}, // 6
- {{-1632.9913,1259.2442,7.6782,312.4021},"Автосалон", {-1625.8931,1239.1239,7.0468}}, // 7
- {{-2275.8642,1068.9594,81.9505,449.3247},"Северная", {-2265.3455,1087.2888,79.8594}} // 8
- };
- public OnFilterScriptInit()
- {
- //AddPlayerClass(0,-2275.5374,540.8391,35.1033,86.4772,0,0,0,0,0,0); // info
- /// AddPlayerClass(78,-2275.7336,526.8129,35.1159,88.9544,0,0,0,0,0,0); // dress
- /* LimitGlobalChatRadius(13.0);
- SetNameTagDrawDistance(30.0);
- LimitPlayerMarkerRadius(70.0);
- ManualVehicleEngineAndLights();
- EnableStuntBonusForAll(0);
- DisableInteriorEnterExits();
- ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
- SetGravity(0.012); */
- Create3DTextLabel("{862682}Водитель трамвая\n{38a772}Информация",-1,-2275.5374,540.8391,35.1033 + 0.8,10.0,0);
- CreatePickup(1239,1,-2275.5374,540.8391,35.1033, 0);
- Create3DTextLabel("{862682}Водитель трамвая\n{a3891e}Начало работы",-1,-2275.5374,526.8129,35.1159 + 0.8,10.0,0);
- CreatePickup(1275,1,-2275.5374,526.8129,35.1159, 0);
- new depo_table,format_string_depo[64];
- depo_table = CreateObject(19479, -2276.610107, 534.017639, 39.915630, 0.000000, 0.000000, 360.000000, 300.00);
- SetObjectMaterialText(depo_table, "Трамвайное\nдепо", 0, 120, "Ariel", 48, 1, 0xFF800000, 0x00000000, 1);
- for(new i=0;i<9;i++)
- {
- depo_table = CreateObject(8530, _depo_coordination[i][D_COORDS_POS][0], _depo_coordination[i][D_COORDS_POS][1], _depo_coordination[i][D_COORDS_POS][2] + 0.5, 0.000000, 0.000000, _depo_coordination[i][D_COORDS_POS][3], 300.00);
- format(format_string_depo, sizeof(format_string_depo), "Остановка\nтрамвая\n{ff9900}%s", _depo_coordination[i][D_COORDS_NAME]);
- SetObjectMaterialText(depo_table, format_string_depo,0, 130, "Ariel", 60, 1, 0xFFFFFFFF, 0xFF4B0082, 1);
- }
- return 1;
- }
- stock timec(timestamp, compare = -1) {
- if (compare == -1) {
- compare = gettime();
- }
- new
- n,
- // on the following line, I have removed the need for the diff() function.
- // if you want to use the diff() function in pawn, replace the following with:
- // Float:d = diff(timestamp, compare),
- Float:d = (timestamp > compare) ? timestamp - compare : compare - timestamp,
- returnstr[32];
- if (d < 60) {
- format(returnstr, sizeof(returnstr), "< 1 minute");
- return returnstr;
- } else if (d < 3600) { // 3600 = 1 hour
- n = floatround(floatdiv(d, 60.0), floatround_floor);
- format(returnstr, sizeof(returnstr), "minute");
- } else if (d < 86400) { // 86400 = 1 day
- n = floatround(floatdiv(d, 3600.0), floatround_floor);
- format(returnstr, sizeof(returnstr), "hour");
- } else if (d < 2592000) { // 2592000 = 1 month
- n = floatround(floatdiv(d, 86400.0), floatround_floor);
- format(returnstr, sizeof(returnstr), "day");
- } else if (d < 31536000) { // 31536000 = 1 year
- n = floatround(floatdiv(d, 2592000.0), floatround_floor);
- format(returnstr, sizeof(returnstr), "month");
- } else {
- n = floatround(floatdiv(d, 31536000.0), floatround_floor);
- format(returnstr, sizeof(returnstr), "year");
- }
- if (n == 1) {
- format(returnstr, sizeof(returnstr), "1 %s", returnstr);
- } else {
- format(returnstr, sizeof(returnstr), "%d %ss", n, returnstr);
- }
- return returnstr;
- }
- stock split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- /*CMD:create_ost_depo(playerid, params[])
- {
- new name_train_ost[32], Float:pos[4], tmpobjid_2;
- if(sscanf(params, "s[32]", name_train_ost)) return SendClientMessage(playerid,-1,"/create_ost_depo [name]");
- GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- tmpobjid_2 = CreateDynamicObject(8530, pos[0],pos[1],pos[2] + 0.5, 0.000000, 0.000000, pos[3] + 90.0, -1, -1, -1, 300.00, 300.00);
- new format_string_depo[16 + 64];
- format(format_string_depo, sizeof(format_string_depo), "Остановка\nтрамвая\n{ff9900}%s", name_train_ost);
- SetDynamicObjectMaterialText(tmpobjid_2, 0, format_string_depo, 130, "Ariel", 60, 1, 0xFFFFFFFF, 0xFF4B0082, 1);
- new File:depo_coordination_write = fopen("depo_coordination_load_file.cfg", io_append);
- new depo_coordination_write_string[64];
- format(depo_coordination_write_string, sizeof(depo_coordination_write_string), "%.4f|%.4f|%.4f|%.4f|%s\n",pos[0],pos[1],pos[2] + 0.5, pos[3] + 90.0, name_train_ost);
- fwriteex(depo_coordination_write, depo_coordination_write_string);
- fclose(depo_coordination_write);
- _depo_coordination[TotalDepoCoord][D_COORDS_POS][0] = pos[0];
- _depo_coordination[TotalDepoCoord][D_COORDS_POS][1] = pos[1];
- _depo_coordination[TotalDepoCoord][D_COORDS_POS][2] = pos[2] + 0.5;
- _depo_coordination[TotalDepoCoord][D_COORDS_POS][3] = pos[3] + 90.0;
- strmid(_depo_coordination[TotalDepoCoord][D_COORDS_NAME], name_train_ost, 0, strlen(name_train_ost), 16);
- TotalDepoCoord++;
- return 1;
- }
- */
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if ( oldstate == PLAYER_STATE_PASSENGER )
- {
- static i;
- i = GetPVarInt(playerid, "driverid");
- CallRemoteFunction("OnExitPassengerTram", "iii", i, playerid, GetPVarInt(i, "sum"));
- DeletePVar(playerid,"driverid");
- }
- if ( newstate == PLAYER_STATE_PASSENGER )
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) && GetPlayerState(i) == 2 && GetPlayerVehicleID(playerid) == GetPVarInt(i, "_depo"))
- {
- CallRemoteFunction("OnEnterPassengerTram", "iii", i, playerid, GetPVarInt(i, "sum"));
- SetPVarInt(playerid, "driverid", i);
- break;
- }
- }
- }
- if ( newstate == PLAYER_STATE_ONFOOT && GetPVarInt(playerid, "_depo") && oldstate != PLAYER_STATE_SPAWNED && oldstate != PLAYER_STATE_WASTED )
- {
- SetCameraBehindPlayer(playerid);
- SetPVarInt(playerid, "_depo_false_unix", 31 );
- SetPVarInt(playerid, "_depo_false_timer", SetTimerEx( "_depo_false_timer_", 990, 1, "i", playerid ) ) ;
- }
- else if ( newstate == PLAYER_STATE_DRIVER )
- {
- if ( GetPVarInt(playerid, "_depo_false_timer") )
- {
- KillTimer ( GetPVarInt(playerid, "_depo_false_timer") ) ;
- DeletePVar(playerid, "_depo_false_unix" ) ;
- DeletePVar(playerid, "_depo_false_timer" ) ;
- }
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if ( GetPVarInt(playerid, "_depo_false_timer") ) KillTimer ( GetPVarInt(playerid, "_depo_false_timer") ) ;
- if (GetPVarInt(playerid, "_depo"))
- {
- CallRemoteFunction("OnFinishTramJob", "i", playerid);
- DestroyVehicle(GetPVarInt(playerid, "_depo"));
- }
- if ( PTD_TrainSpeed[playerid] != PlayerText:-1 )
- {
- PlayerTextDrawDestroy(playerid, PTD_TrainSpeed[playerid] ) ;
- PTD_TrainSpeed[playerid] = PlayerText:-1;
- }
- if ( TramText[playerid] != Text3D:-1 )
- {
- Delete3DTextLabel(TramText[playerid]);
- TramText[playerid] = Text3D:-1;
- }
- if ( PTD_Train_Timer[playerid] != -1 )
- {
- KillTimer( PTD_Train_Timer[playerid] ) ;
- PTD_Train_Timer[playerid] = -1;
- }
- return 1;
- }
- forward _depo_false_timer_(playerid);
- public _depo_false_timer_(playerid)
- {
- static str_depo_false_timer[10];
- SetPVarInt(playerid, "_depo_false_unix", GetPVarInt(playerid, "_depo_false_unix") - 1 );
- if ( GetPVarInt(playerid, "_depo_false_unix") <= 0 )
- {
- CallRemoteFunction("OnFinishTramJob", "i", playerid);
- if(GetPVarInt(playerid, "_depo"))
- {
- DestroyVehicle(GetPVarInt(playerid, "_depo"));
- DeletePVar(playerid, "_depo");
- GameTextForPlayer(playerid, "~r~~h~End", 1000, 6);
- }
- if ( PTD_TrainSpeed[playerid] != PlayerText:-1 )
- {
- PlayerTextDrawDestroy(playerid, PTD_TrainSpeed[playerid] ) ;
- PTD_TrainSpeed[playerid] = PlayerText:-1;
- }
- if ( TramText[playerid] != Text3D:-1 )
- {
- Delete3DTextLabel(TramText[playerid]);
- TramText[playerid] = Text3D:-1;
- }
- if ( PTD_Train_Timer[playerid] != -1 )
- {
- KillTimer( PTD_Train_Timer[playerid] ) ;
- PTD_Train_Timer[playerid] = -1;
- }
- KillTimer ( GetPVarInt(playerid, "_depo_false_timer") ) ;
- DeletePVar(playerid, "_depo_false_unix" ) ;
- DeletePVar(playerid, "_depo_false_timer" ) ;
- }
- else
- {
- format(str_depo_false_timer,10, "~r~~h~%i",GetPVarInt(playerid,"_depo_false_unix"));
- GameTextForPlayer(playerid, str_depo_false_timer, 1000, 6);
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if ( newkeys & KEY_SECONDARY_ATTACK )
- {
- if(GetPVarInt(playerid, "_depo") && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT )
- {
- static Float:x, Float:y, Float:z;
- GetVehiclePos(GetPVarInt(playerid, "_depo"), x,y,z);
- if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))PutPlayerInVehicle(playerid,GetPVarInt(playerid, "_depo"),0 ) ;
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- SetPVarInt(playerid,"info_depo_0", gettime() + 3);
- if ( response ) SetPVarInt(playerid,"info_depo_1", gettime() + 5);
- else SetPVarInt(playerid,"info_depo_1", gettime() + 3);
- switch(dialogid)
- {
- case DIALOG_DEPO_START:
- {
- if ( !response ) return 1;
- static sum, vehicleid;
- sum = strval(inputtext);
- if( !strlen(inputtext) || !sum ) return ShowPlayerDialog(playerid, DIALOG_DEPO_START, DIALOG_STYLE_INPUT, "{ffff00}Водитель трамвая", "{ffffff}Укажите стоимость проезда {2e9971}(от 0 до 100$){ffffff}:", "Начать", "Отмена");
- if ( sum < 1 || sum > 100 ) return ShowPlayerDialog(playerid, DIALOG_DEPO_START, DIALOG_STYLE_INPUT, "{ffff00}Водитель трамвая", "{ffffff}Укажите стоимость проезда {2e9971}(от 0 до 100$){ffffff}:", "Начать", "Отмена");
- vehicleid = CreateVehicle(449,-2264.6973,528.4822,35.5862,180.0,1,1,1);
- SetPVarInt(playerid, "_depo", vehicleid );
- PutPlayerInVehicle(playerid,vehicleid, 0);
- SetVehicleParamsEx(vehicleid, true, false, false, false, false, false, false);
- if ( PTD_TrainSpeed[playerid] == PlayerText:-1 )
- {
- PTD_TrainSpeed[playerid] = CreatePlayerTextDraw(playerid, 529.666442, 385.362945,"~g~~h~0 KM/H");
- PlayerTextDrawLetterSize(playerid, PTD_TrainSpeed[playerid], 0.364333, 2.242962);
- PlayerTextDrawTextSize(playerid, PTD_TrainSpeed[playerid], 606.999938, 229.807434);
- PlayerTextDrawUseBox(playerid, PTD_TrainSpeed[playerid], true);
- PlayerTextDrawBoxColor(playerid, PTD_TrainSpeed[playerid], 145);
- PlayerTextDrawBackgroundColor(playerid, PTD_TrainSpeed[playerid], 51);
- PlayerTextDrawFont(playerid, PTD_TrainSpeed[playerid], 2);
- }
- PlayerTextDrawShow(playerid, PTD_TrainSpeed[playerid]);
- PTD_Train_Timer[playerid] = SetTimerEx("UpdateTrainSpeed", 200, 1, "i", playerid);
- SetPlayerRaceCheckpoint(playerid,1,_depo_coordination[0][D_CHECK_POS][0],_depo_coordination[0][D_CHECK_POS][1],_depo_coordination[0][D_CHECK_POS][2],0.0,0.0,0.0,5.0);
- SetPVarInt(playerid, "tramprice", sum);
- static tram_text_string[73 + 32 + 10];
- format(tram_text_string, sizeof(tram_text_string), "\n{ffffff}Следующая остановка:\n{d79756}%s\n\n{ffffff}Проезд: {349a66}%d$", _depo_coordination[0][D_COORDS_NAME],sum);
- TramText [ playerid ] = Create3DTextLabel(tram_text_string, -1, 7.77, 7.77, 7.77, 100.0, 0, 1);
- Attach3DTextLabelToVehicle(TramText [ playerid ], vehicleid, 0.0, 0.0, 2.0);
- CallRemoteFunction("OnStartTramJob", "i", playerid);
- }
- }
- return 1;
- }
- forward UpdateTrainSpeed(playerid);
- public UpdateTrainSpeed(playerid)
- {
- if ( PTD_TrainSpeed[playerid] != PlayerText:-1 )
- {
- static vehicleid;
- vehicleid=GetPVarInt(playerid, "_depo");
- static Float:X, Float:Y, Float:Z, format_tram[16];
- static Float:x, Float:y, Float:z, Float:rz;
- GetVehicleVelocity(vehicleid,X,Y,Z);
- static Float:speed;
- speed = floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))) * 126.31;
- if ( speed > 60.0 )
- {
- /*if ( speed > 90.0 )
- {
- DestroyVehicle(GetPVarInt(playerid,"_depo"));
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, rz);
- SetPVarInt(playerid, "_depo", CreateVehicle(449,x,y,z,rz,1,1,1) );
- PutPlayerInVehicle(playerid,GetPVarInt(playerid, "_depo"), 0);
- SetVehicleParamsEx(GetPVarInt(playerid, "_depo"), true, false, false, false, false, false, false);
- }*/
- format(format_tram, 16, "~r~~h~%d KM/H", floatround(speed));
- }
- else if ( speed > 50.0 && speed < 60.0 ) format(format_tram, 16, "~y~~h~%d KM/H", floatround(speed));
- else format(format_tram, 16, "~g~~h~%d KM/H", floatround(speed));
- PlayerTextDrawSetString(playerid, PTD_TrainSpeed[playerid], format_tram);
- static i;
- i = GetPVarInt(playerid, "_depo_select");
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, rz);
- if ( PointToPointEX_T(x,y,z,_depo_coordination[i][D_CHECK_POS][0],_depo_coordination[i][D_CHECK_POS][1],_depo_coordination[i][D_CHECK_POS][2]) < 6.0 )
- {
- DestroyVehicle(GetPVarInt(playerid,"_depo"));
- SetPVarInt(playerid, "_depo", CreateVehicle(449,x,y,z,rz,1,1,1) );
- PutPlayerInVehicle(playerid,GetPVarInt(playerid, "_depo"), 0);
- //
- CallRemoteFunction("OnTramWaitPassengerStart", "i", playerid);
- static last_i;
- last_i = i;
- // SetCameraBehindPlayer(playerid);
- i++;
- if ( i >= 9 ) i = 0 ;
- SetPVarInt(playerid,"_depo_select", i);
- SetPlayerRaceCheckpoint(playerid,1,_depo_coordination[i][D_CHECK_POS][0],_depo_coordination[i][D_CHECK_POS][1],_depo_coordination[i][D_CHECK_POS][2],0.0,0.0,0.0,5.0);
- GameTextForPlayer(playerid, "~y~~h~wait passenger", 1000, 6);
- PWaitDepo[playerid] = SetTimerEx("WaitDepo", 1000, 1, "i", playerid);
- PWaitDepo_Count[playerid] = 15;
- static tram_text_string[100];
- if ( last_i != 8 )
- {
- format(tram_text_string, 100, "{d79756}%s\n{ffffff}Следующая остановка:\n{5c6da4}%s\n\n{ffffff}Проезд: {349a66}%d$", _depo_coordination[last_i][D_COORDS_NAME], _depo_coordination[i][D_COORDS_NAME],GetPVarInt(playerid, "tramprice"));
- Update3DTextLabelText(TramText [ playerid ],-1,tram_text_string);
- }
- else
- {
- format(tram_text_string, 100, "\n{ffffff}Следующая остановка:\n{d79756}%s\n\n{ffffff}Проезд: {349a66}%d$", _depo_coordination[i][D_COORDS_NAME],GetPVarInt(playerid, "tramprice"));
- Update3DTextLabelText(TramText [ playerid ],-1,tram_text_string);
- }
- }
- static gpcm;
- gpcm = GetPlayerCameraMode(playerid);
- if ( (gpcm == 57 || gpcm == 56 || gpcm == 15 || gpcm == 14) && GetPVarInt(playerid, "gpcm_tick") <= GetTickCount())
- {
- SetPVarInt(playerid, "gpcm_tick", GetTickCount() + 2000);
- SetCameraBehindPlayer(playerid);
- }
- }
- return 1;
- }
- forward WaitDepo(playerid);
- public WaitDepo(playerid)
- {
- static format_depo[32];
- if ( PWaitDepo_Count[playerid] >= 1 )
- {
- CallRemoteFunction("OnTramWaitPassengerUpdate", "i", playerid);
- format(format_depo, 32, "~y~~h~wait passenger ~n~%d sec..", PWaitDepo_Count[playerid]);
- GameTextForPlayer(playerid, format_depo, 1000, 6);
- PWaitDepo_Count[playerid]--;
- }
- else
- {
- CallRemoteFunction("OnTramWaitPassengerFinish", "i", playerid);
- SetVehicleParamsEx(GetPVarInt(playerid, "_depo"), true, false, false, false, false, false, false);
- GameTextForPlayer(playerid, "~g~~h~Go!", 1000, 6);
- PWaitDepo_Count[playerid] = 0;
- KillTimer(PWaitDepo[playerid]);
- PWaitDepo[playerid] = -1;
- static tram_text_string[100];
- format(tram_text_string, 100, "\n{ffffff}Следующая остановка:\n{d79756}%s\n\n{ffffff}Проезд: {349a66}%d$", _depo_coordination[GetPVarInt(playerid,"_depo_select")][D_COORDS_NAME],GetPVarInt(playerid, "tramprice"));
- Update3DTextLabelText(TramText [ playerid ],-1,tram_text_string);
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,-2275.5374,540.8391,35.1033) && GetPVarInt(playerid, "info_depo_0") <= gettime())
- {
- static string_depo[800];
- string_depo[0] = EOS;
- strcat(string_depo,"{ffffff}В травайном депо Сан-Фиерро работают 10 единиц подвижного состава.\nПри наличии свободного вагона, Вы сможете выйти на маршрут.\n\n");
- strcat(string_depo,"Линия берет начало по левую сторону от депо. В зависимости от типа\nтрамвая, он может двигаться как передним, так и задним ходом. Если вам не\nудобно проходить маршрут задним ходо, попробуйте сменить вагон на\nдругой.\n\n");
- strcat(string_depo,"Чтобы завершить работу, нажмите клавишу {2c935f}Enter (или F){ffffff}. Этими же\nклавишами осуществляется посадка и высадка пассажиров. Обращаем ваше\nвнимание, что на линии действует {e76c20}ограничение скорости 60 км/ч{ffffff}. В случае её\nпревышения, вам будут выписываться штрафы. А если их накопиться слишком\nмного, трамвайное депо уволит Вас с работы. Будьте внимательны и \nсоблюдайте правила дорожного движения!\n");
- ShowPlayerDialog(playerid,0000,0,"{ebc92c}Водитель трамвая", string_depo, "Закрыть", "");
- SetPVarInt(playerid,"info_depo_0", gettime() + 5);
- }
- //else SetPVarInt(playerid,"info_depo_0", gettime() + 2);
- if(IsPlayerInRangeOfPoint(playerid,1.0,-2275.5374,526.8129,35.1159) && GetPVarInt(playerid, "info_depo_1") <= gettime())
- {
- if( GetPVarInt(playerid,"_depo") == 0 ) ShowPlayerDialog(playerid, DIALOG_DEPO_START, DIALOG_STYLE_INPUT, "{ffff00}Водитель трамвая", "{ffffff}Укажите стоимость проезда {2e9971}(от 0 до 100$){ffffff}:", "Начать", "Отмена");
- SetPVarInt(playerid,"info_depo_1", gettime() + 10);
- }
- //else SetPVarInt(playerid,"info_depo_1", gettime() + 2);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement