Question

Захожу в /fly потом лечу 5-10 сек и замораживает
 

Спойлер

CMD:fly(playerid)
{
    //if(pInfo[playerid][pAdmin] < 3) return 1;
    if(IsAdmin(playerid, 3) || pInfo[playerid][pYouTube] == 1) return 1;
	else if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "[Ошибка] Для начала выйдите из транспорта");
   	if(FlyInfo[playerid][fType] == 1)
		ShowPlayerDialog(playerid, 1312, DIALOG_STYLE_LIST, "{FFCC00}Режим полёта", "- Спавн в текущем места\n- Спавн на месте старта", "Выбрать", "Отмена");
 	else
		SetPlayerCamera(playerid);
 	return 1;
}

case 1312:
		{
	        if(!response) return 1;
	        switch(listitem)
	        {
	            case 0:
	            {
	                SetPVarInt(playerid, "Fly_CurrentPlace", 1);
	                SetPlayerCamera(playerid, 0);
	            }
	            case 1:
	            {
	                SetPVarInt(playerid, "Fly_PlaceLaunch", 1);
	                SetPlayerCamera(playerid, 0);
	            }
	        }
		}

 

Спойлер

stock SetPlayerCamera(playerid, type = 1)
{
	switch(type)
	{
		case 1,2:
		{
			new Float:X, Float:Y, Float:Z, Float:A;
			GetPlayerPos(playerid, X, Y, Z);
			GetPlayerFacingAngle(playerid, A);
			SetPVarInt(playerid, "FlyInt", GetPlayerInterior(playerid));
			SetPVarInt(playerid, "FlyVw", GetPlayerVirtualWorld(playerid));
			SetPVarFloat(playerid, "FlyX", X);
			SetPVarFloat(playerid, "FlyY", Y);
			SetPVarFloat(playerid, "FlyZ", Z);
			SetPVarFloat(playerid, "FlyA", A);
			TogglePlayerSpectating(playerid, 1);
			FlyInfo[playerid][fObject] = CreateDynamicObject(19300, X, Y, Z, 0.0, 0.0, 0.0, .playerid = playerid, .streamdistance = 7000.0, .drawdistance = 7000.0);
			AttachCameraToDynamicObject(playerid, FlyInfo[playerid][fObject]);
			AttachCameraToDynamicObject(playerid, FlyInfo[playerid][fObject]);
			FlyInfo[playerid][fType] = type;
		    FlyInfo[playerid][fDirection] = 0;
		    FlyInfo[playerid][fKeys][0] = 0;
		    FlyInfo[playerid][fKeys][1] = 0;
		    FlyInfo[playerid][fTick] = 0;
		}
	    default:
		{
		    if(GetPVarInt(playerid, "Fly_CurrentPlace"))
			{
			    DeletePVar(playerid, "FlyInt");
				DeletePVar(playerid, "FlyVw");
				DeletePVar(playerid, "FlyX");
				DeletePVar(playerid, "FlyY");
				DeletePVar(playerid, "FlyZ");
				DeletePVar(playerid, "FlyA");
			    new Float:X, Float:Y, Float:Z;
				GetPlayerCameraPos(playerid, X, Y, Z);
				SetPVarInt(playerid, "CurrentFlyInt", GetPlayerInterior(playerid));
				SetPVarInt(playerid, "CurrentFlyVw", GetPlayerVirtualWorld(playerid));
				SetPVarFloat(playerid, "CurrentFlyX", X);
				SetPVarFloat(playerid, "CurrentFlyY", Y);
				SetPVarFloat(playerid, "CurrentFlyZ", Z);
			}
			TogglePlayerSpectating(playerid, 0);
			DestroyDynamicObject(FlyInfo[playerid][fObject]);
		    FlyInfo[playerid][fObject] = INVALID_OBJECT_ID;
			FlyInfo[playerid][fType] = 0;
		}
	}
}

 

 

Edited by mikivtanke

Share this post


Link to post

0 answers to this question

There have been no answers to this question yet

This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By def
      arizona.pwn(23374) : error 012: invalid function call, not a valid address
      arizona.pwn(23374) : error 001: expected token: ";", but found ")"
      arizona.pwn(23374) : error 029: invalid expression, assumed zero
      arizona.pwn(23374) : fatal error 107: too many error messages on one line
      жалуется на данную строчку:
       
      %s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");