07.06.2013, 09:23
pawn Код:
forward ccolor ( vehicleid ) ;
public ccolor ( vehicleid )
{
ChangeVehicleColor( vehicleid , random ( 256 ) , random ( 256 ) ) ;
return 1;
}
CMD:vchange ( playerid , params [ ] )
{
if ( CVeh_Color [ playerid ] == 0)
{
CVeh_Color [ playerid ] = 1 ;
Timer = SetTimerEx ( "ccolor" , 100 , true , "i" , GetPlayerVehicleID ( playerid ) ) ;
}
else
{
CVeh_Color [ playerid ] = 0 ;
KillTimer ( Timer ) ;
}
return 1 ;
}