The Gate -
iiMo - 22.12.2015
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 ?
Re: The Gate -
Sebz - 22.12.2015
/rcon login PASSWORD
/rcon loadfs FILTERSCRIPTNAME
Example /rcon loadfs cars
(CaSe SeNsItIvE)
Re: The Gate -
iiMo - 22.12.2015
It says that the commands work, but it doesn't have any effect.
Re: The Gate -
TwinkiDaBoss - 22.12.2015
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.
Re: The Gate -
saffierr - 22.12.2015
@TwinkiDaBoss, don't worry, I can't either.
Show your code...
Re: The Gate -
iiMo - 22.12.2015
Code will be shown in a second.
Re: The Gate -
saffierr - 22.12.2015
Quote:
Originally Posted by iiMo
Code will be shown in a second.
|
You have posted this 5mins ago, but ok.
Re: The Gate -
iiMo - 22.12.2015
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new MaltGate;
public OnFilterScriptInit()
{
MaltGate = CreateObject(969, 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MaltGate = CreateObject(969, 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/OpenGate", true)){
{
MoveObject(MaltGate, 1265.96130, 165.58604, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate, 1273.89319, 186.60571, 18.40559, 0.00000, 0.00000, 65.55613);
return 1;
}
}
else if(strcmp(cmdtext, "/CloseGate", true)){
{
MoveObject(MaltGate, 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate, 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
Re: The Gate -
saffierr - 22.12.2015
You have to define the objects.. by creating variables.
Can't show a example atm
Re: The Gate -
TwinkiDaBoss - 22.12.2015
You have 2 objects under same variable.
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new MaltGate[2];
public OnFilterScriptInit()
{
MaltGate[0] = CreateObject(969, 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MaltGate[1] = CreateObject(969, 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/OpenGate", true)){
{
MoveObject(MaltGate[0], 1265.96130, 165.58604, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate[1], 1273.89319, 186.60571, 18.40559, 0.00000, 0.00000, 65.55613);
return 1;
}
}
else if(strcmp(cmdtext, "/CloseGate", true)){
{
MoveObject(MaltGate[0], 1268.33813, 172.65527, 18.40459, 0.00000, 0.00000, 65.53729);
MoveObject(MaltGate[1], 1271.91394, 180.71890, 18.40559, 0.00000, 0.00000, 65.53729);
return 1;
}
}
return 0;
}