30.09.2009, 15:17
Well i was wondering how i could do this, what i want to do is make a door open by a pressing 2 on your keyboard but everytime i try it just opens and i cant close it because its the same radius.
----=[[Below are the 1's i want on a Button]]=----
So you press 2 it opens then closes in the certain radius.
Thanks.
-Mike.
pawn Код:
new LD; //----Lock down gate in the Diner
new Sec; //----Security door in the Diner
new Locked[MAX_PLAYERS]; //----LOCKDOWN used for all doors / gates.
pawn Код:
Sec = CreateObject(1495, 2651.119873, -2745.723877, 4.287249, 0.0000, 0.0000, 89.3814);
LD = CreateObject(971, 2640.496582, -2745.657959, 0.713324, 0.0000, 0.0000, 180.3777);
pawn Код:
if (strcmp("/opensec", cmdtext, true) == 0)
{
if(PlayerToPoint(2.0,playerid,2651.119873, -2745.723877, 4.287249))
{
if(TEAM_COP[playerid] == 1)
{
SetObjectRot(Sec, 0.0000, 0.0000, 18.9076);
}
}
return 1;
}
if (strcmp("/closesec", cmdtext, true) == 0)
{
if(PlayerToPoint(2.0,playerid,2651.119873, -2745.723877, 4.287249))
{
if(TEAM_COP[playerid] == 1)
{
SetObjectRot(Sec, 0.0000, 0.0000, 89.3814);
}
}
return 1;
}
Thanks.
-Mike.