17.09.2011, 15:36
you add the door and use this code
PHP код:
new door;
Public OnPlayerModeInit
{
door = CreateObject(here the cordinates of the closed door);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) == 0)
{
If(isplayeradmin) //here put what you using on your admin system!
{
MoveObject(door,here the coordinates of the opened door,here the speed of moving exp. 5.0);
return 1;
}
}
if (strcmp("/close", cmdtext, true, 10) == 0)
{
If(isplayeradmin) //here put what you using on your admin system!
{
MoveObject(door,here the coordinates of the closeddoor,here the speed of moving exp. 5.0);
return 1;
}
}
return 0;
}