14.03.2011, 00:53
Alright, I have a garage command,
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..
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;
}
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..