Doing things using one command instead of two.
#2

I think it will work.

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;
    }
Reply


Messages In This Thread
Doing things using one command instead of two. - by jbtech - 25.02.2009, 06:15
Re: Doing things using one command instead of two. - by joco96 - 25.02.2009, 06:36
Re: Doing things using one command instead of two. - by ]shizz[ - 25.02.2009, 09:20
Re: Doing things using one command instead of two. - by jbtech - 25.02.2009, 13:44
Re: Doing things using one command instead of two. - by samgreen - 25.02.2009, 15:58
Re: Doing things using one command instead of two. - by jbtech - 25.02.2009, 22:41

Forum Jump:


Users browsing this thread: 2 Guest(s)