Moving gates support please ! Read here : -
Kirchhoff - 20.05.2009

here is my pawno filterscript code : #include <a_samp>
new gate;
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
gate = CreateObject(976,-1781.880,965.825,23.871,0.0,0.0,90.000);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerCommandText (playerid, cmdtext[])
{
if (strcmp(cmdtext, "/open", true) == 0)
{
MoveObject(gate, -1781.880,965.825,23.871);
SendClientMessage(playerid, COLOR_YELLOW,"Welcome TO VIP BASE !");
return 1;
}
if (strcmp(cmdtext, "/close", true) == 0)
{
MoveObject(gate, -1781.880,965.825,23.871);
SendClientMessage(playerid, COLOR_YELLOW,"VIP BASE closed!");
return 1;
}
return 0;
}
But when i tipe /open or /close the gates doesnt openes or close
btw : i recieve 6 warning but no error ! So whats wrong ?
I tipe /open and i recieve the message but the gate doesnt openes ! What have i dont wrong
Re: Moving gates support please ! Read here : -
OmeRinG - 20.05.2009
the cordinates on MoveObject should be differrent than the CreateObject.
if the cordinates on CreateObjects are when the gate is closed, put them in /close, and try adding 5 to x or 5 to y or 5 to z or more to each of the cordinates to /open for it to move.
Re: Moving gates support please ! Read here : -
Fragoso - 20.05.2009
what GM your trying to put that?
If it's Public Enemy LS, you have to put those on the GM, so they will work.
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
lol i dont use any gamemode from here man ... i got my own gamemode it will be opened in max. 2 weeks or sth

but i dont understand what you are saying on create object ?!?!
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
I did that but no work man ....

what else should i do ?
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
Srry for my triple post ! But i am desperate i dont know what to do i made another filterscript this one with the opened gate but stiil no result here :
#include <a_samp>
new gate;
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
gate = CreateObject(976,-1781.880,961.821,23.871,0.0,0.0,90.000);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerCommandText (playerid, cmdtext[])
{
if (strcmp(cmdtext, "/close", true) == 0)
{
MoveObject(gate,-1781.880,961.821,23.871);
SendClientMessage(playerid, COLOR_YELLOW,"Welcome TO VIP BASE !");
return 1;
}
if (strcmp(cmdtext, "/open", true) == 0)
{
MoveObject(gate,-1801.880,981.821,43.871);
SendClientMessage(playerid, COLOR_YELLOW,"VIP BASE closed!");
return 1;
}
return 0;
}
Can you tell me whats wrong please ?!?! TKS !
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
anyone can help me please ?
Re: Moving gates support please ! Read here : -
Badger(new) - 21.05.2009
You had not done the commands correctly. every command needs to return a value and OnPlayerCommandText needs to return 0 in a filterscript.
pawn Код:
#include <a_samp>
new gate;
#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
gate = CreateObject(976,-1781.880,961.821,23.871,0.0,0.0,90.000);
return 1;
}
public OnPlayerCommandText (playerid, cmdtext[])
{
if (strcmp(cmdtext, "/close", true) == 0)
{
MoveObject(gate,-1781.880,961.821,23.871);
SendClientMessage(playerid, COLOR_YELLOW,"Welcome TO VIP BASE !");
return 1;
}
if (strcmp(cmdtext, "/open", true) == 0)
{
MoveObject(gate,-1801.880,981.821,43.871);
SendClientMessage(playerid, COLOR_YELLOW,"VIP BASE closed!");
return 1;
}
return 0;
}
Sorry If it's not indented correctly. It always moves around when i post.
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
No result man ... still the f..king gates are not opening man ! i dont know what the f..k should i do

((((
Re: Moving gates support please ! Read here : -
Kirchhoff - 21.05.2009
Yey i solved it !!!! i must put speed there