SA-MP Forums Archive
Gate Filterscript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gate Filterscript (/showthread.php?tid=200905)



Gate Filterscript - Jack- - 19.12.2010

Can someone help me by telling me whats wrong with this
971,2908.698974,2088.360351,5.949101,0.000000,0.00 0000,0.201737, this is the gate open
971,2908.698974,2088.360351,12.570116,0.000000,0.0 00000,0.201737, this is the gate closed



Код:
#include <a_samp>
new vgate;

public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Blank Filterscript by your name here");
        print("--------------------------------------\n");
        vgate = CreateObject(971,2908.698974,2088.360351,12.570116,0.000000,0.000000,0.201737);//closed
        return 1;
}

 if(strcmp(cmdtext,"/ovgate", true) == 0)
  {
   MoveObject(vgate, 2908.698974,2088.360351,5.949101, 1.500000);
     return 1;
     }
  }
}

 if(strcmp(cmdtext,"/cvgate", true) == 0)
  {
   MoveObject(vgate, 2908.698974,2088.360351,12.570116, 1.500000);
     return 1;
     }
  }
}



Re: Gate Filterscript - Jack- - 19.12.2010

Updated it


Re: Gate Filterscript - blackwave - 19.12.2010

Well, in both of them you put the same coordinates, except for the Z


Re: Gate Filterscript - Jack- - 19.12.2010

yes because the gate only moves up and down


Re: Gate Filterscript - Norck - 19.12.2010

Quote:
Originally Posted by Jack-
Посмотреть сообщение
yes because the gate only moves up and down
And what's your problem then?


Re: Gate Filterscript - Jack- - 19.12.2010

It doesnt compile i get this error for lines 13 16 21 24
error 010: invalid function or declaration


Re: Gate Filterscript - MadeMan - 19.12.2010

pawn Код:
#include <a_samp>

new vgate;

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    vgate = CreateObject(971,2908.698974,2088.360351,12.570116,0.000000,0.000000,0.201737);//closed
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/ovgate", true) == 0)
    {
        MoveObject(vgate, 2908.698974,2088.360351,5.949101, 1.500000);
        return 1;
    }
    if(strcmp(cmdtext,"/cvgate", true) == 0)
    {
        MoveObject(vgate, 2908.698974,2088.360351,12.570116, 1.500000);
        return 1;
    }
    return 0;
}



Re: Gate Filterscript - Norck - 19.12.2010

Quote:
Originally Posted by Jack-
Посмотреть сообщение
It doesnt compile i get this error for lines 13 16 21 24
error 010: invalid function or declaration
pawn Код:
#include <a_samp>
new vgate;

public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Blank Filterscript by your name here");
        print("--------------------------------------\n");
        vgate = CreateObject(971,2908.698974,2088.360351,12.570116,0.000000,0.000000,0.201737);//closed
        return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(strcmp(cmdtext,"/ovgate", true) == 0)
    {
        MoveObject(vgate, 2908.698974,2088.360351,5.949101, 1.500000);
        return 1;
    }
    if(strcmp(cmdtext,"/cvgate", true) == 0)
    {
       MoveObject(vgate, 2908.698974,2088.360351,12.570116, 1.500000);
       return 1;
     }
     return 0;
}



Re: Gate Filterscript - Jack- - 19.12.2010

does anyone know what this means

C:\Users\Jack\Documents\Ascendence Documents\GTA SAMP SERVER\sdoor.pwn(10) : error 029: invalid expression, assumed zero
C:\Users\Jack\Documents\Ascendence Documents\GTA SAMP SERVER\sdoor.pwn(10) : error 035: argument type mismatch (argument
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Re: Gate Filterscript - Face9000 - 19.12.2010

Post line 10.