Well, here is one I made for my server, using zcmd, you type /open [password] and it opens, same with /close...if you have any scripting experience, you should be able to change it to your needs if you want to, if you cant do that drop me a PM...either way, I think it is more simple than the others
pawn Код:
COMMAND:open(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, -1, "Open/Close [PASSWORD]");
return true;
}
if(!strcmp(params, "gov123", false))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171, 2651.5464, 103.3268))
{
MoveObject(pgate1, -2819.3171, 2648.8591, 103.3268, 3.0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2855.7876, 2659.5562, 107.6278))
{
MoveObject(pgate2, -2855.7678, 2656.9021, 107.6278, 3.0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2466.4287, 2250.1355, 1.3655))
{
MoveObject(pgate3, -2457.7766, 2250.1355, 1.3655, 3.0);
return 1;
}
}
return true;
}
COMMAND:close(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, -1, "Open/Close [PASSWORD]");
return true;
}
if(!strcmp(params, "gov123", false))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171, 2651.5464, 103.3268))
{
MoveObject(pgate1, -2819.3171, 2651.5464, 103.3268, 3.0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2855.7876, 2659.5562, 107.6278))
{
MoveObject(pgate2, -2855.7678, 2659.5361, 107.6278, 3.0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2457.7766, 2250.1355, 1.3655))
{
MoveObject(pgate3, -2466.4287, 2250.1355, 1.3655, 3.0);
return 1;
}
}
return true;
}
note that gov123 is the password
now you will have to define the objects OnFilterScriptInit so they are always there. I am using Pgate1 in here as the example.
pawn Код:
public OnFilterScriptInit()
{
pgate1 = CreateObject(971, -2819.3171, 2651.5464, 103.3268, 0.0, 0.0, 90.0, 100.0);