12.03.2011, 14:33
(
Последний раз редактировалось antonio112; 12.03.2011 в 15:30.
)
Works like a charm! Thanks again for the help.
If anyone can think at a solution with
I would appreciate it.
Till now, I have:
And the IsLSPDVeh and ISFBIVeh:
If anyone can think at a solution with
pawn Код:
OnPlayerStateChange
Till now, I have:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if( newstate == 2 )
{
new VehicleID = GetPlayerVehicleID ( playerid );
if( IsLSPDVeh( VehicleID ) )
{
if( GetPVarInt( playerid, "Faction" ) == 1 ) { }// LSPD Faction
else
{
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid, -1, "You don`t have the keys for this car." );
}
return 1;
}
if( IsFBIVeh( VehicleID ) )
{
if( GetPVarInt( playerid, "Faction" ) == 2 ) { } // FBI Faction
else
{
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid, -1, "You don`t have the keys for this car." );
}
return 1;
}
}
return 1;
}
pawn Код:
stock IsLSPDVeh( VehicleID )
{
if ( ( VehicleID == LSPDCar[ 0 ] || LSPDCar[ 1 ] || LSPDCar[ 2 ] || LSPDCar[ 3 ] || LSPDCar[ 4 ] || LSPDCar[ 5 ] || LSPDCar[ 6 ] || LSPDCar[ 7 ] || LSPDCar[ 8 ] || LSPDCar[ 9 ] || LSPDCar[ 10 ] || LSPDCar[ 11 ] ) )
return true;
else return false;
}
stock IsFBIVeh( VehicleID )
{
if ( ( VehicleID == FBICar[ 0 ] || FBICar[ 1 ] || FBICar[ 2 ] || FBICar[ 3 ] || FBICar[ 4 ] || FBICar[ 5 ] || FBICar[ 6 ] ) )
return true;
else return false;
}