Unknown Commands?
#6

try this
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if (strcmp("/test", cmdtext, true) == 0)
    {
        SetPlayerPos(playerid, 3354.339844, -2152.024902, 705.970459);
        SetPlayerInterior(playerid, 0);
        FreezePlayer(playerid, 2000);
        return 1;
    }

    if (strcmp("/objective", cmdtext, true) == 0)
    {
        if(TEAM_COP[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_YELLOW, " You are a Cop ");
            SendClientMessage(playerid, COLOR_YELLOW, " Your objective is to guard the prisoners ");
            SendClientMessage(playerid, COLOR_YELLOW, " And stop the from escaping at all means! ");
            SendClientMessage(playerid, COLOR_YELLOW, " You can gain weapons + Ammo at the store room");
            SendClientMessage(playerid, COLOR_YELLOW, " For help type /help");
        }
        return 1;
    }

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

    if (strcmp("/lockdown", cmdtext, true) == 0)
    {
        if(PlayerToPoint(1.0,playerid,2653.1077,-2742.4539,5.2934))
        {
            if(TEAM_COP[playerid] == 1)
            {
                MoveObject(LD, 2651.496582, -2745.657959, 6.613323, 2);
                GameTextForAll("~P~Prison ~R~LOCKDOWN!",500,1);
                SetTimer("Alarm1", 3500, 1);
                Locked[playerid] = 1;
            }
        }
        return 1;
    }
   
    if (strcmp("/lockdownO", cmdtext, true) == 0)
    {
        if(PlayerToPoint(1.0,playerid,2653.1077,-2742.4539,5.2934))
        {
            if(TEAM_COP[playerid] == 1)
            {
                MoveObject(LD, 2640.496582, -2745.657959, 0.713324, 2);
                GameTextForAll("~P~Prison ~R~LOCKDOWN ~P~OVER",500,1);
                Locked[playerid] = 0;
            }
        }
        return 1;
    }
   
    return 0;
}
Reply


Messages In This Thread
Unknown Commands? - by [NYRP]Mike. - 29.09.2009, 20:19
Re: Unknown Commands? - by silvan - 29.09.2009, 20:20
Re: Unknown Commands? - by [NYRP]Mike. - 29.09.2009, 20:23
Re: Unknown Commands? - by ded - 29.09.2009, 20:34
Re: Unknown Commands? - by Peter_Corneile - 29.09.2009, 20:38
Re: Unknown Commands? - by agusfn20 - 29.09.2009, 20:43

Forum Jump:


Users browsing this thread: 4 Guest(s)