Question

Вроде все проверил, но все равно warning. 
warning 217: loose indentation 

Строка:

if(GetPVarType(playerid, "FlyMode"))


Код:

CMD:afly(playerid,params[])
{
    if(PI[playerid][pAdmin] < 1) return 1;
    SetPVarInt(playerid,"spawn_ac",1);

	if(GetPVarType(playerid, "FlyMode"))
	{
		new inter, world, Float:X, Float:Y, Float:Z, Float:FA;
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, FA);
		inter = GetPlayerInterior(playerid);
		world = GetPlayerVirtualWorld(playerid);
		SetPVarFloat(playerid, "SpecX", X);
		SetPVarFloat(playerid, "SpecY", Y);
		SetPVarFloat(playerid, "SpecZ", Z);
		SetPVarFloat(playerid, "SpecFA", FA);
		SetPVarInt(playerid, "SpecInt", inter);
		SetPVarInt(playerid, "SpecWorld", world);

		CancelFlyMode(playerid);
	}
	else
	{
			SetPVarInt(playerid, "SpecBool", 1);
			FlyMode(playerid);
	}
	return true;
}

 

Edited by ghosttt

Share this post


Link to post

3 answers to this question

  • 0
CMD:afly(playerid,params[])
{
    if(PI[playerid][pAdmin] < 1) return 1;
    SetPVarInt(playerid,"spawn_ac",1);
    if(GetPVarType(playerid, "FlyMode"))
    {
        new inter, world, Float:X, Float:Y, Float:Z, Float:FA;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, FA);
        inter = GetPlayerInterior(playerid);
        world = GetPlayerVirtualWorld(playerid);
        SetPVarFloat(playerid, "SpecX", X);
        SetPVarFloat(playerid, "SpecY", Y);
        SetPVarFloat(playerid, "SpecZ", Z);
        SetPVarFloat(playerid, "SpecFA", FA);
        SetPVarInt(playerid, "SpecInt", inter);
        SetPVarInt(playerid, "SpecWorld", inter);
        CancelFlyMode(playerid);
    }
    else
    {
    	SetPVarInt(playerid, "SpecBool", 1);
    	FlyMode(playerid);
    }
    return true;
}

Замени свою на эту

Edited by SCRIPTMAN

Share this post


Link to post
  • 0

Строки выровняй 4 пробела или 1 Tab

Share this post


Link to post
  • 0

Спасибо, помогло. Закрыто

Share this post


Link to post
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • bogdan@gmail
      By bogdan@gmail
      Как исправить взрыв при создание тс через мод тоесть припосав его там создавая спавн авто