17.06.2011, 12:43
well that was a simple /gateopen command with a auto gateclose. i got a spare gm and put the /gateopen command with the auto gateclose on that one and got no errors.
pawn Код:
new Tgate1;//gateclose 1
forward GateClose(playerid);// Tgate1
Tgate1 = CreateDynamicObject( 1844, 1599.053344,-1638.123168,4.122960, 0, 0, 0);
public GateClose(playerid)
{
MoveObject(Tgate1,-722.17376708984,911.45623779297,13.902606964111, 0.97);
return 1;
}
if(strcmp(cmdtext,"/tgate",true) == 0 )
{
if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
{
MoveObject(Tgate1,1599.053344,-1638.123168,4.122960, 0.8);
SetTimer("GateClose", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE,"Rosey_Woods house gate open");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}