The Gate
#1

Hey,

I scripted a gate as a FilterScript and put it in the Filterscript.
But when I type the command in-game it doesn't do anything, can someone help me ?
Reply
#2

/rcon login PASSWORD
/rcon loadfs FILTERSCRIPTNAME

Example /rcon loadfs cars


(CaSe SeNsItIvE)
Reply
#3

It says that the commands work, but it doesn't have any effect.
Reply
#4

SHOW us your code. We cannot see what you have wrote down in your script by reading your mind. Atleast I cannot read your mind.
Reply
#5

@TwinkiDaBoss, don't worry, I can't either.
Show your code...
Reply
#6

Code will be shown in a second.
Reply
#7

Quote:
Originally Posted by iiMo
Посмотреть сообщение
Code will be shown in a second.
You have posted this 5mins ago, but ok.
Reply
#8

PHP код:
#include <a_samp>

#define FILTERSCRIPT
new MaltGate;

public 
OnFilterScriptInit()
{
    
MaltGate CreateObject(9691268.33813172.6552718.40459,   0.000000.0000065.53729);
    
MaltGate CreateObject(9691271.91394180.7189018.40559,   0.000000.0000065.53729);

    return 
1;
}

public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/OpenGate"true)){
        {
            
MoveObject(MaltGate1265.96130165.5860418.40459,   0.000000.0000065.53729);
            
MoveObject(MaltGate1273.89319186.6057118.40559,   0.000000.0000065.55613);
            return 
1;
        }
    }
    else if(
strcmp(cmdtext"/CloseGate"true)){
  {
            
MoveObject(MaltGate1268.33813172.6552718.40459,   0.000000.0000065.53729);
            
MoveObject(MaltGate1271.91394180.7189018.40559,   0.000000.0000065.53729);
            return 
1;
        }
    }
    return 
0;
}
public 
OnFilterScriptExit()
{
    return 
1;

Reply
#9

You have to define the objects.. by creating variables.
Can't show a example atm
Reply
#10

You have 2 objects under same variable.
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new MaltGate[2];
public 
OnFilterScriptInit()
{
    
MaltGate[0] = CreateObject(9691268.33813172.6552718.40459,   0.000000.0000065.53729);
    
MaltGate[1] = CreateObject(9691271.91394180.7189018.40559,   0.000000.0000065.53729);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/OpenGate"true)){
        {
            
MoveObject(MaltGate[0], 1265.96130165.5860418.40459,   0.000000.0000065.53729);
            
MoveObject(MaltGate[1], 1273.89319186.6057118.40559,   0.000000.0000065.55613);
            return 
1;
        }
    }
    else if(
strcmp(cmdtext"/CloseGate"true)){
      {
            
MoveObject(MaltGate[0], 1268.33813172.6552718.40459,   0.000000.0000065.53729);
            
MoveObject(MaltGate[1], 1271.91394180.7189018.40559,   0.000000.0000065.53729);
            return 
1;
        }
    }
    return 
0;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)