Moving gates support please ! Read here :
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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 ?!?!
Reply
#5

I did that but no work man .... what else should i do ?
Reply
#6

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 !
Reply
#7

anyone can help me please ?
Reply
#8

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.
Reply
#9

No result man ... still the f..king gates are not opening man ! i dont know what the f..k should i do ((((
Reply
#10

Yey i solved it !!!! i must put speed there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)