PD Garage command
#2

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 SendClientMessage( playerid, -1, "You are not in Police Department." );// If player is not in PD Group.
    }
    return SendClientMessage( playerid, -1, "You are not at the PD Garage door."); // If player is not in range.
}
pawn Код:
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 for the last question ... well, that`s another thing. Let me do it:
pawn Код:
command(pdgarage, playerid, params[])
{
#pragma unused params
    if( IsPlayerInRangeOfPoint( playerid, 5.0, 1445.771, 2595.099, 572.486) && 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 );
    }
    if( IsPlayerInRangeOfPoint( playerid, 5.0, 620.584, -596.347, 16.945 ) && 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);
         }
        return SetVehiclePos( GetPlayerVehicleID( playerid ),1445.771, 2595.099, 572.486);
    }
    return SendClientMessage( playerid, -1, "You are not at the PD Garage door.");
}
Something like this ... didn`t test it but it should work.
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: 2 Guest(s)