Please help me how to add gates
#2

First, you msut create 2 types of coordinates, 1 when the gate is closed, 2 when the gate is open.

On /open command you add the coords of the open gate
on /close you add the coords of the closed gate
pawn Код:
new GATE;
pawn Код:
OnGameModeInit()
{
GATE = CreateObject(...)//Create the object, coords must be of the closed gate.
return 1;
}
this under OnPlayerCommandText
pawn Код:
if(strcmp(cmdtext, "/OPEN", true) == 0)
{
MoveObject(GATE, coords)//The coords of the open gate
return 1;
}
if(strcmp(cmdtext, "/close", true) == 0)
{
MoveObject(GATE, coords)//The coords of the closed gate
return 1;
}
Hope this helped.
Reply


Messages In This Thread
Please help me how to add gates - by Johny_Depp - 11.05.2010, 18:17
Re: Please help me how to add gates - by Zh3r0 - 11.05.2010, 18:22
Re: Please help me how to add gates - by Johny_Depp - 11.05.2010, 19:26
Re: Please help me how to add gates - by Uninvited - 11.05.2010, 19:29
Re: Please help me how to add gates - by [MK]Soprano - 11.05.2010, 19:34
Re: Please help me how to add gates - by Zh3r0 - 11.05.2010, 19:41
Re: Please help me how to add gates - by Johny_Depp - 11.05.2010, 20:40
Re: Please help me how to add gates - by Johny_Depp - 12.05.2010, 18:12
Re: Please help me how to add gates - by 0ne - 12.05.2010, 18:31
Re: Please help me how to add gates - by Johny_Depp - 15.05.2010, 11:02

Forum Jump:


Users browsing this thread: 1 Guest(s)