25.02.2009, 06:36
I think it will work.
Top of your script:
Top of your script:
pawn Код:
new LSPDDoor = true;
pawn Код:
if (strcmp(cmdtext, "/lspd", true) == 0)
{
if (!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Access Denied: You are not a Law Enforcement official!");
return 1;
}
if(LSPDDoor) {
MoveObject(lspddoor, 245.64070, 72.57476, 1002.65979, 1);
LSPDDoor = false;
SendClientMessage(playerid, COLOR_GREY, "You've opened the door.");
return 1;
} else {
MoveObject(lspddoor, 247.27613, 72.55864, 1002.65979, 1);
LSPDDoor = true;
SendClientMessage(playerid, COLOR_GREY, "You've closed the door.");
return 1;
}
return 1;
}