SA-MP Forums Archive
Help like this is resolved? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Help like this is resolved? (/showthread.php?tid=479835)



Help like this is resolved? - Bocha - 07.12.2013

Hello, I would like to know how it works out that I have complicated, I want to repair 7 warning but nose

Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

new Puerta;
new Puerta1;
new puerta2;

#define IsPlayerInRangeOfPoint

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
SetTimer("Movimiento", 13000, true);
Puerta = CreateObject(980,-48.4847,717.0677,67.7679,90.0000,0.0000,0.0000);
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
SetTimer("Movimiento1", 13000, true);
Puerta1 = CreateObject(980, -27,6353,781,1064,29,1415,90.0000,0.0000,-44.1800);
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
SetTimer("Movimiento2", 25000, true);
puerta2 = CreateObject(980,50,6232, 704,5142, 21,6274,90.0000,0.0000,0.0000);
return 1;
}



forward Movimiento();
public Movimiento()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 3, -48.4847,717.0677,22.8863)) //Posicion donde Se Ejecutara La Funcion
{
MoveObject(Puerta,-48.4847,717.0677,67.7679,3.5); //Posicion De la Puerta Abierta
}
else
{
MoveObject(Puerta,-48.4847,717.0677,22.8863,3.5); //Posicion De la Puerta Cerrada
}
}
}
}



forward Movimiento1();
public Movimiento1()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 3, -27,6353,781,1064,29,1415)) //Posicion donde Se Ejecutara La Funcion
{
MoveObject(Puerta1,-27.9949, 781.3693, 72.7373,3.5); //Posicion De la Puerta Abierta
}
else
{
MoveObject(Puerta1,-27,6353,781,1064,29,1415,3.5); //Posicion De la Puerta Cerrada
}
}
}
}



forward Movimiento2();
public Movimiento2()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 3, 50,6232, 704,5142, 21,6274)) //Posicion donde Se Ejecutara La Funcion
{
MoveObject(puerta2,50,6232, 704,5142, 97,5193,3.5); //Posicion De la Puerta Abierta
}
else
{
MoveObject(puerta2,50,6232, 704,5142, 21,6274,3.5); //Posicion De la Puerta Cerrada
}
}
}
}




Re: Help like this is resolved? - StuartD - 07.12.2013

What warnings do you get?


Re: Help like this is resolved? - TahaAsif12 - 07.12.2013

What warnings? and which lines shows warnings?


Re: Help like this is resolved? - FahadKing07 - 07.12.2013

show me compiler logs


Re: Help like this is resolved? - nisva003 - 07.12.2013

Wtf no error lol


Re: Help like this is resolved? - Konstantinos - 07.12.2013

pawn Код:
#include <a_samp>

new Puerta;
new Puerta1;
new puerta2;

main() {}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    SetTimer("Movimiento", 13000, true);
    Puerta = CreateObject(980,-48.4847,717.0677,67.7679,90.0000,0.0000,0.0000);
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    SetTimer("Movimiento1", 13000, true);
    Puerta1 = CreateObject(980, -27.6353,781.1064,29.1415,90.0000,0.0000,-44.1800);
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    SetTimer("Movimiento2", 25000, true);
    puerta2 = CreateObject(980,50.6232, 704.5142, 21.6274,90.0000,0.0000,0.0000);
    return 1;
}

forward Movimiento();
public Movimiento()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 3, -48.4847,717.0677,22.8863)) //Posicion donde Se Ejecutara La Funcion
            {
                MoveObject(Puerta,-48.4847,717.0677,67.7679,3.5); //Posicion De la Puerta Abierta
            }
            else
            {
                MoveObject(Puerta,-48.4847,717.0677,22.8863,3.5); //Posicion De la Puerta Cerrada
            }
        }
    }
}

forward Movimiento1();
public Movimiento1()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 3, -27.6353,781.1064,29.1415)) //Posicion donde Se Ejecutara La Funcion
            {
                MoveObject(Puerta1,-27.9949, 781.3693, 72.7373,3.5); //Posicion De la Puerta Abierta
            }
            else
            {
                MoveObject(Puerta1,-27.6353,781.1064,29.1415,3.5); //Posicion De la Puerta Cerrada
            }
        }
    }
}

forward Movimiento2();
public Movimiento2()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 3, 50.6232, 704.5142, 21.6274)) //Posicion donde Se Ejecutara La Funcion
            {
                MoveObject(puerta2,50.6232, 704.5142, 97.5193,3.5); //Posicion De la Puerta Abierta
            }
            else
            {
                MoveObject(puerta2,50.6232, 704.5142, 21.6274,3.5); //Posicion De la Puerta Cerrada
            }
        }
    }
}
Never do that:
pawn Код:
#define IsPlayerInRangeOfPoint
and x, y, z are floats. They're not like that:
pawn Код:
-27,6353,781,1064,29,1415
but like this:
pawn Код:
-27.6353,781.1064,29.1415