25.09.2012, 20:51
How would I go about doing this? (Refer mostly to the tax = ... part)
pawn Код:
forward UpdatePlayTime( );
public UpdatePlayTime ( )
{
for( new u; u < MAX_PLAYERS; u ++ )
{
if( plLoggedIn [ u ] == true )
{
plStats [ u ] [ TimePlayedMins ] ++;
if( plStats [ u ] [ TimePlayedMins ] >= 60 )
{
// Payday!
new
wage = plStats [ u ] [ LumberjackWage ] + plStats [ u ] [ QuarryworkerWage ],
tax = plStats [ u ] [ LumberjackWage ] + plStats [ u ] [ QuarryworkerWage ] / 0.07,
// tag mismatch ^
str [ 128 ];
plStats [ u ] [ Money ] += wage;
plStats [ u ] [ LumberjackWage ] = 0, plStats [ u ] [ QuarryworkerWage ] = 0, plStats [ u ] [ TimePlayedMins ] = 0;
plStats [ u ] [ TimePlayedHours ] ++;
format( str, 128, "* You have earned $%d this paycheck. $%d in taxes were taken out.", wage, tax );
SendClientMessage( u, Colour_LimeGreen, str );
}
}
}
return true;
}