12.07.2012, 01:20
Not sure about it at all, haven't even tested it.
Make sure to edit your gate position and everything.
EDIT: Mistaken, it does work as a standalone FS if you fix the coordinates for gate & it's position after /gate.
Make sure to edit your gate position and everything.
pawn Код:
#include <a_samp>
new
gate,
playaName[25],
gateStatus = 0;
public OnFilterScriptInit()
{
gate = CreateObject(987, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/gate", true))
{
GetPlayerName(playerid, playaName, 24);
if(!strcmp(playaName,"SAMP_Player",true))
{
if(!gateStatus)
{
MoveObject(gate, 0.0, 0.0, -3.0, 2.5);
gateStatus = 1;
return 1;
}
else
{
MoveObject(gate, 0.0, 0.0, 0.0, 2.5);
gateStatus = 0;
return 1;
}
}
}
return 1;
}