PD Garage command
#1

Alright, I have a garage command,
pawn Код:
command(enterpg, playerid, params[])
{
#pragma unused params
    if( IsPlayerInRangeOfPoint( playerid, 5.0, 620.584, -596.347, 16.945 ) ) {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        if( !IsPlayerInAnyVehicle( playerid ) ) {
            SetPlayerInterior( playerid, 0 );
            SetPlayerPos( playerid, 1445.771, 2595.099, 572.486);
        }
        else return SetVehiclePos( GetPlayerVehicleID( playerid ),1445.771, 2595.099, 572.486);
        }
    }
    return 1;
}


command(exitpg, playerid, params[])
{
#pragma unused params
    if( IsPlayerInRangeOfPoint( playerid, 5.0, 1445.771, 2595.099, 572.486) ) {
        if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
        if( !IsPlayerInAnyVehicle( playerid ) ) {
            SetPlayerInterior( playerid, 0 );
            SetPlayerPos( playerid, 620.584, -596.347, 16.945 );
        }
        else return SetVehiclePos( GetPlayerVehicleID( playerid ), 620.584, -596.347, 16.945 );
    }
    return 1;
}
And I was wondering about three things.

First, How would I make it so that, if your not inrange of the point, it says "You are not at the police garage entrance" Or "You are not at the police garage exit"

Second: Same concept as one, How would I make it so that if group commands does not equal 1 or 4, it will say "You are not a law enforcement officer"

Third: (Not so important)
How would I make those two commands combined, for example, I type /pdgarage at the entrance point, and it teleports me into the garage, if Im in the garage and I type /pdgarage it will teleport me outside the garage..
Reply


Messages In This Thread
PD Garage command - by patfay - 14.03.2011, 00:53
Re: PD Garage command - by antonio112 - 14.03.2011, 01:02
Re: PD Garage command - by patfay - 14.03.2011, 01:03
Re: PD Garage command - by antonio112 - 14.03.2011, 01:06
Re: PD Garage command - by patfay - 14.03.2011, 01:08
Re: PD Garage command - by patfay - 14.03.2011, 01:17
Re: PD Garage command - by antonio112 - 14.03.2011, 01:33

Forum Jump:


Users browsing this thread: 1 Guest(s)