Server stop
#1

Hello..I have a server and is on host.I go on a server and after about 8-10 minutes the server stops.In server log in don`t see something wrong..He has not done that before.

What can i do ?
Reply
#2

Someone ? I don`t know what to do...A player entered and the server don`t stop.When i entered me with admin rank,and i typed a command from admin commands server stoped..

Server log with crashdetect :

Код:
[18:17:17] Number of vehicle models: 13
[18:17:17]  
[18:17:17]  ========================================== 
[18:17:17]  |                                        | 
[18:17:17]  |  A new version (v3.09.0684) of YSI is  | 
[18:17:17]  |            available from:             | 
[18:17:17]  |                                        | 
[18:17:17]  |     www.y-less.com/YSI/YSI_1.0.zip     | 
[18:17:17]  |                                        | 
[18:17:17]  | Changelog:                             | 
[18:17:17]  |                                        | 
[18:17:17]  |   3.00.0000:                           | 
[18:17:17]  |                                        | 
[18:17:17]  |   YSI 3.0 released!  Now includes the  | 
[18:17:17]  | "y_text" library for better messages,  | 
[18:17:17]  | and a reworked "y_classes" library.    | 
[18:17:17]  | Largely documented here                | 
[18:17:17]  | "http://forum.sa-mp.com/showthread.php | 
[18:17:17]  | ?t=321092".                            | 
[18:17:17]  |                                        | 
[18:17:17]  |   3.01.0002:                           | 
[18:17:17]  |                                        | 
[18:17:17]  |   Small fixes to "y_text" and          | 
[18:17:17]  | "y_classes".                           | 
[18:17:17]  |                                        | 
[18:17:17]  |   3.09.0684:                           | 
[18:17:17]  |                                        | 
[18:17:17]  |   Reverted to old download location.   | 
[18:17:17]  | Improved (and fixed) version checks;   | 
[18:17:17]  | added y_bitmap, y_areas, y_races,      | 
[18:17:17]  | y_zonenames, better documentation;     | 
[18:17:17]  | MANY other bug fixes - see the github  | 
[18:17:17]  | repository for more details:           | 
[18:17:17]  |                                        | 
[18:17:17]  ========================================== 
[18:17:17]  
[18:17:50] Incoming connection: 151.20.47.35:62182
[18:18:25] Incoming connection: 151.20.47.35:64409
[18:18:25] [join] Curtis_Hallock has joined the server (0:151.20.47.35)
[18:18:49] BAD RCON ATTEMPT BY: 95.37.207.227
[18:21:38] Incoming connection: 5.13.160.67:49654
[18:21:39] [join] Jack_Wendell has joined the server (1:5.13.160.67)
[18:21:45] Character file loaded successfuly.
[18:21:53] [chat] [Jack_Wendell]: s
[18:22:17] [cmd] [Jack Wendell]: /admins
[18:22:20] [cmd] [Curtis Hallock]: /admins
[18:22:34] [nick] Jack_Wendell nick changed to Razvan
[18:22:34] Character file loaded successfuly.
[18:22:34] [cmd] [Razvan]: /aduty
[18:22:34] [cmd] [Curtis Hallock]: /admins
[18:23:10] [debug] Server crashed while executing rc.amx
[18:23:10] [debug] AMX backtrace:
[18:23:10] [debug] #0  0000000c in ?? () from rc.amx
[18:23:10] [debug] #1  0001acc8 in public RL_OnPlayerKeyStateChange () from rc.amx
[18:23:10] [debug] #2  0000af2c in public OnPlayerKeyStateChange () from rc.amx
[18:23:10] [debug] Native backtrace:
[18:23:10] [debug] #0  0029e5f9 in crashdetect::PrintNativeBacktrace () from plugins/crashdetect.so
[18:23:10] [debug] #1  002a0c7c in crashdetect::Crash () from plugins/crashdetect.so
[18:23:10] [debug] #2  002a6123 in ?? () from plugins/crashdetect.so
[18:23:10] [debug] #3  00e67400 in ?? ()
[18:23:10] [debug] #4  002a1022 in crashdetect::HandleAmxExec () from plugins/crashdetect.so
[18:23:10] [debug] #5  002a4d1b in ?? () from plugins/crashdetect.so
[18:23:10] [debug] #6  080d2c02 in ?? () from ./samp03svr
[18:23:10] [debug] #7  002a78af in amx_Exec () from plugins/crashdetect.so
[18:23:10] [debug] #8  002a1022 in crashdetect::HandleAmxExec () from plugins/crashdetect.so
[18:23:10] [debug] #9  002a4d1b in ?? () from plugins/crashdetect.so
[18:23:10] [debug] #10 080ad989 in ?? () from ./samp03svr
[18:23:10] [debug] #11 080c15a5 in ?? () from ./samp03svr
[18:23:10] [debug] #12 080c1f16 in ?? () from ./samp03svr
[18:23:10] [debug] #13 080b3bc8 in ?? () from ./samp03svr
[18:23:10] [debug] #14 080b5aec in ?? () from ./samp03svr
[18:23:10] [debug] #15 080b5bc2 in ?? () from ./samp03svr
[18:23:10] [debug] #16 080b14d3 in ?? () from ./samp03svr
[18:23:10] [debug] #17 0079ed26 in __libc_start_main () from /lib/libc.so.6
[18:23:10] [debug] #18 0804b521 in ?? () from ./samp03svr
Reply
#3

Show your OnPlayerKeyStateChange code.
Reply
#4

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(Holding(KEY_FIRE) || newkeys == KEY_FIRE)
	{
		new Float:fx, Float:fy, Float:fz;
		GetDynamicObjectPos(FireObject, fx, fy, fz);
		GetDynamicObjectPos(FireObject1, fx, fy, fz);
		GetDynamicObjectPos(FireObject2, fx, fy, fz);
		new string[256];
        if(GetPlayerWeapon(playerid) == 42 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 407)
        {
            if(IsPlayerInRangeOfPoint(playerid, 40.0, fx,  fy,  fz))
 	        {
			   	FireHealth -= 1;
				format(string, sizeof(string), "%d/250%", FireHealth);
				Update3DTextLabelText(FireText, COLOR_GREEN, string);
			    if(FireHealth <= 0)
			    {
					DestroyDynamicObject(FireObject);
					DestroyDynamicObject(FireObject1);
					DestroyDynamicObject(FireObject2);
					DestroyDynamicObject(SmokeObject);
					DestroyDynamicObject(SmokeObject1);
					DestroyDynamicObject(SmokeObject2);
					Delete3DTextLabel(FireText);
					FireHealth = 0;
					FireTimer = SetTimer("StartRandomFire", 900000, false);
					format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF} The fire that was started has been successfully put out. Continue with normal duties.");
					foreach(Player, i)
					{
	    				if(IsACop(i) || IsAGov(i) || IsALSEMS(i) || IsASWAT(i) || IsAHSF(i) || IsASATF(i))
	    				{
							SendClientMessage(i, COLOR_DEPTRADIO, string);
	    				}
	    			}
					return 1;
				}
			}
		}
	}
	if(PRESSED(KEY_ANALOG_LEFT))
	{
		new string[128];
		if(!IsACop(playerid) && !IsAFBI(playerid) && !IsAHSF(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an FCSD Oficer/FBI/HSF.");
		format(string, sizeof(string), "[%s %s:o< %s Pull over your vehicle at the right road side]", RPFN(playerid), RPN(playerid), RPFNEx(playerid));
		SendNearbyMessage(playerid, 40, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
		format(string, sizeof(string), "[%s %s:o< %s If you will ignore this, We will arrest you]", RPFN(playerid), RPN(playerid), RPFNEx(playerid));
		SendNearbyMessage(playerid, 40, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
	}
	if(PRESSED(KEY_FIRE))
	{
		if(HazPizza[playerid] == 1)
		    {
                if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
				ClearAnimations(playerid);
				SendClientMessage(playerid, COLOR_GREY,"Info : You have throw your Pizza.");
				HazPizza[playerid] = 0;
			}
	}
	if(PollOn && PollVoted[playerid] == 0)
	{
	    if(newkeys == KEY_YES)
	    {
        PollY++;
        PollVoted[playerid] = 1;
        SendClientMessage(playerid, COLOR_GREY, "You Have Voted Yes.");
		}
	    if(newkeys == KEY_NO)
	    {
	    PollN++;
	    PollVoted[playerid] = 1;
	    SendClientMessage(playerid, COLOR_GREY, "You Have Voted No.");
	    }
	}
/*	if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SECONDARY_ATTACK)
	{
	    new Float:pos[3];
	    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
	    if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555)    // He is using the elevator button
	        ShowElevatorDialog(playerid);
		else    // Is he in a floor button?
		{
		    if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902)
		    {
		        // He is most likely using it, check floor:
				new i=20;
				while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)
				    i --;

				if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0)
				    i = -1;

				if(i <= 19)
				{
					CallElevator(playerid, i + 1);
					GameTextForPlayer(playerid, "~r~Elevator called", 3500, 4);
				}
		    }
		}
	}*/
	if (((newkeys & KEY_WALK && newkeys & KEY_UP) || (newkeys & KEY_WALK && newkeys & KEY_DOWN) || (newkeys & KEY_WALK && newkeys & KEY_LEFT) || (newkeys & KEY_WALK && newkeys & KEY_RIGHT))
		|| ((oldkeys & KEY_WALK && newkeys & KEY_UP) || (oldkeys & KEY_WALK && newkeys & KEY_DOWN) || (oldkeys & KEY_WALK && newkeys & KEY_LEFT) || (oldkeys & KEY_WALK && newkeys & KEY_RIGHT))
		|| ((newkeys & KEY_WALK && oldkeys & KEY_UP) || (newkeys & KEY_WALK && oldkeys & KEY_DOWN) || (newkeys & KEY_WALK && oldkeys & KEY_LEFT) || (newkeys & KEY_WALK && oldkeys & KEY_RIGHT))
		&& GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
			walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
	}
	if(newkeys & KEY_FIRE)
	{
	    if(SpeedHack[playerid] == 1)
	    {
	        SetVehicleForwardVelocity(GetPlayerVehicleID(playerid), 0.7, 0.0);
	        return 1;
		}
	}
	if(newkeys == KEY_ACTION)
	{
	    if(!IsPlayerInAnyVehicle(playerid)) return 0;
     	if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
   		new veh = GetPlayerVehicleID(playerid);
		if(IsAVel(veh)) return 0;
		if(WaitForBuf[playerid])
		{
			SendClientMessage(playerid,0xFF0000FF,"* You can change radiostation after 5 seconds.");
			return 0;
		}
		VehRadio[veh]++;
		if(VehRadio[veh] == NumOfRadio+1) VehRadio[veh] = 0;
		PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
		for(new s = 1; s < 8; s++)
		{
			if(PassengerInCar[veh][s] != INVALID_PLAYER_ID && !WaitForBuf[PassengerInCar[veh][s]]) PlayVehicleRadioForPlayer(PassengerInCar[veh][s],VehRadio[veh]);
		}
	}
	if(newkeys == 132)
	{
	    if(!IsPlayerInAnyVehicle(playerid)) return 0;
     	if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
   		new veh = GetPlayerVehicleID(playerid);
		if(IsAVel(veh)) return 0;
		if(WaitForBuf[playerid])
		{
			SendClientMessage(playerid,0xFF0000FF,"* You can change radiostation after 5 seconds.");
			return 0;
		}
		VehRadio[veh]--;
		if(VehRadio[veh] == -1) VehRadio[veh] = NumOfRadio;
		PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
		for(new s = 1; s < 8; s++)
		{
			if(PassengerInCar[veh][s] != INVALID_PLAYER_ID && !WaitForBuf[PassengerInCar[veh][s]]) PlayVehicleRadioForPlayer(PassengerInCar[veh][s],VehRadio[veh]);
		}
	}
    if(gPlayerUsingLoopingAnim[playerid])
	{
		if(IsKeyJustDown(KEY_SPRINT,newkeys,oldkeys))
		{
			StopLoopingAnim(playerid);
			TextDrawHideForPlayer(playerid,txtAnimHelper);
			animation[playerid] = 0;
			ClearAnimations(playerid);
			return 1;
		}
	}
	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
	{
	    if(newkeys == KEY_FIRE)
	    {
			if(!NoSprunk[playerid])
			{
			    new Float:H;
			    GetPlayerHealth(playerid, H);
			    SetPlayerHealth(playerid, H+5);
				GetPlayerHealth(playerid, H);
				if(H > 100) SetPlayerHealth(playerid, 100);
				NoSprunk[playerid] = 1;
				SetTimerEx("SprunkTimer", 1800, false, "d", playerid);
			}

		}
	}

	// Exit "F"
/*	if(newkeys & KEY_FIRE)
	{
		new done, string[128];
	    for(new idx=0; idx<MAX_DOORS; idx++) // Dynamic Doors
		{
		    if(!done && IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dIX], DoorInfo[idx][dIY], DoorInfo[idx][dIZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[idx][dIVW] && GetPlayerInterior(playerid) == DoorInfo[idx][dIInt])
		    {
		        if(BankRobber[playerid] && BankBlock && GetPlayerInterior(playerid) == 83 && GetPlayerVirtualWorld(playerid) == 8473)
		        {
		       	    new Rob = BankRobber[playerid]-1;
				    DisablePlayerCheckpoint(playerid);
					BankRobbersCount --;
					format(BankRobbers[Rob], MAX_PLAYER_NAME, "");
					DeliverMoney[playerid] = 0;
					//
					foreach(Player, i)
					{
					    if(BankRobber[i] || PlayerInfo[i][pFac] == 1)
					    {
							if(Rob == 0) TextDrawHideForPlayer(i, Textdraw1);
							else if(Rob == 1) TextDrawHideForPlayer(i, Textdraw2);
							else if(Rob == 2) TextDrawHideForPlayer(i, Textdraw3);
							else if(Rob == 3) TextDrawHideForPlayer(i, Textdraw4);
							else if(Rob == 4) TextDrawHideForPlayer(i, Textdraw5);
						}
					}
					format(string, sizeof(string), "** %s has went out of the bank before loading money and has failed the robbery. **", RPN(playerid));
					SendRobberyMessage(COLOR_LIGHTRED, string);
					SendCopMessage(COLOR_LIGHTRED, string);
					BankRobber[playerid] = 0;
					if(BankRobbersCount == 0)
					{
						TextDrawHideForAll(Area5);
						TextDrawHideForAll(Textdraw1);
						TextDrawHideForAll(Textdraw2);
						TextDrawHideForAll(Textdraw3);
						TextDrawHideForAll(Textdraw4);
						TextDrawHideForAll(Textdraw5);
						BankRobbery = 0;
						RobberyStarted = 0;
						format(string, sizeof(string), "** The bank robbery has ended, $%d were stolen and $%d were saved. **", TotalStolen*50000, (TotalRobbers*50000-(TotalStolen*50000)));
						SendClientMessageToAll(COLOR_YELLOW, string);
						TotalRobbers = 0;
						new copsonline;
						foreach(Player, i)
						{
						    if(IsACop(i)) copsonline++;
						}
						foreach(Player, i)
						{
						    if(IsACop(i))
						    {
								new Saved = (TotalRobbers*500000-(TotalStolen*500000));
								GiveZaiatMoney(i, Saved/copsonline);
								format(string, sizeof(string), "** You have received your cut from the saved money. ($%d)", Saved/copsonline);
								SendClientMessage(i, COLOR_LIME, string);
						    }
						}
					}
		            return 1;
		        }
		        if(DoorInfo[idx][dCExt])
		        {
		            GameTextForPlayer(playerid, "~w~Loading Objects", 3500, 3);
					TogglePlayerControllable(playerid, 0);
		            SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
		            PlayerInfo[playerid][pSpawnFreeze] = 1;
		        }
		        PlayerInfo[playerid][pSpawnFreeze] = 0;
		        SetPlayerInterior(playerid, DoorInfo[idx][dOInt]);
		        SetPlayerVirtualWorld(playerid, DoorInfo[idx][dOVW]);
		        SetPlayerFacingAngle(playerid, DoorInfo[idx][dOA]);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerPos(playerid, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]);
		        done = 1;
		    }
		}
		if(IsPlayerInRangeOfPoint(playerid, 2, 243.9951,304.9418,999.1484) || IsPlayerInRangeOfPoint(playerid, 2, 2259.6702,-1135.8542,1050.6328) || IsPlayerInRangeOfPoint(playerid, 2, 2308.8254,-1212.8070,1049.0234) || IsPlayerInRangeOfPoint(playerid, 2, 260.7436,1237.5563,1084.2578)
		|| IsPlayerInRangeOfPoint(playerid, 2, -42.5742,1405.6521,1084.4297) || IsPlayerInRangeOfPoint(playerid, 2, 2468.6787,-1698.2617,1013.5078) || IsPlayerInRangeOfPoint(playerid, 2, 2365.2183,-1135.4014,1050.8750) || IsPlayerInRangeOfPoint(playerid, 2, 2270.1270,-1210.4855,1047.5625)
		|| IsPlayerInRangeOfPoint(playerid, 2, 2324.4424,-1149.2057,1050.7101) || IsPlayerInRangeOfPoint(playerid, 2, 83.0863,1322.3020,1083.8662)) // Houses
		{
		    new idx;
			idx = GetPlayerVirtualWorld(playerid)-500;
			if(!done && idx < MAX_HOUSES && HouseInfo[idx][hLevel])
			{
				format(string, sizeof(string), "* %s pushes the door and exits the house.", RPN(playerid));
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		        SetPlayerPos(playerid, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ]);
		        SetPlayerInterior(playerid, 0);
		        SetPlayerVirtualWorld(playerid, 0);
		        done = 1;
	        }
		}
	    if(IsPlayerInRangeOfPoint(playerid, 2, -27.3025,-57.6649,1003.5469) || IsPlayerInRangeOfPoint(playerid, 2, 207.0638,-139.9965,1003.5078) || IsPlayerInRangeOfPoint(playerid, 2, 285.8044,-85.9956,1001.5229) || IsPlayerInRangeOfPoint(playerid, 2, 493.4252,-24.3061,1000.6797) || IsPlayerInRangeOfPoint(playerid, 2, 834.1631,7.4883,1004.1797) || IsPlayerInRangeOfPoint(playerid, 2, 372.3830,-133.2579,1001.4922)) // 24/7 || Clothes Shop || Ammunation || Club || Advertisement Agency || FastFood
		{
		    new idx;
			idx = GetPlayerVirtualWorld(playerid)-100;
			if(!done && idx < MAX_BIZ && BizInfo[idx][bType])
			{
				format(string, sizeof(string), "* %s pushes the door and exits the shop.", RPN(playerid));
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		        SetPlayerPos(playerid, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]);
		        SetPlayerInterior(playerid, 0);
		        SetPlayerVirtualWorld(playerid, 0);
	        }
	        done = 1;
		}
		return 1;
	}*/
	// Exit "F"

	if(newkeys & KEY_CROUCH)
	{
	    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
		if(IsALSEMS(playerid) && IsPlayerInRangeOfPoint(playerid, 15, 1811.59, -1795.36, 13.87)) // LSEMS Barrier
		{
			if(!LSEMSBarrierStatus)
			{
				LSEMSBarrierStatus = 1;
				MoveObject(fdgate1,1811.59, -1782.96, 13.87,5);
				MoveObject(fdgate2,1811.59, -1808.19, 13.87,5);
			}
			else
			{
				LSEMSBarrierStatus = 0;
				MoveObject(fdgate1,1811.59, -1791.36, 13.87, 2.5);
				MoveObject(fdgate2,1811.59, -1799.77, 13.87, 2.5);
			}
			return 1;
		}
		if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1544.7363,-1627.0232,13.3672)) // FCSD Barrier
		{
		    if(!FCSDBarrierStatus)
		    {
		        FCSDBarrierStatus = 1;
		        MoveDynamicObject(FCSDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646+0.0001, 0.0002, 0, 0, 90);
		    }
		    else
		    {
		        FCSDBarrierStatus = 0;
		        MoveDynamicObject(FCSDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646-0.0001, 0.0003, 0, 90, 90);
		    }
		    return 1;
		}
		else if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7, 1588.4501,-1638.5692,13.3672)) // FCSD Gate
		{
		   	if(!FCSDGateStatus)
		    {
		        FCSDGateStatus = 1;
		        MoveDynamicObject(FCSDGate, 1588.6501464844, -1638.0750732422, 6.2343215942383, 3);
		    }
		    else
		    {
		        FCSDGateStatus = 0;
		        MoveDynamicObject(FCSDGate, 1588.6428222656, -1638.02734375, 15.240161895752, 3);
		    }
		    return 1;
		}
		else if(IsAReporter(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 778.0338,-1385.0182,13.7254)) // NA Gate 1
		{
		    if(!SAGateStatus1)
		    {
		        SAGateStatus1 = 1;
		        MoveDynamicObject(SAGate1, 770.497985, -1384.939453, 14.392275, 3);
		    }
		    else
		    {
		        SAGateStatus1 = 0;
		        MoveDynamicObject(SAGate1, 777.457580, -1384.939453, 14.392275, 3);
		    }
		}
		else if(IsAReporter(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 777.5819,-1330.1381,13.5500)) // NA Gate 2
		{
		    if(!SAGateStatus2)
		    {
		        SAGateStatus2 = 1;
		        MoveDynamicObject(SAGate2, 783.026306, -1330.353393, 14.167037, 3);
		    }
		    else
		    {
		        SAGateStatus2 = 0;
		        MoveDynamicObject(SAGate2, 778.548583, -1330.212890, 14.167037, 3);
		    }
		}
		return 1;
	}

	if(newkeys & KEY_SUBMISSION) // New Engine HotKey
	{
	    new engine, lights, alarm, doors, bonnet, boot, objective, vehicleid, string[128];
	   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
		if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle.");
		if(vehicleid == 509 || vehicleid == 481 || vehicleid == 510) return SendClientMessage(playerid, COLOR_GREY, "Bicycles have no engine.");
		vehicleid = GetPlayerVehicleID(playerid);
		GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
		if(!engine)
		{
		    SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
		    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh])
		    {SetVehicleParamsEx(vehicleid, 1, lights, alarm, PlayerInfo[playerid][vLocked], bonnet, boot, objective);}
		    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVVeh])
		    {SetVehicleParamsEx(vehicleid, 1, lights, alarm, PlayerInfo[playerid][vVLocked], bonnet, boot, objective);}
  		    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pBVeh])
		    {SetVehicleParamsEx(vehicleid, 1, lights, alarm, PlayerInfo[playerid][vBLocked], bonnet, boot, objective);}
	 		format(string, sizeof(string), "* %s rasuceste de chei cu scopul de a porni motorul.", RPN(playerid));
			if(PlayerInfo[playerid][pMaskOn] == 1)
			{
		        format(string, sizeof(string), "* Masca porneste motorul vehiculului");
			}
			else
			{
				format(string, sizeof(string), "* %s rasuceste de chei cu scopul de a porni motorul", RPN(playerid));
			}
	 		SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		}
		else
		{
		    SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
		    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh])
		    {SetVehicleParamsEx(vehicleid, 0, lights, alarm, PlayerInfo[playerid][vLocked], bonnet, boot, objective);}
		    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVVeh])
		    {SetVehicleParamsEx(vehicleid, 0, lights, alarm, PlayerInfo[playerid][vVLocked], bonnet, boot, objective);}
  		    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pBVeh])
		    {SetVehicleParamsEx(vehicleid, 0, lights, alarm, PlayerInfo[playerid][vBLocked], bonnet, boot, objective);}
		    format(string, sizeof(string), "* %s opreste motorul vehiculului", RPN(playerid));
	 		if(PlayerInfo[playerid][pMaskOn] == 1)
			{
		        format(string, sizeof(string), "* Stranger turns the vehicle's engine off.");
			}
			else
			{
				format(string, sizeof(string), "* %s rasuceste de chei cu scopul de a opri motorul.", RPN(playerid));
			}
	 		SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		}
		return 1;
	}

	// Enter "F"
	if(newkeys & KEY_SECONDARY_ATTACK)
	{
		new done;
		new string[128];
		if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
		for(new idx=0; idx<MAX_DOORS; idx++) // Dynamic Doors
		{
		    if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]))
		    {
		        if(DoorInfo[idx][dIInt] == 83 && DoorInfo[idx][dIVW] == 8473 && BankBlock)
		        {
		            SendClientMessage(playerid, COLOR_GREY, "You can't enter the bank as it is being robbed at the moment.");
		            return 1;
		        }
		        if(DoorInfo[idx][dCInt])
		        {
		            GameTextForPlayer(playerid, "~w~Loading Objects", 3500, 3);
					TogglePlayerControllable(playerid, 0);
		            SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
		            PlayerInfo[playerid][pSpawnFreeze] = 1;
		        }
		        PlayerInfo[playerid][pSpawnFreeze] = 0;
		        SetPlayerInterior(playerid, DoorInfo[idx][dIInt]);
		        SetPlayerVirtualWorld(playerid, DoorInfo[idx][dIVW]);
		        SetPlayerFacingAngle(playerid, DoorInfo[idx][dIA]);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerPos(playerid, DoorInfo[idx][dIX], DoorInfo[idx][dIY], DoorInfo[idx][dIZ]);
		        return 1;
		    }
		}
		for(new idx=1; idx<MAX_BIZ; idx++)
		{
			if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]))
			{
			    if(!BizInfo[idx][bStatus] && PlayerInfo[playerid][pBiz] != idx && !PlayerInfo[playerid][pVBiz]) return SendClientMessage(playerid, COLOR_GREY, "This business is closed.");
			    if(BizInfo[idx][bType] == 1) // 24/7 Business
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, -27.3025,-57.6649,1003.5469);
			        SetPlayerFacingAngle(playerid, 357.5915);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 6);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's 24/7 Market (( /list & /buy )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 2) // Clothes Shop Business
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
	 				if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 207.0638,-139.9965,1003.5078);
			        SetPlayerFacingAngle(playerid, 356.3849);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 3);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Clothes Shop (( /buyclothes(old) & /buytoys )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 3) // Ammunation Business
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 285.8044,-85.9956,1001.5229);
			        SetPlayerFacingAngle(playerid, 358.9898);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 4);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Ammunation (( /list & /buy /buyweapon )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 4) // Club Business
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 493.4252,-24.3061,1000.6797);
			        SetPlayerFacingAngle(playerid, 0.2432);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 17);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Club (( /list & /buy )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 5) // Advertisement Agency
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 834.1631,7.4883,1004.1797);
			        SetPlayerFacingAngle(playerid, 86.7239);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 3);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Advertisement Agency (( /ad )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 6) // Fast Food
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the shop.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 372.3830,-133.2579,1001.4922);
			        SetPlayerFacingAngle(playerid, 0.4216);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 5);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Fast Food (( /list /buy )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			    else if(BizInfo[idx][bType] == 7) // Casino
			    {
			        format(string, sizeof(string), "* %s pushes the door and enters the casino.", RPN(playerid));
					if(PlayerInfo[playerid][pMaskOn] == 1)
					{
				        format(string, sizeof(string), "* Stranger pushes the door and enters the casino.");
					}
					else
					{
						format(string, sizeof(string), "* %s pushes the door and enters the casino.", RPN(playerid));
					}
					SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
			        SetPlayerPos(playerid, 2233.8032,1712.2303,1011.7632);
			        SetPlayerFacingAngle(playerid, 0.4216);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 1);
			        SetPlayerVirtualWorld(playerid, idx+100);
			        format(string, sizeof(string), "** Welcome to %s's Casino (( /list /buy )) **", BizInfo[idx][bOwner]);
			        SendClientMessage(playerid, COLOR_ORANGE, string);
			        return 1;
			    }
			}
		}
		for(new idx=1; idx<MAX_HOUSES; idx++) // Dynamic Houses
		{
			if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ]))
		    {
			    if(!HouseInfo[idx][hStatus] && PlayerInfo[playerid][pHouse] != idx && PlayerInfo[playerid][pVHouse] != idx) return SendClientMessage(playerid, COLOR_GREY, "This house is locked.");
		        format(string, sizeof(string), "* %s pushes the door and enters the house.", RPN(playerid));
				if(PlayerInfo[playerid][pMaskOn] == 1)
				{
				   format(string, sizeof(string), "* Stranger pushes the door and enters the house.");
				}
				else
				{
					format(string, sizeof(string), "* %s pushes the door and enters the house.", RPN(playerid));
				}
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		        SetPlayerVirtualWorld(playerid, idx+500);
				if(HouseInfo[idx][hLevel] == 1)
				{
					SetPlayerPos(playerid, 243.9951,304.9418,999.1484);
			        SetPlayerFacingAngle(playerid, 267.0980);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 1);
				}
				else if(HouseInfo[idx][hLevel] == 2)
				{
					SetPlayerPos(playerid, 2259.6702,-1135.8542,1050.6328);
			        SetPlayerFacingAngle(playerid, 267.3974);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 10);
				}
				else if(HouseInfo[idx][hLevel] == 3)
				{
					SetPlayerPos(playerid, 2308.8254,-1212.8070,1049.0234);
			        SetPlayerFacingAngle(playerid, 359.8550);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 6);
				}
				else if(HouseInfo[idx][hLevel] == 4)
				{
					SetPlayerPos(playerid, 260.7436,1237.5563,1084.2578);
			        SetPlayerFacingAngle(playerid, 1.6415);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 9);
				}
				else if(HouseInfo[idx][hLevel] == 5)
				{
					SetPlayerPos(playerid, -42.5742,1405.6521,1084.4297);
			        SetPlayerFacingAngle(playerid, 359.1347);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 8);
				}
				else if(HouseInfo[idx][hLevel] == 6)
				{
					SetPlayerPos(playerid, 2468.6787,-1698.2617,1013.5078);
			        SetPlayerFacingAngle(playerid, 89.1791);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 2);
				}
				else if(HouseInfo[idx][hLevel] == 7)
				{
					SetPlayerPos(playerid, 2365.2183,-1135.4014,1050.8750);
			        SetPlayerFacingAngle(playerid, 359.8550);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 8);
				}
				else if(HouseInfo[idx][hLevel] == 8)
				{
					SetPlayerPos(playerid, 2270.1270,-1210.4855,1047.5625);
			        SetPlayerFacingAngle(playerid, 89.4224);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 10);
				}
				else if(HouseInfo[idx][hLevel] == 9)
				{
					SetPlayerPos(playerid, 2324.4424,-1149.2057,1050.7101);
			        SetPlayerFacingAngle(playerid, 0.7248);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 12);
				}
				else if(HouseInfo[idx][hLevel] == 10)
				{
					SetPlayerPos(playerid, 83.0863,1322.3020,1083.8662);
			        SetPlayerFacingAngle(playerid, 359.5183);
			        SetCameraBehindPlayer(playerid);
			        SetPlayerInterior(playerid, 9);
				}
				else if(HouseInfo[idx][hLevel] == 11)
				{
					SetPlayerPos(playerid, 1327.1052,-1071.0226,3458.9060);
					SetPlayerFacingAngle(playerid, 359.5183);
					SetCameraBehindPlayer(playerid);
					SetPlayerInterior(playerid, 0);
					GameTextForPlayer(playerid, "~w~Loading Objects", 3500, 3);
					TogglePlayerControllable(playerid, 0);
					SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
					PlayerInfo[playerid][pSpawnFreeze] = 1;
				}
			}
		}
	    for(new idx=0; idx<MAX_DOORS; idx++) // Dynamic Doors
		{
		    if(!done && IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dIX], DoorInfo[idx][dIY], DoorInfo[idx][dIZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[idx][dIVW] && GetPlayerInterior(playerid) == DoorInfo[idx][dIInt])
		    {
		        if(BankRobber[playerid] && BankBlock && GetPlayerInterior(playerid) == 83 && GetPlayerVirtualWorld(playerid) == 8473)
		        {
		       	    new Rob = BankRobber[playerid]-1;
				    DisablePlayerCheckpoint(playerid);
					BankRobbersCount --;
					format(BankRobbers[Rob], MAX_PLAYER_NAME, "");
					DeliverMoney[playerid] = 0;
					//
					foreach(Player, i)
					{
					    if(BankRobber[i] || PlayerInfo[i][pFac] == 1)
					    {
							if(Rob == 0) TextDrawHideForPlayer(i, Textdraw1);
							else if(Rob == 1) TextDrawHideForPlayer(i, Textdraw2);
							else if(Rob == 2) TextDrawHideForPlayer(i, Textdraw3);
							else if(Rob == 3) TextDrawHideForPlayer(i, Textdraw4);
							else if(Rob == 4) TextDrawHideForPlayer(i, Textdraw5);
						}
					}
					format(string, sizeof(string), "** %s has went out of the bank before loading money and has failed the robbery. **", RPN(playerid));
					SendRobberyMessage(COLOR_LIGHTRED, string);
					SendCopMessage(COLOR_LIGHTRED, string);
					SendFBIMessage(COLOR_LIGHTRED, string);
					BankRobber[playerid] = 0;
					if(BankRobbersCount == 0)
					{
						TextDrawHideForAll(Area5);
						TextDrawHideForAll(Textdraw1);
						TextDrawHideForAll(Textdraw2);
						TextDrawHideForAll(Textdraw3);
						TextDrawHideForAll(Textdraw4);
						TextDrawHideForAll(Textdraw5);
						BankRobbery = 0;
						RobberyStarted = 0;
						format(string, sizeof(string), "** The bank robbery has ended, $%d were stolen and $%d were saved. **", TotalStolen*50000, (TotalRobbers*50000-(TotalStolen*50000)));
						SendClientMessageToAll(COLOR_YELLOW, string);
						TotalRobbers = 0;
						new copsonline;
						foreach(Player, i)
						{
						    if(IsACop(i)) copsonline++;
						    if(IsAHSF(i)) copsonline++;
						    if(IsAFBI(i)) copsonline++;
						}
						foreach(Player, i)
						{
						    if(IsACop(i))
						    {
								new Saved = (TotalRobbers*50000-(TotalStolen*50000));
								GiveZaiatMoney(i, Saved/copsonline);
								format(string, sizeof(string), "** You have received your cut from the saved money. ($%d)", Saved/copsonline);
								SendClientMessage(i, COLOR_LIME, string);
						    }
						}
					}
		            return 1;
		        }
		        if(DoorInfo[idx][dCExt])
		        {
		            GameTextForPlayer(playerid, "~w~Loading Objects", 3500, 3);
					TogglePlayerControllable(playerid, 0);
		            SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
		            PlayerInfo[playerid][pSpawnFreeze] = 1;
		        }
		        PlayerInfo[playerid][pSpawnFreeze] = 0;
		        SetPlayerInterior(playerid, DoorInfo[idx][dOInt]);
		        SetPlayerVirtualWorld(playerid, DoorInfo[idx][dOVW]);
		        SetPlayerFacingAngle(playerid, DoorInfo[idx][dOA]);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerPos(playerid, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]);
		        done = 1;
		    }
		}
		if(IsPlayerInRangeOfPoint(playerid, 2, 243.9951,304.9418,999.1484) || IsPlayerInRangeOfPoint(playerid, 2, 2259.6702,-1135.8542,1050.6328) || IsPlayerInRangeOfPoint(playerid, 2, 2308.8254,-1212.8070,1049.0234) || IsPlayerInRangeOfPoint(playerid, 2, 260.7436,1237.5563,1084.2578)
		|| IsPlayerInRangeOfPoint(playerid, 2, -42.5742,1405.6521,1084.4297) || IsPlayerInRangeOfPoint(playerid, 2, 2468.6787,-1698.2617,1013.5078) || IsPlayerInRangeOfPoint(playerid, 2, 2365.2183,-1135.4014,1050.8750) || IsPlayerInRangeOfPoint(playerid, 2, 2270.1270,-1210.4855,1047.5625)
		|| IsPlayerInRangeOfPoint(playerid, 2, 2324.4424,-1149.2057,1050.7101) || IsPlayerInRangeOfPoint(playerid, 2, 83.0863,1322.3020,1083.8662) ||  IsPlayerInRangeOfPoint(playerid, 2, 1327.1052,-1071.0226,3458.9060)) // Houses
		{
		    new idx;
			idx = GetPlayerVirtualWorld(playerid)-500;
			if(!done && idx < MAX_HOUSES && HouseInfo[idx][hLevel])
			{
				format(string, sizeof(string), "* %s pushes the door and exits the house.", RPN(playerid));
			 	if(PlayerInfo[playerid][pMaskOn] == 1)
				{
			        format(string, sizeof(string), "* Stranger pushes the door and exits the house.");
				}
				else
				{
					format(string, sizeof(string), "* %s pushes the door and exits the house.", RPN(playerid));
				}
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		        SetPlayerPos(playerid, HouseInfo[idx][hX], HouseInfo[idx][hY], HouseInfo[idx][hZ]);
		        SetPlayerInterior(playerid, 0);
		        SetPlayerVirtualWorld(playerid, 0);
		        done = 1;
	        }
		}
	    if(IsPlayerInRangeOfPoint(playerid, 5, 2233.8032,1712.2303,1011.7632) || IsPlayerInRangeOfPoint(playerid, 2, -27.3025,-57.6649,1003.5469) || IsPlayerInRangeOfPoint(playerid, 2, 207.0638,-139.9965,1003.5078) || IsPlayerInRangeOfPoint(playerid, 2, 285.8044,-85.9956,1001.5229) || IsPlayerInRangeOfPoint(playerid, 2, 493.4252,-24.3061,1000.6797) || IsPlayerInRangeOfPoint(playerid, 2, 834.1631,7.4883,1004.1797) || IsPlayerInRangeOfPoint(playerid, 2, 372.3830,-133.2579,1001.4922))
		{
			new idx;
			idx = GetPlayerVirtualWorld(playerid)-100;
			if(!done && idx < MAX_BIZ && BizInfo[idx][bType])
			{
				if(BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ])
				{
					idx = GetPlayerVirtualWorld(playerid)-100;
					if(!done && idx < MAX_BIZ && BizInfo[idx][bType])
					{
						if (g_remainingRobTicks[playerid])
						{
							SendClientMessage(playerid, COLOR_GREY, "You failed the robbery.");
							DestroyObject(g_robbizBag[playerid]);
							DisablePlayerCheckpoint(playerid);
							g_apprehendedCash[playerid] = 0;
							g_remainingRobTicks[playerid] = 0;
							g_bIsRobbiz[playerid] = false;
							SendCopMessage(COLOR_BLUE, "The business robbery has been failed, Back to normal duties");
							SendFBIMessage(COLOR_BLUE, "The business robbery has been failed, Back to normal duties");
							SendHSFMessage(COLOR_BLUE, "The business robbery has been failed, Back to normal duties");
							SendSWATMessage(COLOR_BLUE, "The business robbery has been failed, Back to normal duties");
							SendSATFMessage(COLOR_BLUE, "The business robbery has been failed, Back to normal duties");
						}
						SetPlayerPos(playerid, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]);
						SetPlayerInterior(playerid, 0);
						SetPlayerVirtualWorld(playerid, 0);
					}
					done = 1;
					return 1;
				}
				format(string, sizeof(string), "* %s pushes the door and exits the shop.", RPN(playerid));
				if(PlayerInfo[playerid][pMaskOn] == 1)
				{
					format(string, sizeof(string), "* Stranger pushes the door and exits the shop.");
				}
				else
				{
					format(string, sizeof(string), "* %s pushes the door and exits the shop.", RPN(playerid));
				}
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
				SetPlayerPos(playerid, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]);
				SetPlayerInterior(playerid, 0);
				SetPlayerVirtualWorld(playerid, 0);
			}
			done = 1;
		}
		// Bank
        if(IsPlayerInSphere(playerid, -180.9258, 1132.7721, 19.7422, 5))
        {
            SetPlayerPos(playerid, 319.6804,1852.7080,1613.3672);
            SetPlayerFacingAngle(playerid, 91.7607);
        }
        else if(IsPlayerInSphere(playerid, 319.6804, 1852.7080, 1613.3672, 5))
        {
            SetPlayerPos(playerid, -180.9258,1132.7721,19.7422);
            SetPlayerFacingAngle(playerid, 94.2908);
        }
        // Police
        if(IsPlayerInSphere(playerid, 627.7947,-571.4331,17.5366, 5))
        {
            SetPlayerPos(playerid, 254.2448,1459.5632,-8.3811);
            SetPlayerFacingAngle(playerid, 181.3984);
        }
        else if(IsPlayerInSphere(playerid, 254.2448, 1459.5632, -8.3811, 5))
        {
            SetPlayerPos(playerid, 627.7947,-571.4331,17.5366);
            SetPlayerFacingAngle(playerid, 20.6802);
        }
        // NEWS
        if(IsPlayerInSphere(playerid, 1373.4237, 405.2043, 18.6375))
        {
            SetPlayerPos(playerid, 356.41919, 1768.12280, 2017.28259);
            SetPlayerFacingAngle(playerid, 0.0);
        }
        else if(IsPlayerInSphere(playerid, 356.41919, 1768.12280, 2017.28259, 5))
        {
            SetPlayerPos(playerid, 1373.4237, 405.2043, 18.6375);
            SetPlayerFacingAngle(playerid, 0.0);
        }
        // DMV
        if(IsPlayerInSphere(playerid, -144.9055, 1079.3195, 20.4922, 5))
        {
            SetPlayerPos(playerid, 186.8596,1740.3788,4.7413);
            SetPlayerFacingAngle(playerid, 273.0641);
        }
        else if(IsPlayerInSphere(playerid, 186.8596, 1740.3788, 4.7413, 5))
        {
            SetPlayerPos(playerid, -144.9055,1079.3195,20.4922);
            SetPlayerFacingAngle(playerid, 4.5817);
        }
        // FBI
        if(IsPlayerInSphere(playerid, -550.0488, 2593.4856, 53.6378, 5))
        {
            SetPlayerPos(playerid, -520.6399, 2595.2864, 20.1165);
            SetPlayerFacingAngle(playerid, 0.0641);
        }
        else if(IsPlayerInSphere(playerid, -520.6399, 2595.2864, 20.1165, 5))
        {
            SetPlayerPos(playerid, -550.0488, 2593.4856, 53.6378);
            SetPlayerFacingAngle(playerid, 0.5817);
        }
        // Hospital
        if(IsPlayerInSphere(playerid, 1240.9757, 326.3124, 19.4375, 5))
        {
            SetPlayerPos(playerid, 1245.8932,324.6824,-11.7422);
            SetPlayerFacingAngle(playerid, 156.4026);
        }
        else if((playerid, 1245.8932,324.6824,-11.7422, 5))
        {
            SetPlayerPos(playerid, 1240.9757, 326.3124, 19.4375);
            SetPlayerFacingAngle(playerid, 6.9412);
        }
        return 1;
    }
	// Enter "F"
	if((newkeys & KEY_FIRE) && (oldkeys & KEY_CROUCH) && !((oldkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) || (oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ) {
        switch(GetPlayerWeapon(playerid)) {
		    case 23..25, 27, 29..34, 41: {
		        if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid)) {
					OnPlayerCBug(playerid);
				}
				return 1;
			}
		}
	}

	if(CheckCrouch[playerid] == 1) {
		switch(WeaponID[playerid]) {
		    case 23..25, 27, 29..34, 41: {
		    	if((newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK ) {
		    		if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid)) {
						OnPlayerCBug(playerid);
					}
		    	}
		    }
		}
	}

	//if(newkeys & KEY_CROUCH || (oldkeys & KEY_CROUCH)) return 1;

	else if(((newkeys & KEY_FIRE) && (newkeys & KEY_HANDBRAKE) && !((newkeys & KEY_SPRINT) || (newkeys & KEY_JUMP))) ||
	(newkeys & KEY_FIRE) && !((newkeys & KEY_SPRINT) || (newkeys & KEY_JUMP)) ||
	(NotMoving[playerid] && (newkeys & KEY_FIRE) && (newkeys & KEY_HANDBRAKE)) ||
	(NotMoving[playerid] && (newkeys & KEY_FIRE)) ||
	(newkeys & KEY_FIRE) && (oldkeys & KEY_CROUCH) && !((oldkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ||
	(oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH) && !((newkeys & KEY_FIRE) || (newkeys & KEY_HANDBRAKE)) ) {
		SetTimerEx("CrouchCheck", 3000, 0, "d", playerid);
		CheckCrouch[playerid] = 1;
		WeaponID[playerid] = GetPlayerWeapon(playerid);
		Ammo[playerid][GetPlayerWeapon(playerid)] = GetPlayerAmmo(playerid);
		return 1;
	}
	return 1;
}
Reply
#5

Anyone ?
Reply
#6

Compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
Reply
#7

Same problem...I need to open server in 2 day`s and players can`t play on server 2 minutes...Because server stops when i enter on server..Why
Reply
#8

Anybody ?
Reply
#9

Did you even bother to look at the debug information? Also, please stop bumping your topics after a few hours or even 10 minutes. You need to wait at least 24 hours. You're really not that important.
Reply
#10

Quote:
Originally Posted by OnY
Посмотреть сообщение
Same problem...I need to open server in 2 day`s and players can`t play on server 2 minutes...Because server stops when i enter on server..Why
Did you call it "same problem"? It printed the lines caused the runtime error.

In rc.pwn:

Line 41921
Inside IsTruckerVehicle (probably a loop caused it).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)