25.09.2011, 15:17
(
Последний раз редактировалось aRoach; 25.09.2011 в 15:20.
Причина: Identitation
)
Try This:
pawn Код:
public FairTime( playerid )
{
if( !IsPlayerInAnyVehicle( playerid ) ) return ( 0 );
new seat = GetPlayerVehicleSeat( playerid ), Float:x, Float:y, Float:z;
GetPlayerPos( playerid, x, y, z );
if( seat == 1 || seat == 2 || seat == 3 )
{
GivePlayerMoney( playerid, -5 );
SendClientMessage( playerid, COLOR_WHITE, "{ff0000}[PAYMENT] You have paid the taxi driver $5" );
pAmount[ playerid ] += 5;
}
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if( IsPlayerInRangeOfPoint( i, 3, x, y, z ) )
{
new vehicle = GetPlayerVehicleID( i ), model = GetVehicleModel( vehicle );
if( model == 420 || model == 438 )
{
GivePlayerMoney( i, 5 );
SendClientMessage( i, COLOR_WHITE, "{00ff00}[PAYMENT] You have been paid $5 by the passenger" );
}
}
}
return 1;
}