Barriers. Needhelp.
#1

From the start i want to tell you that my english is very bad.

So, this is my problem:

I want to make two barriers (check the photos) but the problem is that only one barrier from that two work. I mention that every barrier is in diferent fs.

Photos:

[img width=960 height=768]http://i46.tinypic.com/24p9duu.png[/img]
[img width=960 height=768]http://i47.tinypic.com/2rm7gix.png[/img]

And here are that two FS:

Quote:

//NR Gates [GM Godfather]

#include <a_samp>

#define FILTERSCRIPT
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA

forward GateClose();
new barrier;
public OnFilterScriptInit()

{
barrier = CreateObject(968, 774.662842, -1384.753784, 13.455388, 0, 89.3814161425, -0.85943669367; ///barrier closed
CreateObject(966, 774.691833, -1384.700073, 12.724417, 0, 0, -181.34108507); ///newobj 966

return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) == 0)
SetObjectRot(barrier, 0, 4.29724076417, -0.85943669367; // barrier open after command
SetTimer("GateClose", 10000, 0);
SendClientMessage(playerid, COLOR_GREEN,"Sucess!");
SendClientMessage(playerid, COLOR_RED,"Barrier Closes In 10 Seconds");
return 1;
}

public GateClose()
{
SetObjectRot(barrier, 0, 89.3814161425, -0.85943669367; // barrier closed after command
return 1;
}

Quote:

//NR Gates [GM Godfather]

#include <a_samp>

#define FILTERSCRIPT
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA

forward GateClose();
new barrier;
public OnFilterScriptInit()

{
barrier = CreateObject(968, 781.364807, -1330.428345, 13.262304, 0, -90.2407955404, -2.57831008103); ///barrier closed
CreateObject(966, 781.231934, -1330.418335, 12.553049, 0, 0, -2.57831008103); ///newobj 966
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/deschide", cmdtext, true, 10) == 0)
SetObjectRot(barrier,0, -0, -1.71887338736); // barrier open after command
SetTimer("GateClose", 10000, 0);
SendClientMessage(playerid, COLOR_GREEN,"Sucess!");
SendClientMessage(playerid, COLOR_RED,"Barrier Closes In 10 Seconds");
return 1;
}

public GateClose()
{
SetObjectRot(barrier, 0, -90.2407955404, -2.57831008103); // barrier closed after command
return 1;
}

Can you make this two barriers to work correctly, one to open at the command: /open and the other to open at the command: /deschide.

PS: "deschide" means "open" in romanian.

Thank You.
Reply
#2

Cordinates arent right u need change them. And u need create one object more object when gate is opened.Look code and try to get it work then you learn too, Good Luck :P

Код:
//NR Gates [GM Godfather]

#include <a_samp>

#define FILTERSCRIPT
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA

forward GateClose();
new barrier;
new barrier2;

public OnFilterScriptInit()

{
  barrier = CreateObject(968, 781.364807, -1330.428345, 13.262304, 0, -90.2407955404, -2.57831008103); ///barrier closed
  CreateObject(966, 781.231934, -1330.418335, 12.553049, 0, 0, -2.57831008103); ///newobj 966
  return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/deschide", cmdtext, true, 10) == 0)
    destroyObject( barrier );
   	barrier2 = CreateObject(968,1544.700317,-1630.735717,12.924660,0.000000,0.000000,270.972869,500);
    SetObjectRot(barrier,0, -0, -1.71887338736); // barrier open after command
    SetTimer("GateClose", 10000, 0);
    SendClientMessage(playerid, COLOR_GREEN,"Sucess!");
    SendClientMessage(playerid, COLOR_RED,"Barrier Closes In 10 Seconds");
    return 1;
}

public GateClose()
{
  
  DestroyStreamObject( barrier2 );
  SetObjectRot(barrier, 0, -90.2407955404, -2.57831008103); // barrier closed after command
  return 1;
}
Where did you get snow mod?
Reply
#3

Solved. Thank you.

I have snow mod from here: Snow Andreas GAMI installation
Reply
#4

Quote:
Originally Posted by robyz
Solved. Thank you.

I have snow mod from here: Snow Andreas GAMI installation
thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)