Jump to content
  • 0

3 Warnings FS


laury

Question

am un fs pt niste porti la aero SF dar imi da 3 warninguri

ma puteti ajuta va rog?

uitati fs aici

#include <a_samp>
#include <core>
#include <float>

new glob0;

new glob4;

new glob8;

new globC;


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("AeroGates -= FS -= By PuNaNi @ LoadeD   ");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	print("\n--------------------------------------");
	print("AeroGates -= FS -= By PuNaNi @ UnLoaded ");
	print("--------------------------------------\n");
	return 1;
}

public OnGameModeInit()
{
	glob0 = CreateObject(988, -1543.742, -432.7031, 6.039, 0.0, 0.0, -45.0, 0);
	globC = CreateObject(988, -1547.625, -428.8201, 6.039, 0.0, 0.0, -45.0, 0);
	glob4 = CreateObject(988, -1222.9531, 53.826, 14.1339, 0.0, 0.0, -135.0, 0);
	glob8 = CreateObject(988, -1218.2061, 68.883, 14.1339, 0.0, 0.0, -135.0, 0);
	SetTimer("CheckAPGates", 1000, true);
	return 1;
}

public CheckAPGates()
{
	for(new var0 = 0; var0 < 500; var0++)
	{
		if(IsPlayerConnected(var0))
		{
			new Float:var1 = 0.0, Float:var2 = 0.0, Float:var3 = 0.0;
			GetPlayerPos(var0, var1, var2, var3);
			if(PlayerToPoint(30.0, var0, -1545.6835, -430.7616, 6.039))
			{
				MoveObject(glob0, -1540.6601, -435.7861, 6.039, 3.0);
				MoveObject(globC, -1550.709, -425.736, 6.039, 3.0);
				SetTimerEx("CloseAPGate", 1000, false, "ii", var0);
			}
			if(PlayerToPoint(30.0, var0, -1220.491, 61.443, 14.1339))
			{
				MoveObject(glob4, -1226.59, 50.1889, 14.1339, 3.0);
				MoveObject(glob8, -1214.392, 72.6969, 14.1339, 3.0);
				SetTimerEx("CloseAPGate", 1000, false, "ii", var0);
			}
		}
	}
	return 0;
}

public CloseAPGate(arg0, playerid)
{
	new Float:var0 = 0.0, Float:var1 = 0.0, Float:var2 = 0.0;
	GetPlayerPos(playerid, var0, var1, var2);
	if(arg0 == 21 && !PlayerToPoint(30.0, playerid, -1545.6835, -430.7616, 6.039))
	{
		MoveObject(glob0, -1543.742, -432.7031, 6.039, 3.0);
		MoveObject(globC, -1547.625, -428.8201, 6.039, 3.0);
	}
	if(arg0 == 22 && !PlayerToPoint(30.0, playerid, -1220.491, 61.443, 14.1339))
	{
		MoveObject(glob4, -1222.9531, 53.826, 14.1339, 3.0);
		MoveObject(glob8, -1218.2061, 68.883, 14.1339, 3.0);
	}
	return 0;
}

public PlayerToPoint(Float:arg0, playerid, Float:arg2, Float:arg3, Float:arg4)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:var0 = 0.0, Float:var1 = 0.0, Float:var2 = 0.0;
		new Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0;
		GetPlayerPos(playerid, var0, var1, var2);
		var3 = var0 - arg2;
		var4 = var1 - arg3;
		var5 = var2 - arg4;
		if((var3 < arg0 && var3 > -arg0) && (var4 < arg0 && var4 > -arg0) && (var5 < arg0 && var5 > -arg0))
		{
			return 1;
		}
	}
	return 0;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Aratane cele 3 warninguri.

Nu e nevoie. Ti-a pus tot scriptul, puteai sa copii tot si sa bagi in Pawno sa verifici.

Mr_laury, uite-l aici:

#include <a_samp>
#include <core>
#include <float>

new glob0;
new glob4;
new glob8;
new globC;

forward CheckAPGates();
forward CloseAPGate(arg0, playerid);
forward PlayerToPoint(Float:arg0, playerid, Float:arg2, Float:arg3, Float:arg4);

public OnFilterScriptInit()
{
  print("\n--------------------------------------");
  print("AeroGates -= FS -= By PuNaNi @ LoadeD  ");
  print("--------------------------------------\n");
  glob0 = CreateObject(988, -1543.742, -432.7031, 6.039, 0.0, 0.0, -45.0, 0);
  globC = CreateObject(988, -1547.625, -428.8201, 6.039, 0.0, 0.0, -45.0, 0);
  glob4 = CreateObject(988, -1222.9531, 53.826, 14.1339, 0.0, 0.0, -135.0, 0);
  glob8 = CreateObject(988, -1218.2061, 68.883, 14.1339, 0.0, 0.0, -135.0, 0);
  SetTimer("CheckAPGates", 1000, true);
  return 1;
}

public OnFilterScriptExit()
{
  print("\n--------------------------------------");
  print("AeroGates -= FS -= By PuNaNi @ UnLoaded ");
  print("--------------------------------------\n");
  return 1;
}


public CheckAPGates()
{
  for(new var0 = 0; var0 < 500; var0++)
  {
      if(IsPlayerConnected(var0))
      {
        new Float:var1 = 0.0, Float:var2 = 0.0, Float:var3 = 0.0;
        GetPlayerPos(var0, var1, var2, var3);
        if(PlayerToPoint(30.0, var0, -1545.6835, -430.7616, 6.039))
        {
            MoveObject(glob0, -1540.6601, -435.7861, 6.039, 3.0);
            MoveObject(globC, -1550.709, -425.736, 6.039, 3.0);
            SetTimerEx("CloseAPGate", 1000, false, "ii", var0);
        }
        if(PlayerToPoint(30.0, var0, -1220.491, 61.443, 14.1339))
        {
            MoveObject(glob4, -1226.59, 50.1889, 14.1339, 3.0);
            MoveObject(glob8, -1214.392, 72.6969, 14.1339, 3.0);
            SetTimerEx("CloseAPGate", 1000, false, "ii", var0);
        }
      }
  }
  return 0;
}

public CloseAPGate(arg0, playerid)
{
  new Float:var0 = 0.0, Float:var1 = 0.0, Float:var2 = 0.0;
  GetPlayerPos(playerid, var0, var1, var2);
  if(arg0 == 21 && !PlayerToPoint(30.0, playerid, -1545.6835, -430.7616, 6.039))
  {
      MoveObject(glob0, -1543.742, -432.7031, 6.039, 3.0);
      MoveObject(globC, -1547.625, -428.8201, 6.039, 3.0);
  }
  if(arg0 == 22 && !PlayerToPoint(30.0, playerid, -1220.491, 61.443, 14.1339))
  {
      MoveObject(glob4, -1222.9531, 53.826, 14.1339, 3.0);
      MoveObject(glob8, -1218.2061, 68.883, 14.1339, 3.0);
  }
  return 0;
}

public PlayerToPoint(Float:arg0, playerid, Float:arg2, Float:arg3, Float:arg4)
{
  if(IsPlayerConnected(playerid))
  {
      new Float:var0 = 0.0, Float:var1 = 0.0, Float:var2 = 0.0;
      new Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0;
      GetPlayerPos(playerid, var0, var1, var2);
      var3 = var0 - arg2;
      var4 = var1 - arg3;
      var5 = var2 - arg4;
      if((var3 < arg0 && var3 > -arg0) && (var4 < arg0 && var4 > -arg0) && (var5 < arg0 && var5 > -arg0))
      {
        return 1;
      }
  }
  return 0;
}

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.